<!--

  //FUNZIONI DI MENU

  function MenuHi(chi,Hi){
   	if(Hi){document.getElementById("mnu"+chi).style.backgroundImage="url(\'img/btn"+chi+".jpg\')"
	}else{document.getElementById("mnu"+chi).style.backgroundImage=""}
  }
  
  function MenuGo(chi){
     	for(i=0;i<=7;i++)document.getElementById("crp"+i).style.display="none"
     	for(i=0;i<=7;i++)document.getElementById("mnuT"+i).style.display="none"
     	document.getElementById("crp2_1").style.display="none"
     	document.getElementById("crp2_2").style.display="none"
     	document.getElementById("crp2_3").style.display="none"
     	document.getElementById("crp4_1").style.display="none"
     	document.getElementById("crp4_2").style.display="none"
     	document.getElementById("crp4_3").style.display="none"
     	document.getElementById("crp4_4").style.display="none"
			document.getElementById("crp7_1").style.display="none"
     	document.getElementById("crp"+chi).style.display=""
     	if(chi>0) {
				document.getElementById("homegal1").style.display="none"
				document.getElementById("homegal2").style.display="none"
				document.getElementById("homegal3").style.display="none"
				document.getElementById("mnuT"+chi).style.display=""
			}
			else {
				homegalcurimg = 0;
				HomeGalleryGo();
				document.getElementById("homegal1").style.display=""
				document.getElementById("homegal2").style.display=""
				document.getElementById("homegal3").style.display=""
			}
				
  }
  
  function Menu2Go(chi){
     	document.getElementById("crp2").style.display="none"
     	document.getElementById("crp2_1").style.display="none"
     	document.getElementById("crp2_2").style.display="none"
     	document.getElementById("crp2_3").style.display="none"
     	if(chi==0) document.getElementById("crp2").style.display=""
     	if(chi==1) document.getElementById("crp2_1").style.display=""
     	if(chi==2) document.getElementById("crp2_2").style.display=""
     	if(chi==3) document.getElementById("crp2_3").style.display=""
  }
  
  function Menu4Go(chi){
     	document.getElementById("crp4").style.display="none"
     	document.getElementById("crp4_1").style.display="none"
     	document.getElementById("crp4_2").style.display="none"
     	document.getElementById("crp4_3").style.display="none"
     	document.getElementById("crp4_4").style.display="none"
     	if(chi==0) document.getElementById("crp4").style.display=""
     	if(chi==1) document.getElementById("crp4_1").style.display=""
     	if(chi==2) document.getElementById("crp4_2").style.display=""
     	if(chi==3) document.getElementById("crp4_3").style.display=""
     	if(chi==4) document.getElementById("crp4_4").style.display=""
  }
	
	function Menu7Go(chi){
     	document.getElementById("crp7").style.display="none"
     	document.getElementById("crp7_1").style.display="none"
     	if(chi==0) document.getElementById("crp7").style.display=""
     	if(chi==1) document.getElementById("crp7_1").style.display=""
  }

   //FUNZIONI DELLA GALLERY

   function GalleryHi(chi,Hi){
   	if(Hi){document.getElementById("gal"+chi).style.color="rgb(3,146,23)"
	}else{document.getElementById("gal"+chi).style.color="rgb(0,0,0)"}
   }
   function GalleryGo(){
   	if(curimg>imgpat.length-1) curimg=0
   	if(curimg<0)		   curimg=imgpat.length-1
   	document.images["gallery"].src=imgpat[curimg]
        for(i=0;i<spetit.length;i++) document.getElementById("tit"+i).style.display="none"
        document.getElementById("tit"+imgspe[curimg]).style.display=""
   }

	function Zoom(goto_img){
		if (goto_img)
			tmpurl="000"+goto_img;
		else
			tmpurl="000"+imgzoo[curimg];
		tmpurl="zoom.html?"+tmpurl.substr(tmpurl.length-3)
		W2=window.open(tmpurl,"","width=600,height=600,left=100,top=100,scrollbars=no,resizable=no")
		W2.focus()
	}
	
	//FUNZIONI DELLA GALLERY - HOME

   function HomeGalleryHi(chi,Hi){
   	if(Hi){document.getElementById("homegal"+chi).style.color="rgb(3,146,23)"
	}else{document.getElementById("homegal"+chi).style.color="rgb(0,0,0)"}
   }
   function HomeGalleryGo(){
   	if (homegalcurimg > home_items.length-1)
			homegalcurimg=0
   	if (homegalcurimg < 0)
			homegalcurimg=home_items.length-1
		if (home_items[homegalcurimg]['type'] == 'img')
	   	document.getElementById("crp0").innerHTML='<img src="img/homgal/'+home_items[homegalcurimg]['item']+'" alt="GRAN TEATRO DEL BABAU" \/>';
		else
			document.getElementById("crp0").innerHTML='<div class="txt" style="text-align:justify;padding:5px;font-style:italic">'+home_items[homegalcurimg]['item']+'</div>';
   }

	function HomeZoom(){
		tmpurl="00"+homegalcurimg;
		tmpurl="homezoom.html?"+tmpurl.substr(tmpurl.length-2)
		W2=window.open(tmpurl,"","width=600,height=600,left=100,top=100,scrollbars=no,resizable=no")
		W2.focus()
	}
	
	
	
	
	function OpenPic(goto_img){
		if (goto_img)
			tmpurl="00"+goto_img;
		else
			tmpurl="00"+imgzoo[curimg];
		tmpurl="pic.html?"+tmpurl.substr(tmpurl.length-2)
		W2=window.open(tmpurl,"","width=600,height=600,left=100,top=100,scrollbars=no,resizable=no")
		W2.focus()
	}
   
		function PopOpen(chi1,chi2){
			//apre pop
			//if (((chi1 == 'sho') && ((chi2 == 'bag') || (chi2 == 'acq') || (chi2 == 'fog') || (chi2 == 'kis'))) || (chi1 == 'vid'))
			if (chi1 == 'vid')
				var window_width = 505;
			else
				var window_width = 380;
			if (chi1 == 'vid')
				var window_height = 450;
			else
				var window_height = 600;
			W3=window.open("pop.html?"+chi1+chi2,"","width="+window_width+",height="+window_height+",left=100,top=100,scrollbars=yes,resizable=no")
			W3.focus()
		}

   function OpenBlank(chi){
   	//apre in nuova pagina
 	W3=window.open(chi,"","width=800,height=600,left=150,top=150,scrollbars=yes,resizable=yes")
	W3.focus()
   }


  //FUNZIONI GENERICHE

   function Resize0(){
	tmpobj=document.getElementById("div0").style
        tmptop=(rH() - 470) / 2
        if(tmptop<10) tmptop=10
        tmpleft=(rW() - 630) / 2
        if(tmpleft<65) tmpleft=65
        tmpobj.top=tmptop
        tmpobj.left=tmpleft
   }
   function rW(){
	return (window.innerWidth)?window.innerWidth:
		(document.documentElement.clientWidth)?document.documentElement.clientWidth:
		(document.body.clientWidth)?document.body.clientWidth:0;
   }
   function rH(){
	return (window.innerHeight)?window.innerHeight:
		(document.documentElement.clientHeight)?document.documentElement.clientHeight:
		(document.body.clientHeight)?document.body.clientHeight:0;
   }



//-->


