document.writeln("<div id=\"MenuLayer\" style=\"visibility:hidden; position:absolute; left:0px; top:0px; width:0px; height:0px;\"></div>");
document.onmouseout = Menu_CloseLayer;
function ShowMenu(main,width)
{
  Menu_ShowLayer();
  MenuLayer.innerHTML = "<table class=\"layers\" width=" + width + " cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=FFFFFF style=\"padding:8px\">" + main + "</td></tr></table>";
}
function Menu_ShowLayer()
{
  var vSrc = window.event.srcElement;
  var vParent = vSrc.offsetParent;
  var T    = 0;
  var L    = 0;
  h = vSrc.offsetHeight;
  w = vSrc.offsetWidth;
  l = vSrc.offsetLeft;
  t = vSrc.offsetTop;
  while(vParent.tagName.toUpperCase()!="BODY")
  {
    l += vParent.offsetLeft;
    t += vParent.offsetTop;
    vParent = vParent.offsetParent;
  }
  MenuLayer.style.visibility = "visible";
  MenuLayer.style.top        = t + h + 5 - vSrc.offsetHeight - 20;
  MenuLayer.style.left       = l + vSrc.offsetWidth + 10;
}
function Menu_CloseLayer()
{
  var mX = window.event.clientX + document.body.scrollLeft;
  var mY = window.event.clientY + document.body.scrollTop;
  if ((mX<parseInt(MenuLayer.style.left)) || (mX>parseInt(MenuLayer.style.left)+MenuLayer.offsetWidth) || (mY<parseInt(MenuLayer.style.top)-h) || (mY>parseInt(MenuLayer.style.top)+MenuLayer.offsetHeight))
    MenuLayer.style.visibility = "hidden";
}
