<!--
var myUserAgent = navigator.userAgent.toLowerCase();
var isMac=false;

if (myUserAgent.indexOf("mac") != -1){
	isMac=true;	
}

function openWin(page,name,prop){
	
	//page=escape(page);
	//alert(page);
	if (window.popUp){
		if (!popUp.closed) popUp.close();	
	}
	if (isMac){
		window.setTimeout( "popUp=window.open( '"+page+"' , '"+name+"' , '"+prop+"')",100);
	}else{
		popUp=window.open( page , name , prop)
	}
}

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_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_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 ZI_preloadImages(){
	MM_preloadImages('graphic/chart_it/bottone1h.gif','graphic/chart_it/bottone2h.gif','graphic/chart_it/bottone3h.gif','graphic/chart_it/bottone4h.gif','graphic/chart_it/bottone5h.gif','graphic/chart_it/bottone6h.gif','graphic/chart_it/bottone7h.gif','graphic/chart_it/bottone8h.gif','graphic/chart_it/bottone9h.gif','graphic/chart_it/bottone10h.gif','graphic/chart_it/bottone11h.gif','graphic/chart_it/bottone12h.gif','graphic/chart_it/bottone13h.gif','graphic/chart_it/bottone14h.gif','graphic/chart_it/bottone15h.gif','graphic/chart_it/bottone17h.gif','graphic/chart_it/bottone18h.gif','graphic/chart_it/bottone19h.gif','graphic/chart_it/bottone20h.gif','graphic/chart_it/bottone21h.gif','graphic/chart_it/bottone22h.gif','graphic/chart_it/bottone23h.gif','graphic/chart_it/bottone24h.gif');
}


var netscape=document.layers?true:false;
var explorer=document.all?true:false;
var netscape6=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1?true:false;

//layers visibility
function hide_div(target) {
	switch(target){
	case "primo":
		hidenon('tinto_div');
		hidenon('confezione_div');
		hidenon('commercio_div');
		hidenon('servizi_div');
		break;
	case "secondo":
		hidenon('tinto_div');
		hidenon('confezione_div');
		hidenon('filatura_div');
		hidenon('servizi_div');
		hidenon('tessitura_div');
		break;
	case "terzo":
		hidenon('commercio_div');
		hidenon('filatura_div');
		hidenon('servizi_div');
		hidenon('tessitura_div');
		break;
	case "quarto":
		hidenon('commercio_div');
		hidenon('filatura_div');
		hidenon('servizi_div');
		hidenon('tessitura_div');
		hidenon('tinto_div');
		break;
	case "quinto":
		hidenon('filatura_div');
		hidenon('servizi_div');
		hidenon('tessitura_div');
		hidenon('tinto_div');
		break;
	case "sesto":
		hidenon('filatura_div');
		hidenon('tessitura_div');
		hidenon('tinto_div');
		hidenon('confezione_div');
		hidenon('commercio_div');
		break;
	case "settimo":
		hidenon('servizi_div');
		break;
	case "ottavo":
		hidenon('filatura_div');
		hidenon('tessitura_div');
		hidenon('servizi_div');
		hidenon('commercio_div');
		hidenon('confezione_div');	
		break;
	case "nono":
		hidenon('filatura_div');
		hidenon('servizi_div');
		hidenon('commercio_div');	
		break;
	case "zero":
		hidenon('servizi_div');
		hidenon('filatura_div');
		break;
	}
}

function restore_div(){
			shownon("commercio_div");			
			shownon("servizi_div");			
			shownon("tinto_div");
			shownon("confezione_div");
			shownon("tessitura_div");
			shownon("filatura_div");
}


if (navigator.appVersion.indexOf("Mac") !=-1){
	function shownon(showobj) {
		if (netscape) document.layers[showobj].visibility = "show"
		else if (explorer) document.all[showobj].style.visibility = "visible"
		else if (netscape6) document.getElementById(showobj).style.visibility = "visible"
	}

	function hidenon(hideobj) {
		if (netscape) document.layers[hideobj].visibility = "hide"
		else if (explorer) document.all[hideobj].style.visibility = "hidden"
		else if (netscape6) document.getElementById(hideobj).style.visibility = "hidden"
	}
}
else
{
	function shownon(showobj) {
		if (netscape) document.layers[showobj].visibility = "show"
		else if (explorer) document.all[showobj].style.visibility = "visible"
		else if (netscape6) document.getElementById(showobj).style.visibility = "visible"
	}

	function hidenon(hideobj) {
		if (netscape) document.layers[hideobj].visibility = "hide"
		else if (explorer) document.all[hideobj].style.visibility = "hidden"
		else if (netscape6) document.getElementById(hideobj).style.visibility = "hidden"
	}
}
//-->
