/*La funzione ApriIngrandimento va richiamata con argomenti

foto: img da caricare compreso di estensione
winName: nome finestra (uguale per avere le img nella stessa finestra, altrimenti si puņ non dare)
myWidth: larghezza
myHeight: altezza
isCenter: finestra da aprire centrata (true/false)
cartella: percorso relativo del file da aprire

il file funzioni.js va richiamato con il codice <script src="funzioni.js"></script> all'interno della parte <head> del documento html*/

function ApriIngrandimento(foto, winName, myWidth, myHeight, isCenter, cartella){
	features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no';
  	if(window.screen)if(isCenter)if(isCenter=="true"){
    	var myLeft = (screen.width-myWidth)/2;
    	var myTop = (screen.height-myHeight)/2;
    	features+=(features!='')?',':'';
    	features+=',left='+myLeft+',top='+myTop;
  	}
	
	//variabili da modificare a seconda del sito web
	titolo = '.: GALLERIA :.';
	stilechiudi = ' {  font-family:  Arial, Helvetica, sans-serif; font-size: 10px; color: #ffffff; text-decoration: none }';
	stileover = ' { text-decoration: none }';
	sfondo = '#bea056';
	hchiudi = '15';
	textchiudi = '[chiudi questa finestra]';
	//fine variabili
	
	ingrandimento = window.open('', winName, features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	
	ingrandimento.document.writeln('<html>');
	ingrandimento.document.writeln('<head>');
	ingrandimento.document.writeln('<title>' + titolo + '</title>');
	ingrandimento.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
	ingrandimento.document.writeln('<style type="text/css">');
	ingrandimento.document.writeln('<!--');
	ingrandimento.document.writeln('.stile' + stilechiudi);
	ingrandimento.document.writeln('.stile:hover' + stileover);
	ingrandimento.document.writeln('-->');
	ingrandimento.document.writeln('</style>');
	ingrandimento.document.writeln('</head>');
	ingrandimento.document.writeln('<body bgcolor="' + sfondo + '" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	ingrandimento.document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	ingrandimento.document.writeln('<tr>');
	ingrandimento.document.writeln('<td><img src="' + cartella + foto + '" width="' + myWidth + '" height="' + (myHeight-hchiudi) + '"></td>');
	ingrandimento.document.writeln('</tr>');
	ingrandimento.document.writeln('<tr>');
	ingrandimento.document.writeln('<td height="' + hchiudi + '" align="right"><a href="javascript:window.parent.close();" class="stile">' + textchiudi + '</a></td>');
	ingrandimento.document.writeln('</tr>');
	ingrandimento.document.writeln('</table>');
	ingrandimento.document.writeln('</body>');
	ingrandimento.document.writeln('</html>');
}