var lastMNU = 1;

function menuOver(id)  {
 document.getElementById("menu" + id).className = "menu-item1";
}
function menuOut(id)  {
 document.getElementById("menu" + id).className = "menu-item";
}

function showSub(id,top)  {
 if(subpage == 1)  { 
   left = 171;
  }
 else {
  left = ((document.body.clientWidth - 780)/2) + 316;
  top1 = ((document.body.clientHeight - 265)/2);
  top = top + top1;
  }
 document.getElementById("submenu" + id).style.left = left;
 document.getElementById("submenu" + id).style.top = top;
 document.getElementById("submenu" + id).style.visibility = "visible";
}

function leaveLayer (id) {
 document.getElementById("submenu" + id).style.visibility = "hidden";
 document.getElementById("submenu" + id).style.top = -10;
 menuOut(lastMNU);
}

function leave(id,subid) {
 menuOut(id);
 lastMNU = id;
 LayerTimer = setTimeout ("leaveLayer(" + subid + ")", 50);
}

function enter(id)  {
 menuOver(lastMNU);
 clearTimeout (LayerTimer);
 LayerTimer = 0;
}

function subOver(subid,id)  {
 document.getElementById("sub" + subid + id).className = "submenu-item1";
}
function subOut(subid,id)  {
 document.getElementById("sub" + subid + id).className = "submenu-item";
}

function focusImage(path)  {
 window.open(path,"focus","toolbar=no; height=450; width=580;");
}
