function openPopUp(theURL,winName,features) {
  window.open(theURL,winName,features);
}

var strZoomImg
var strTextImg

conta1 = ""
conta2 = ""
conta3 = ""
conta4 = ""
conta5 = ""
conta6 = ""
conta7 = ""

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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
	caricato=true
  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.01
  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 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 MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}



function colorabordo(quale){
	if(quale.style.border=="#000 1px solid"){
		quale.style.border="#AAA 1px solid"
	}else{
		quale.style.border="#000 1px solid"
	}
}


function controlla_1step(questo){
	var mio = document.getElementById("lyr_form")
	if(questo.checked){
		if(letto == false){
			alert(eval("step1_"+document.req.lingua))
		}
		mio.style.display="block"
		if(questo.dove=="popup"){
			parent.window.resizeTo(536,495)
		}
		if(questo.dove=="stampa"){
			parent.window.resizeTo(480,500)
		}
		parent.topzero.location="../carica.asp?caricaora=1"
	}else{
		mio.style.display="none"
		if(questo.dove=="popup"){
			parent.window.resizeTo(520,232)
		}
		if(questo.dove=="stampa"){
			parent.window.resizeTo(480,368)
		}
	}
}


function controlla_2step(questo){
	if(questo.value=="si"){
		if(letto2 == false){
			//alert("Prima di procedere con la compilazione del modulo, vi consigliamo di leggere\nla nota informativa sul trattamento e l'invio dei dati personali")
			alert(eval("step2_"+document.req.lingua))
		}
		parent.topzero.location="../carica.asp?caricaora=3"
	}
}

function copiamail(questo){
	document.req.mlist.value=questo.value
}

function resizeFrame(myFrame, myDiv){
	//alert (myFrame)
	//alert (myDiv)
	var myObj = parent.document.getElementById(''+ myFrame +'')
	//alert (myObj)
	if(myObj){
	   myObj.style.height = document.getElementById(''+ myDiv +'').offsetHeight
	}
	//alert (myObj.style.height)
}

function setLanguage(quale){
	myForm = document.formLanguage
	if(myForm){
		myField = myForm.langWebSite
		if(myField){
			myField.value = quale
			myForm.submit()
		}
	}
}

function impostaLogoDefault(questo){
	questo.src = "../staff/images/logo.gif"
}

function SH_Coming(myStatusComing,myTopComing){
	var myLyrComing = document.getElementById("lyrComing")
	if(myLyrComing){
		if(myTopComing!=""){
			myLyrComing.style.top = myTopComing
		}else{
			myLyrComing.style.top = "50%"
		}
		myLyrComing.style.display=myStatusComing
	}
}

function cambiapagina(operation,messerrore){
	var myForm = eval("document.formPaging")
	switch(operation){
		case "back":
			myForm.numPage.value--
		break    
		case "next":
			myForm.numPage.value++
		break
		case "ricerca":
			if(myForm.page_field.value==0 || isNaN(myForm.page_field.value)){
				alert(messerrore)
				myForm.page_field.focus()
				return false;
			}
			myForm.numPage.value = myForm.page_field.value
		break
		default:
			if(operation!=""){
				myForm.numPage.value = operation
			}else{
				return false;
			}
	}
	myForm.submit()
}

function cambiapaginaCatalogue(operation,messerrore){
	var myFormPaging = eval("document.formPaging")
	var myForm = eval("document.searchProducts")
	switch(operation){
		case "back":
			myForm.numPage.value--
		break    
		case "next":
			myForm.numPage.value++
		break
		case "ricerca":
			if(myFormPaging.page_field.value==0 || isNaN(myFormPaging.page_field.value)){
				alert(messerrore)
				myFormPaging.page_field.focus()
				return false;
			}
			myForm.numPage.value = myFormPaging.page_field.value
		break
		default:
			if(operation!=""){
				myForm.numPage.value = operation
			}else{
				return false;
			}
	}
	myForm.submit()
}

function SHAltSim(quale){
	myObjAlt = document.getElementById("lyrPhoto_"+quale)
	if(myObjAlt){
		if(myObjAlt.style.display=="" || myObjAlt.style.display=="none"){
			myObjAlt.style.display="block"
		}else{
			myObjAlt.style.display="none"
		}
	}
}

