// JavaScript Document
<!-- //

	function MM_preloadImages() {
		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_swapImgRestore() {
		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_findObj(n, d) {
		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 && d.getElementById) x=d.getElementById(n); return x;
	}
	function tellFlash(){
		if (document.homeMov){
			window.document.homeMov.SetVariable("myVar", 'varLoader');
			window.document.homeMov.TGotoLabel( "/", 'varLoader' ); 
		}
	}
	function MM_swapImage() {
		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 MM_openBrWindow(theURL,winName,features) {
		window.open(theURL,winName,features);
	}

	/* funzione per aprire una popup non resizable*/
	function apriPopUp( theFile, x, y ) {
		axisWin = window.open( ""+theFile+"", "PopUp", "menubar=no, status=no, titlebar=no, toolbar=no, width="+x+", height="+y+", scrollbars=0, resizable=no");
	}
	
	/* apertura popup per immagini con autodimensionamento*/
	function popupImage(img, title) {
		titre="STG";
		w=open("",'image','width=100,height=100,toolbar=no,scrollbars=no,resizable=no');	
		w.document.write("<HTML><HEAD><TITLE>"+title+"</TITLE></HEAD>");
		w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
		w.document.write("<BODY bgcolor='#000000' onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><a href='javascript:window.close();'><IMG src='"+img+"' border=0 alt='click to close'></a>");
		w.document.write("");
		w.document.write("</BODY></HTML>");
		w.document.close();
	}
	/*apertura popup per immagini con ulteriori informazioni*/
	function openPopupImage(img, codice, nome, lang, w, h){
		//var url = 'popup.asp?img='+img+'&codice='+codice+'&nome='+nome;
		var url;
		var params;
		url = "popup.asp?img="+escape(img)+"&codice="+codice+"&nome="+nome+"&lang="+lang;
		params = "width="+w+",height="+h+",toolbar=no,menubar=no,scrollbars=no,resizable=no";
		window.open(url,'image',params);
	}
function openPopupImage2(img, codice, nome, lang, w, h){
		//var url = 'popup.asp?img='+img+'&codice='+codice+'&nome='+nome;
		var url;
		var params;
		url = "popup2.asp?img="+escape(img)+"&codice="+codice+"&nome="+nome+"&lang="+lang;
		params = "width="+w+",height="+h+",toolbar=no,menubar=no,scrollbars=no,resizable=no";
		window.open(url,'image2',params);
	}
	/*function per mostrare informazione quando un elemento è scelto*/
	function changeText( codice, nome, note ){
		nuke = document.getElementById("informazia").innerHTML=""+codice+"<br>"+nome+"<br>&nbsp;<br>"+note+""
	}
	/*function per ripristinare l'informazione*/
	function delText(testo){
		nuke = document.getElementById("informazia").innerHTML=testo;
	}			
	
	function toggleVisibility(elem, on){
		var obj = document.getElementById(elem);
		if (on == 1){
			obj.style.visibility = "visible";
		}	else{
			obj.style.visibility = "hidden";
		}					
	}			
	
	function swapFilter(onOff){
		if (onOff == 1){
			document.getElementById('filterMenu').className='divis';
			document.getElementById('filterMenu').style.visibility='visible';
			for (i=0; i<24; i++){    //bisogna nascondere tutti i "seleziona" div 
				eval("document.getElementById('container"+i+"').visibility='hidden'");
				eval("document.getElementById('container"+i+"').className='divhid'");
				}
		}else{
			document.getElementById('filterMenu').className='divhid';
			document.getElementById('filterMenu').style.visibility='hidden';
			for (i=0; i<24; i++){    //bisogna nascondere tutti i "seleziona" div 
				eval("document.getElementById('container"+i+"').visibility='visible'");
				eval("document.getElementById('container"+i+"').className='divis'");
				}
		}	
	}
//-->