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];}}
}//fine function

function chimg(img_name, img_path){
	var objImg;
	objImg=eval("document."+img_name);
	objImg.src=img_path;			
}//fine function

function getRisoluzione(){
   return screen.width + "x" + screen.height;
}//fine function

function ObjLivello(livello){
  var objLiv,objLivss,objLivello,livTop,livHeight,livLeft,livWidth,nome;     
  this.nome=livello;          
  if (document.getElementById){ // NN>=6; MSIE>5	
    if (eval("document.getElementById('" + livello + "')")){	   	    
		  objLiv=eval("document.getElementById('" + livello + "')");
		  this.objLivss=objLiv;
		  this.livTop=parseInt(objLiv.style.top);
		  this.livHeight=parseInt(objLiv.offsetHeight);
		  this.livLeft=parseInt(objLiv.style.left);
		  this.livWidth=parseInt(objLiv.offsetWidth);			  		  
		  this.objLivello=objLiv.style;
	  }//fine if		
	}	
	else if (document.layers){ // NN<6	
	  if (eval("document.layers['" + livello + "']")){
		  objLiv=eval("document.layers['" + livello + "']");
		  this.objLivss=objLiv;
		  this.livTop=parseInt(objLiv.top);
			this.livHeight=parseInt(objLiv.clip.height);
		  this.livLeft=parseInt(objLiv.left);
		  this.livWidth=parseInt(objLiv.clip.width);			  
		  this.objLivello=objLiv;		  
	  }//fine if
	}
	else if (document.all){ // MSIE		
	  if (eval("document.all['" + livello + "']")){
		  objLiv=eval("document.all['" + livello + "']");
		  this.objLivss=objLiv;
		  this.livTop=parseInt(objLiv.style.top);
		  this.livHeight=parseInt(objLiv.offsetHeight);
		  this.livLeft=parseInt(objLiv.style.left);
		  this.livWidth=parseInt(objLiv.offsetWidth);		  
		  this.objLivello=objLiv.style;		  
	  }//fine if		
	}
		
}//fine function

function getObjLivello(livello){
    
  var ilLivello,oggettoLivello;   
  
  oggettoLivello= new ObjLivello(livello);
  ilLivello=oggettoLivello.objLivello;
  
	return ilLivello;
}//fine function

function vai(urlPag){		
  if(urlPag!=""){	 
	  document.frmnaviga.target="corpo";
    document.frmnaviga.action=urlPag;
    document.frmnaviga.submit();	
  }//fine if
}//fine function

/*
function setLin(vlin){		 
	if(vlin!=""){	 
    document.frmnaviga.glin.value=vlin;
    document.frmnaviga.submit();
  }//fine if
}//fine function
*/

/*function setLin(){
	if(document.frmnaviga.glin.value!="eng")
	  document.frmnaviga.glin.value="eng";
	else
	    document.frmnaviga.glin.value="ita";
	document.frmnaviga.target="_top";    
  document.frmnaviga.action="home.php";    
  document.frmnaviga.submit();		 
}//fine function
*/

function setLin(vlin){	
/*if(document.frmnaviga.glin.value!="eng")	  
 document.frmnaviga.glin.value="eng";	else	    
 document.frmnaviga.glin.value="ita";*/	

//return false;
 switch (vlin) {		
 case "ita": 
 top.location.href = 'http://www.goppioncaffe.it/home.php?glin=ita';
 //document.frmnaviga.glin.value = "eng";			 
 break; 
 case "eng":			
 top.location.href = 'http://www.goppioncaffe.it/home.php?glin=eng';
 //document.frmnaviga.glin.value = "eng";			
 break;		
 case "de":			
 top.location.href = 'http://www.goppioncaffe.de/home.php?glin=de';	
 //document.frmnaviga.glin.value = "ita";
 break;		
 case "hu":		
 top.location.href = 'http://www.goppioncaffe.de/home.php?glin=hu'
 //window.location.href = 'http://www.goppioncaffe.de/home.php?glin=hu';	
 //document.frmnaviga.glin.value = "eng";			
 break;		
 default:			
 top.location.href = 'http://www.goppioncaffe.it/home.php?glin=ita';
 //document.frmnaviga.glin.value = "ita";			
 break;	
 }	
 
 //document.frmnaviga.target="_top";      
 //document.frmnaviga.action="home.php";      
 //document.frmnaviga.submit();		 
 }//fine function 
 
 function showLang()	{
 if(document.getElementById('langrow').style.visibility=='hidden')			
 document.getElementById('langrow').style.visibility = 'visible';		
 else
 document.getElementById('langrow').style.visibility='hidden';	
 }