function caricaDefault(questo){
	questo.src="images/1pixel.gif"
	questo.style.background = "url(images/imgdefault.jpg)"
	questo.style.backgroundPosition = "center center"
	questo.style.backgroundRepeat = "no-repeat"
}

function zoomImmagini(pagina,titolo,varLink_2,varTipoOggetto_2,varTipoLink_2,varImg_2,varTesto_2,myActualId){
	myObjVar = eval(myActualId)
	myVar = ""
	if(myObjVar) myVar = myObjVar
	window.open(pagina+'?titolo='+titolo+'&varLink_2='+varLink_2+'&varTipoOggetto_2='+varTipoOggetto_2+'&varTipoLink_2='+varTipoLink_2+'&varImg_2='+varImg_2+'&varTesto_2='+varTesto_2+'&myActualId='+myVar,'zoom','scrollbars=yes,resizable=yes,width=800,height=600')
}

function cambiaPaginaDaLink(myStrTipoLink,myStrLink){
	myPrevAddress = ""+document.location
	myPrevAddress = myPrevAddress.replace("http://","")
	var myArrString = myPrevAddress.split("/")
	myAddress = ""
	for(i=0;i<myArrString.length-1;i++){
		myAddress = myAddress + myArrString[i] + "/"
	}
	if(myStrTipoLink==0){
		document.location = "http://"+myAddress+myStrLink
	}else{
		window.open(myStrLink,'','')
	}
}

function cambiaNRP(questo,fieldToUpdate,secondField){
	var myValue = questo.options[questo.selectedIndex].value
	if(myValue!=""){
		document.getElementsByName("caricaNRP")[0].src="caricaNRP.asp?id="+myValue+"&fieldToUpdate="+fieldToUpdate
	}else{
		var myObj = eval("document.req."+fieldToUpdate)
		for (i=myObj.options.length;i>=1;i--){
			myObj.options[i]=null
		}
		if(secondField!=""){
			var myObj = eval("document.req."+secondField)
			for (i=myObj.options.length;i>=1;i--){
				myObj.options[i]=null
			}
		}
	}
}

function mostraaltroconosciuti(questo){
	var myValue = questo.options[questo.selectedIndex].value
	myStatus = "none"
	if(myValue=="0"){
		myStatus = "block"
	}
	document.getElementById("lyraltroconosciuti").style.display=myStatus
	document.req.altroconosciuti.value=""
}

function controllaSettore(questo){
	var myValue = questo.options[questo.selectedIndex].value
	var myBackground = "#EEE"
	var myDisabled = true
	if(myValue==0){
		myBackground = "#FFF"
		myDisabled = false
	}
	document.req.sector_specify.style.background = myBackground
	document.req.sector_specify.disabled = myDisabled
	if(!document.req.sector_specify.disabled) document.req.sector_specify.focus()
}

function goToProd(quale){
	document.searchProducts.action = "catalogue_visua.asp"
	document.searchProducts.method = "get"
	document.searchProducts.id.value = quale
	document.searchProducts.submit()
}

function goBack(){
	if(document.searchProducts.length > 1){
		document.searchProducts[1].submit()
	}else{
		document.searchProducts.submit()
	}
}

function checkGlobalSearch(messaggio){
	myForm = document.searchForm
	if(myForm.searchField.value=="" || myForm.searchField.value.length<3){
		alert(messaggio)
		myForm.searchField.focus()
		return false;
	}
	myForm.submit()
}

var myScrollPageTimeout
var going = 0
function scrollaPaging(come){
	if(going == 1){
		var myObj = document.getElementById("scrollPaging")
		if(come=="next"){
			var myObjInsideWidth = document.getElementById("scrollPagingIn").offsetWidth-3
			if(myObj.scrollLeft < myObjInsideWidth){
				myObj.scrollLeft = myObj.scrollLeft + 3
				myScrollPageTimeout = setTimeout("scrollaPaging('"+come+"')",1)
			}else{
				myObj.scrollLeft = myObjInsideWidth -3
				clearTimeout(myScrollPageTimeout)
			}
		}else{
			if(myObj.scrollLeft > 3){
				myObj.scrollLeft = myObj.scrollLeft - 3
				myScrollPageTimeout = setTimeout("scrollaPaging('"+come+"')",1)
			}else{
				myObj.scrollLeft = 0
				clearTimeout(myScrollPageTimeout)
			}
		}
	}
}

