<!-- Funzioni JavaScript per il sito www.vasconasorri.com realizzate da Simone Nasorri (Thesblind) -->

<!-- 

//var photos=new Array()
//var which=0

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

<!--
function PopIt(TitoloForm, TitoloOpera, Immagine, Altezza, Lunghezza, Sfondo, Commento){
	var TITOLO = TitoloForm
	var OPERA = TitoloOpera
	var BACK = Sfondo
	var s1 = "<HEAD>" +
	"<TITLE>" + TITOLO + "</TITLE>" + 
	"<SCRIPT>" +
	"function Chiudi()" +
    "    {" +
    "    this.close();" +
    "    } " +
	"</SCRIPT>" + 
	"<BODY bgcolor='" + Sfondo + "'>" +
	"<div align='center'>" + 
	"<font face='Times New Roman, Times, serif'><i><font color='#FFCC00'>" + Commento + "</font></i></font><p>" +
  	"<p>'<img src=" + Immagine + "  width=" + Lunghezza + " height=" + Altezza + "><br>" + 
  	"</form>" +
	/*"<a href="javascript:Chiudi()"><img src="/Img/Chiudi.gif" width="60" height="30" border="0"></a> +
	 "<INPUT TYPE='BUTTON' VALUE='Chiudi'" +                   
	"onClick='self.close()'>" + */
	"<a href='javascript:Chiudi()'><img src='../Img/Chiudi.gif' width='60' height='30' border='0'></a>" +
	"</div>" +
	"</BODY>"   
	Altezza = Altezza +100
	Lunghezza  = Lunghezza + 20
	popup = window.open("",TitoloForm,"height=" + Altezza  + ",width=" + Lunghezza + ",scrollbars=no")  
	popup.document.write(s1)  
	popup.document.close()
}


function indietro(){
	if (which>0){
	window.status='Prima immagine'
	which--
	document.images.intro.src=photos[which]
	}
	else
		{
		document.images.intro.src=photos[n-1]
		which = n - 1	
		}
	}
	
function avanti(){
	if (which+1<n){
		if (which<photos.length-1){
		which++
		document.images.intro.src=photos[which]
		}
			  
		//		else window.status='Fine delle immagini'
		}
		else { document.images.intro.src=photos[0]
				which = 0
		}
	}
function Chiudi(){
	this.close();
	}

	
function PrimaImmagineGalleria(){
	document.images.intro.src=photos[0]
	}


	
	function ImgBrowser	( Titolo,nImg,Img1,Img2,Img3,Img4, Img5, Img6, Img7, Img8){ 	
	var s1 ="<html>" +
			"<head>" +
			"<title></title>" +
			"<script language='JavaScript' src='../JScript/JSVN.js'>" +
			"</script>" + 
			"<script language='javascript' > " +
			"var photos=new Array(); " +
			"var which=0; " +
			"var n = " + nImg + "; " +
			"photos[0]='" + Img1 + "'; " +
			"photos[1]='" + Img2 + "'; " +
			"photos[2]='" + Img3 + "' ;" +
			"photos[3]='" + Img4 + "'; " +
			"photos[4]='" + Img5 + "'; " +
			"photos[5]='" + Img6 + "'; " +
			"photos[6]='" + Img7 + "'; " +
			"photos[7]='" + Img8 + "' " +
			"</script> " +
			"</head> " +
			"<body bgcolor='#000000' text='#ffff00'>"+
			"<center>" +
			"<font face='Times New Roman, Times, serif'><i><font color='#FFCC00'>" + Titolo + "</font></i></font><p>" +
			"<img src=javascript:PrimaImmagineGalleria() width='400' height='400' name='intro'></p>" +
			"<table width='31%' border='0'>" +
			"<tr>" +
   			"<td width='41%'>" +
			"<div align='right'><a href=javascript:indietro()><img src='../Img/IndietroBrowse_i.gif' width='114' height='30' border='0'></a></div>" +
			"</td>" +
			"<td width='18%'>&nbsp;</td>" +
			"<td width='41%'>" + 
          	"<div align='right'><a href=javascript:avanti()><img src='../Img/AvantiBrowse_i.gif' width='114' height='30' border='0'></a></div>" +
        	"</td>" +
			"</tr>" +
			"</table>" +
			"<a href=javascript:Chiudi()><img src='../Img/Chiudi.gif' width='60' height='30' border='0'></a>" +
			"</center>" +
			"</body>"+
			"</html>"
	popup = window.open("","","height=550,width=450,scrollbars=no,titlebar=no")  
	 popup.document.write(s1) 
	popup.document.close()
	
		}
		
	function ImgBrowser_E	( Titolo,nImg,Img1,Img2,Img3,Img4, Img5, Img6, Img7, Img8){ 	
	var s1 ="<html>" +
			"<head>" +
			"<title></title>" +
			"<script language='JavaScript' src='../JScript/JSVN.js'>" +
			"</script>" + 
			"<script language='javascript' > " +
			"var photos=new Array(); " +
			"var which=0; " +
			"var n = " + nImg + "; " +
			"photos[0]='" + Img1 + "'; " +
			"photos[1]='" + Img2 + "'; " +
			"photos[2]='" + Img3 + "' ;" +
			"photos[3]='" + Img4 + "'; " +
			"photos[4]='" + Img5 + "'; " +
			"photos[5]='" + Img6 + "'; " +
			"photos[6]='" + Img7 + "'; " +
			"photos[7]='" + Img8 + "' " +
			"</script> " +
			"</head> " +
			"<body bgcolor='#000000' text='#ffff00'>"+
			"<center>" +
			"<font face='Times New Roman, Times, serif'><i><font color='#FFCC00'>" + Titolo + "</font></i></font><p>" +
			"<img src=javascript:PrimaImmagineGalleria() width='400' height='400' name='intro'></p>" +
			"<table width='31%' border='0'>" +
			"<tr>" +
   			"<td width='41%'>" +
			"<div align='right'><a href=javascript:indietro()><img src='../Img/IndietroBrowse_e.gif' width='114' height='30' border='0'></a></div>" +
			"</td>" +
			"<td width='18%'>&nbsp;</td>" +
			"<td width='41%'>" + 
          	"<div align='right'><a href=javascript:avanti()><img src='../Img/AvantiBrowse_e.gif' width='114' height='30' border='0'></a></div>" +
        	"</td>" +
			"</tr>" +
			"</table>" +
			"<a href=javascript:Chiudi()><img src='../Img/Close.gif' width='60' height='30' border='0'></a>" +
			"</center>" +
			"</body>"+
			"</html>"
	popup = window.open("","","height=550,width=450,scrollbars=no,titlebar=no")  
	 popup.document.write(s1) 
	popup.document.close()
	
		}
