/*Il file funzioni.js va richiamato con il codice <script src="funzioni.js"></script> all'interno della parte <head> del documento htmlLa funzione ApriIngrandimento va richiamata con argomentifoto: nome img da caricare compreso di estensionewinName: 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 imgmyHeight: 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 = '..::SMC::..';	stileChiudi = ' {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000; text-decoration: none}';	stileOver = ' { text-decoration: none }';	sfondo = '#f7e7af';	hChiudi = '40';	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>');}function RndImage(nome,n,est,d){ // numero immagini: n <= 10 poi cambiano ogni 12/d mesi, numero decine: d, ogni decina deve avere lo stesso numero di immagini (numeri da 0 a 9)	mesifissi = Math.floor(12/d);	giorno = new Date();	mese = giorno.getMonth(); // valore compreso tra 0 e 11	decina = Math.floor(mese/mesifissi);	//window.alert(decina);	rnd_number = Math.floor(Math.random() * n); // 0 < rnd_number <= n-1	//window.alert(rnd_number);	document.write('<a  href="http://studiomoretticaselli.it/html/galleria.html"><img src="img/150x280/' + nome + decina + rnd_number + est + '" border="0"></a>');}
