window.onerror = null;

 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);

 var NS6 = (document.getElementById && !document.all) ? true : false;

 var NS4 = (bName == "Netscape" && bVer >= 4);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 var fixForms = NS3 || NS4
 var menuActive = 0
 var menuOn = 0
 var onLayer
 var timeOn = null

if (NS4 || IE4) {
	if ((navigator.appName == "Netscape")) {
		layerStyleRef="layer.";
		layerRef="document.layers";
		styleSwitch="";
	}else{
		layerStyleRef="layer.style.";
		layerRef="document.all";
		styleSwitch=".style";
	}
}

function showLayer(layerName){
//	if (downloaded){
	if (NS4 || IE4) {
		if (timeOn != null) {
			clearTimeout(timeOn)
			hideLayer(onLayer)
		}
		if (NS6) {
 			document.getElementById(layerName).style.visibility="visible";
		}else{
			if (NS4 || IE4) {
				eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
			}
					
		}
		onLayer = layerName
	}
//	}
}



function hideLayer(layerName){
//	if (downloaded){
	if (menuActive == 0) {
		if (NS6){
 				document.getElementById(layerName).style.visibility="hidden";
			} else {
		if (NS4 || IE4) {
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		}
		
		}
	}
//	}
}


function btnTimer() {
//	if (downloaded){
	timeOn = setTimeout("btnOut()",1000);
//	}
}



function menuOver(itemName) {
//	if (downloaded){
	clearTimeout(timeOn)
	menuActive = 1
//	}
}


function menuOut(itemName) {
//	if (downloaded){
	menuActive = 0 ;
	timeOn = setTimeout("hideLayer(onLayer)", 400);
//	}
}

function btnOut(layerName) {
//	if (downloaded){
	if (menuActive == 0) {
		hideLayer(onLayer);
	}
//	}
}

