//This is for the funtions to be able to know if the focus is on the specific menu
//Make sure the names for the menus are of the form
//            somenameMenu
//and add the variables to this script to keep up with their focus
//            somenameMenuFocus


var eyewearMenuFocus = false;
var examMenuFocus = false;

//when mouseover the menu change its visibility to visible
function onMouseOverMenu(menuName)
{
  eval(menuName + "Focus = true;");
 	document.getElementById(menuName).style.visibility="visible";
}

//when mouseout of menu change it to hidden after a TimeOut
function onMouseOutOfMenu(menuName)
{
 eval(menuName + "Focus = false;");
 setTimeout("closeMenu(\"" + menuName + "\")",500);
}
 
//closes menu after time out only if the focus has not been set to it again
function closeMenu(menuName)
{
 if(eval(menuName + "Focus") == false)
  document.getElementById(menuName).style.visibility="hidden";
} 