function stopScrollaPaging(){
	clearTimeout(myScrollPageTimeout)
	going = 0
}

function refreshComp(linea,cat,scat,prod,comp,colore){
	opener.focus()
	opener.location = "prodotto.asp?linea="+linea+"&idCat="+cat+"&idsCat="+scat+"&idProd="+prod+"&idComposizione="+comp+"&colore="+colore
}

var alza=""
var abbassa=""

function slideMenuTop(myObj){
	if(document.getElementById(myObj).style.top=='69px'){
		clearTimeout(abbassa)
		faiSlide(myObj,'show')
	}else{
		clearTimeout(alza)
		faiSlide(myObj,'hide')
	};
}

function faiSlide(myObj,status){

	myLyrToSlide = document.getElementById(myObj)
	myLyrToSlideTitle = document.getElementById(myObj+"Title")
	myMax = myLyrToSlide.offsetHeight-myLyrToSlideTitle.offsetHeight
	myActualTop = parseInt(myLyrToSlide.style.top.replace("px",""))
	if(status=="show"){
		myTot = 69-myMax+1
		if(myActualTop>myTot){
			myLyrToSlide.style.top = myActualTop-1 + "px"
			alza = setTimeout("faiSlide('"+myObj+"','"+status+"')",1)
		}
	}else{
		myTot = 69
		if(myActualTop<myTot){
			myLyrToSlide.style.top = myActualTop+1 + "px"
			abbassa = setTimeout("faiSlide('"+myObj+"','"+status+"')",1)
		}
	}
}

function coloramenu(myObj) {
	document.getElementById(myObj).color = "#f00";
}




var totHeight;

function preApriSlide (quale) {
	myArrTotCats = totLayersProd.split("|")
	tempHeight = 0;
	for(i=0;i<=myArrTotCats.length;i++){
		myObj = document.getElementById("product_list"+myArrTotCats[i])
		if(myObj){
			myObj.style.display="none"
			myObj.style.height="0px"
		} 
	}
	myLayer = document.getElementById(quale);
	myLayer.style.display = "block";
	myLayer.style.height = "auto";

	totHeight = myLayer.offsetHeight;
	myLayer.style.height = "0";
	
	apriSlide(quale);	
}


tempHeight = 0;

function apriSlide (quale) {
	myLayer = document.getElementById(quale);

	if (tempHeight < totHeight) {
		if(tempHeight<10){
			quanto = 2
		}else{
			if(tempHeight<50){
				quanto = 5
			}else{
				quanto = 10
			}
		}
		tempHeight = tempHeight + quanto;
		
		myLayer.style.height = tempHeight+"px";
		if (document.documentElement && document.documentElement.scrollTop){
			document.documentElement.scrollTop = 100000
		}else{
			if(document.body) document.body.scrollTop = 100000
		}
		mostra = setTimeout("apriSlide('"+quale+"')", 1);
	}

}

function accendiVoce(quale,myId){
	myObj = document.getElementById(quale+"_"+myId)
	whichName = quale
	allObjs = document.getElementsByName(whichName)
	//spengo tutte le voci
	for(i=0;i<allObjs.length;i++){
		allObjs[i].className = allObjs[i].className.replace("_active","").replace("_disactive","")
		if(quale=="linkCat") allObjs[i].className+="_disactive"
	}
	if(myObj) myObj.className = myObj.className.replace("_active","").replace("_disactive","")+"_active"
	
}


var totHeight;
var preHeight = 0

function preApriSlideDet (quale) {

	tempHeight = 0;
	
	myLayer = document.getElementById(quale);
	myLayer.style.display = "block";
	myLayer.style.height = "auto";

	totHeight = myLayer.offsetHeight;
	document.getElementById("myTotLyrHeight").style.display = "block"
	myScreeHeight = document.getElementById("myTotLyrHeight").offsetHeight
	document.getElementById("myTotLyrHeight").style.display = "none"
	
	preHeight = document.getElementById("contPreDetail").offsetHeight + 362
	myLayer.style.height = "0px";
	
	apriSlideDet (quale);	
}


