/**********************************************************************************
* PopUpper.js                                                                     *
***********************************************************************************
* PopUphoto: Opens a PopUp displaying an image centered in the screen             *
* PopUpPage: Opens a PopUp of a give html page centered in the screen             *
* =============================================================================== *
* Version:                    1.0                                                 *
* by:                         Michele Olimpi                                      *
* Date                        19/06/2007                                          *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Free Software Foundation      *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See http://www.fsf.org for details about the free Software Foundations license. *
**********************************************************************************/
function PopUpPhoto(image,SizeX,SizeY){
	x = (window.screen.availWidth-SizeX)/2;
	y = (window.screen.availHeight-SizeY)/2;
	
	bigwin=window.open ('','PopUpPhoto','scrollbars=0,resizable=1,status=no,menubar=0,toolbar=0,location=0,titlebar=0,width='+SizeX+',height='+SizeY+',top='+y+',left='+x);
	bigwin.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
	bigwin.document.writeln('<html>');
	bigwin.document.writeln('<head>');
	bigwin.document.writeln('<title> </title>');
	bigwin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
	bigwin.document.writeln('</head>');
	bigwin.document.writeln('<body leftmargin="0" topmargin="0">');

	bigwin.document.write('<img src="'+image+'">');

	bigwin.document.writeln('</body>');
	bigwin.document.writeln('</html>');
    bigwin.document.close();
}
function PopUpPage(page,SizeX,SizeY){
	x = (window.screen.availWidth-SizeX)/2;
	y = (window.screen.availHeight-SizeY)/2;
	
	bigwin=window.open (page,'PopUpPage','scrollbars=0,resizable=1,status=0,menubar=0,toolbar=0,location=0,titlebar=0,width='+SizeX+',height='+SizeY+',top='+y+',left='+x);
}
