﻿window.onerror = null; 
var menuActive = 0; 
var menuOn = 0; 
var onLayer; 
var timeOn = null; 
var item;

function showLayer(layer,a) { 
if(timeOn != null) {
clearTimeout(timeOn);
hideLayer(onLayer);
} 
obj = document.getElementById(layer);
if(a=="a1") obj.style.left=312+"px";
if(a=="a2") obj.style.left=312+"px";
if(a=="a3") obj.style.left=575+"px";
if(a=="a4") obj.style.left=518+"px";
if(a=="a5") obj.style.left=575+"px";
obj.style.visibility="visible";
onLayer=layer
}

function hideLayer(layer) {
var obj = document.getElementById(layer);
if (menuActive == 0) obj.style.visibility="hidden";
}

function startTimer() {
timeOn = setTimeout("btnOut()",600);
}

function btnOut(layer) {
if(menuActive==0) hideLayer(onLayer)
}

function menuOver(itemName,ocolor) {
item=itemName;
itemName.style.backgroundColor = ocolor;
clearTimeout(timeOn);
menuActive = 1;
}

function menuOut(itemName,ocolor) {
if(item) {
itemName.style.backgroundColor = ocolor;
timeOn = setTimeout("hideLayer(onLayer)", 100);
menuActive = 0;
}
}