tempHeight = 0;

function apriSlideDet (quale) {
	myLayer = document.getElementById(quale);

	if (tempHeight < totHeight) {
		if(tempHeight<10){
			quanto = 2
		}else{
			if(tempHeight<50){
				quanto = 5
			}else{
				quanto = 10
			}
		}
		tempHeight = tempHeight + quanto;
		
		myLayer.style.height = tempHeight+"px";
		
		valoreScroll = 100000
		if(tempHeight > (myScreeHeight - preHeight)){
			valoreScroll = preHeight
		}
		if (document.documentElement){
			if(navigator.appVersion.indexOf("MSIE") > -1){
				if(document.body) document.body.scrollTop = valoreScroll
			}else{
				document.documentElement.scrollTop = valoreScroll
			}
		}else{
			if(document.body) document.body.scrollTop = valoreScroll
		}
		mostra = setTimeout("apriSlideDet('"+quale+"')", 1);
	}
}

function checkLogin(messaggio){
	myForm = document.loginForm
	if(myForm.username.value=="" || myForm.password.value==""){
		alert(messaggio)
	}else{
		myForm.submit()
	}
}


function zoom(titoloSP,descrizioneSP,imgBig,qualeCounter){
	if(qualeCounter!=""){
		myObjMap = document.getElementsByTagName("MAP")[parseInt(qualeCounter)-1]
		if(myObjMap) myMapName = myObjMap.name
	}
	myLyr = document.getElementById("lyrSpOut")
	myImg = document.getElementById("imgProcesso")
	myTitle = document.getElementById("titleProcesso")
	myDesc = document.getElementById("descProcesso")
	if(myImg){
		myImg.src = imgBig
		if(qualeCounter!="") myImg.useMap = "#"+myMapName
	}
	if(myTitle) myTitle.innerHTML = titoloSP
	if(myDesc) myDesc.innerHTML = descrizioneSP
	if(myLyr){
		ScrollAmount = 0
		if (document.documentElement && document.documentElement.scrollTop){
		    // PC IE6 strict, Mac Firefox strict
		    ScrollAmount = document.documentElement.scrollTop;
		}else{
		    // Safari, PC IE6 trans, Mac Firefox trans
			if(document.body) ScrollAmount = document.body.scrollTop
		}
		//myLyrIn = document.getElementById("lyrSpIn")
		//myLyrInContent = document.getElementById("lyrSpInContent")
		//myLyrIn.style.top = ScrollAmount + (document.body.offsetHeight*3.5/100) + "px"
		//myLyrInContent.style.top = ScrollAmount + (document.body.offsetHeight*3.5/100) + "px"
		myLyr.style.display = "block"
		//var maxHeight = document.getElementById("lyrHider").style.height
		//document.getElementById("lyrHider").style.height = "0px"
		//startProcess(maxHeight)
		startProcess(0)
	}
}



function startProcess(maxVal)
{
	/*myLyrHider = document.getElementById("lyrHider")
	maxHeight = parseInt(maxVal.replace("px",""))
	myTempPercent = parseInt(myLyrHider.style.height.replace("px",""))
	if(myTempPercent<maxHeight)
	{
		myStep = 0
		if(myTempPercent < 20 || (myTempPercent > maxVal-20)){
			if(myTempPercent < 60){
				myStep = 2
			}else{
				myStep = 3
			}
		}else{
			myStep = 50
		}
		if((myTempPercent + myStep) > maxHeight) myStep = maxHeight - myTempPercent
		myTempPercent = myTempPercent + myStep
		myLyrHider.style.height = myTempPercent+"px"
		setTimeout("startProcess('"+maxVal+"')",1)
	}
	else
	{*/
		//document.getElementById("lyrSpInContent").style.display = "block"
		var x = 300
		if (document.documentElement && document.documentElement.scrollTop){
		    // PC IE6 strict, Mac Firefox strict
		    document.documentElement.scrollTop = 0;
			x = document.documentElement.height;
		}else{
		    // Safari, PC IE6 trans, Mac Firefox trans
			if(document.body)
			{
				document.body.scrollTop = 0
				x = document.body.offsetHeight;
			}
		}
		document.getElementById("lyrScrollProcessoImg").style.width = document.getElementById("outScroll").offsetWidth+"px"
		document.getElementById("lyrScrollProcessoImg").style.height = (x/1.5)+"px"
		document.getElementById("lyrTextScrollProcesso").style.width = document.getElementById("outTextScroll").offsetWidth+"px"
		document.getElementById("lyrTextScrollProcesso").style.height = document.getElementById("outTextScroll").offsetHeight+"px"
		document.getElementById("lyrScrollProcessoImg").style.display = "block"
	
	//}
}


