function showSub(id,top)  {
 if(subpage == 0)  {
   left = ((document.body.clientWidth - 780)/2) + 415;
   top1 = ((document.body.clientHeight - 265)/2);
   top = top + top1;
  }
  else {
   left = 162;
   top = top + 48;
   }
 document.getElementById("submenu" + id).style.left = left;
 document.getElementById("submenu" + id).style.top = top;
 document.getElementById("submenu" + id).style.visibility = "visible";
}

function leaveLayer (id,subid) {
 document.getElementById("submenu" + subid).style.visibility = "hidden";
 document.getElementById("submenu" + subid).style.top = -10;
 document.getElementById("mnu" + id).className = "menu-item";
}

function leave(id,subid) {
 LayerTimer = setTimeout ("leaveLayer(" + id + "," + subid + ")", 50);
}

function enter(id)  {
 document.getElementById("mnu" + id).className = "menu-itemx";
 clearTimeout (LayerTimer);
 LayerTimer = 0;
}