/*Il file funzioni.js va richiamato con il codice
<script src="funzioni.js">
</script> 
all'interno della parte <head> del documento htmlLa funzione ApriIngrandimento va richiamata con argomentifoto: nome img da caricare compreso di estensionewinName: nome finestra (uguale per avere le img nella stessa finestra, altrimenti si può non dare; se è uguale la finestra non cambierà dimensioni)myWidth: larghezza finestra e imgmyHeight: altezza finestra (data da img + altezza scritta chiudi)isCenter: finestra da aprire centrata (true/false)cartella: percorso relativo del file da aprire*/

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 = 'FerreroLegno';
	stileChiudi = ' {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000; text-decoration: none}';
	stileOver = ' { text-decoration: none }';
	sfondo = '#dbe1ed';
	hChiudi = '15';
	textChiudi = '[chiudi questa finestra]';
	//fine variabili		
	ingrandimento = window.open('', winName, features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	ingrandimento.document.open();
	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>');
	ingrandimento.document.close();
	ingrandimento.focus();
}