function zoomSP(titoloSP,descrizioneSP,imgBig,qualeCounter){
	if(qualeCounter!=""){
		myObjMap = document.getElementsByTagName("MAP")[parseInt(qualeCounter)-1]
		if(myObjMap) myMapName = myObjMap.name
	}
	myLyr = document.getElementById("lyrSpOut")
	myImg = document.getElementById("imgProcesso")
	myTitle = document.getElementById("titleProcesso")
	myDesc = document.getElementById("descProcesso")
	if(myImg){
		myImg.src = imgBig
		if(qualeCounter!="") myImg.useMap = "#"+myMapName
	}
	if(myTitle) myTitle.innerHTML = titoloSP
	if(myDesc) myDesc.innerHTML = descrizioneSP
	if(myLyr){
		ScrollAmount = 0
		if (document.documentElement && document.documentElement.scrollTop){
		    // PC IE6 strict, Mac Firefox strict
		    ScrollAmount = document.documentElement.scrollTop;
		}else{
		    // Safari, PC IE6 trans, Mac Firefox trans
			if(document.body) ScrollAmount = document.body.scrollTop
		}
		myLyrIn = document.getElementById("lyrSpIn")
		myLyrInContent = document.getElementById("lyrSpInContent")
		myLyrIn.style.top = ScrollAmount + (document.body.offsetHeight*3.5/100) + "px"
		myLyrInContent.style.top = ScrollAmount + (document.body.offsetHeight*3.5/100) + "px"
		myLyr.style.display = "block"
		document.getElementById("lyrHider").style.height = "0px"
		startProcessSP()
	}
}



function startProcessSP()
{
	myLyrHider = document.getElementById("lyrHider")
	myTempPercent = parseInt(myLyrHider.style.height.replace("%",""))
	if(myTempPercent<100)
	{
		myStep = 0
		if(myTempPercent < 20 || (myTempPercent > 80)){
			if(myTempPercent < 20){
				myStep = 2
			}else{
				myStep = 3
			}
		}else{
			myStep = 10
		}
		if((myTempPercent + myStep) > 100) myStep = 100 - myTempPercent
		myTempPercent = myTempPercent + myStep
		myLyrHider.style.height = myTempPercent+"%"
		setTimeout("startProcessSP()",1)
	}
	else
	{
		document.getElementById("lyrSpInContent").style.display = "block"
		document.getElementById("lyrScrollProcesso").style.width = document.getElementById("outScroll").offsetWidth+"px"
		document.getElementById("lyrScrollProcesso").style.height = document.getElementById("outScroll").offsetHeight+"px"
		document.getElementById("lyrTextScrollProcesso").style.width = document.getElementById("outTextScroll").offsetWidth+"px"
		document.getElementById("lyrTextScrollProcesso").style.height = document.getElementById("outTextScroll").offsetHeight+"px"
		document.getElementById("lyrScrollProcesso").style.display = "block"
	
	}
}

function apriDettaglio(quale){
	window.open('navigationSP_visua.asp?id='+quale.split("|||")[1],'SPdetail','scrollbars=yes,resizable=yes,width=900,height=700')
}

