var layerStyleRef='';
var layerRef='';
var styleSwitch='';
var screenWidth='';
var submenuNumShowing=1;
var menuNumShowing=1;


function ricarica() { window.location.reload(); }
function init() {
	if(navigator.appName=="Netscape" && navigator.appVersion[0]<="4") {
		layerStyleRef="layer.";
		layerRef="document.layers[";
		styleSwitch="]";
		screenWidth=window.innerWidth;
   		setTimeout("window.onresize=ricarica",450);
	} else if (navigator.appName=="Netscape" && navigator.appVersion[0]=="5") {
		layerStyleRef="layer.style.";
		layerRef="document.getElementById(";
		styleSwitch=").style";
		screenWidth=document.body.clientWidth;
		}
	  else if (navigator.appName=="Microsoft Internet Explorer"){
		  re=/MSIE\s5/;
		if (navigator.appVersion.search(re)!=-1){
			layerStyleRef="layer.style.";
			layerRef="document.getElementById(";
			styleSwitch=").style";
			 }
		else {
			layerStyleRef="layer.style.";
			layerRef="document.all[";
			styleSwitch="].style";
			screenWidth=document.body.clientWidth;
			 }
   	    }
	  else {
	  	layerStyleRef="layer.style.";
		layerRef="document.getElementById(";
		styleSwitch=").style";

	  }
}

function hideLayer(layerName) {
	eval(layerRef+'"'+layerName+'"'+styleSwitch+'.visibility="hidden"');
}

function showLayer(layerName,x,y) {
	eval(layerRef+'"'+layerName+'"'+styleSwitch+'.left="'+x+'px"');
	eval(layerRef+'"'+layerName+'"'+styleSwitch+'.top="'+y+'px"');
	eval(layerRef+'"'+layerName+'"'+styleSwitch+'.visibility="visible"');
}