function zoomImmaginiProd(myNumberStr,noFade){
	zoomNow = myNumberStr
	myImgZoomTemp = ""+strZoomImg.split("|||")[myNumberStr]
	myTestoZoomTemp = ""+strTextImg.split("|||")[myNumberStr]
	if(noFade == ""){
		myLyrZoom_1 = document.getElementById("lyrZoomOpacity")
		myLyrZoom_1.style.filter = "alpha(opacity=0)"
		myLyrZoom_1.style.MozOpacity = "0"
	}
	document.getElementById("zoomTitle").innerHTML = myTestoZoomTemp
	document.getElementById("myImgZoom").src = myImgZoomTemp
	if(noFade == ""){
		myLyrZoom_1.style.height = document.getElementById("lyrZoomOpacityOut").offsetHeight+"px"
		myLyrZoom_1.style.display = "block"
		myTempHeight = myLyrZoom_1.offsetHeight
		myTempHeightTotal = document.getElementById("myContainer").offsetHeight
		if(myTempHeightTotal > myTempHeight){
			myLyrZoom_1.style.height = myTempHeightTotal+"px"
			myLyrZoom_1.style.width = document.getElementById("myContainer").offsetWidth+"px"
		}
		fadeZoom(0)
	}
}

function fadeZoom(quanto){
	myLyrZoom_1 = document.getElementById("lyrZoomOpacity")
	if(quanto<60){
		quanto = quanto + 6
		myLyrZoom_1.style.MozOpacity = "0."+quanto
		myLyrZoom_1.style.filter = "alpha(opacity="+quanto+")"
		setTimeout("fadeZoom("+quanto+")",1)
	}else{
		document.getElementById("lyrZoomContent").style.display="block"
	}
}

function togliZoom(){
	document.getElementById("lyrZoomOpacity").style.display="none"
	document.getElementById("lyrZoomOpacity").style.filter = "alpha(opacity=0)"
	document.getElementById("lyrZoomOpacity").style.MozOpacity = "0"
	document.getElementById("lyrZoomContent").style.display="none"
}

function avIndZoom(operazione){
	entra = 0
	if(operazione == "--"){
		if(zoomNow > 1){
			entra = 1
		}
	}else{
		if(zoomNow < lastNotEmpty){
			entra = 1
		}
	}
	if(entra == 1){
		eval("zoomNow"+operazione)
		zoomImmaginiProd(zoomNow,'nofade')
		if(operazione == "--"){
			if(zoomNow == 1){
				document.getElementById("prevZoom").className="avIndLink_disactive"
			}else{
				document.getElementById("prevZoom").className="avIndLink"
			}
			document.getElementById("nextZoom").className="avIndLink"
		}else{
			if(zoomNow == lastNotEmpty){
				document.getElementById("nextZoom").className="avIndLink_disactive"
			}else{
				document.getElementById("nextZoom").className="avIndLink"
			}
			document.getElementById("prevZoom").className="avIndLink"
		}
	}
}

function setMap(quale){
	myContinent = quale.replace("map_","")
	document.getElementById("map_america").style.display="none"
	document.getElementById("map_sudamerica").style.display="none"
	document.getElementById("map_europa").style.display="none"
	document.getElementById("map_africa").style.display="none"
	document.getElementById("map_asia").style.display="none"
	document.getElementById("map_oceania").style.display="none"
	document.getElementById(quale).style.display="block"
	document.req.selCountry.value = myContinent
	document.getElementById("elencostati").innerHTML = "Loading..."
}
				
function switchMap (quale, come) {
	myContinent = quale.replace("map_","")
	
	/*document.getElementById("map_america").style.zIndex="0"
	document.getElementById("map_sudamerica").style.zIndex="0"
	document.getElementById("map_europa").style.zIndex="0"
	document.getElementById("map_africa").style.zIndex="0"
	document.getElementById("map_asia").style.zIndex="0"
	document.getElementById("map_oceania").style.zIndex="0"
	if(come == "block"){
		document.getElementById(quale).style.zIndex="1"
	}else{
		document.getElementById(quale).style.zIndex="0"
		if(document.req.selCountry.value!="") document.getElementById("map_"+document.req.selCountry.value).zIndex="1"
	}*/
	if(document.req.selCountry.value!=myContinent){
		document.getElementById(quale).style.display=come;
	}
}