
var curleft = curtop = 0;

function findPos(obj) {
  if (obj.offsetParent) {
    curleft = obj.offsetLeft
    curtop = obj.offsetTop
    while (obj = obj.offsetParent) {
      curleft += obj.offsetLeft
      curtop += obj.offsetTop
    }
  }
  return [curleft,curtop];
}


function show(elid,callerid) {
 p=document.getElementById(elid);
 c=document.getElementById(callerid);
 findPos(c);
 p.style.left = curleft+2+'px';
 p.style.top  = curtop+21+'px';
 p.style.display='block';
}

function hide(elid) {
 p=document.getElementById(elid);
 p.style.display='none';
}

function delayhide(elid) {
 mystr='hide(\''+elid+'\')'
 timer=setTimeout('eval(mystr)',400);
}


o=document.getElementById('prodlink');
o.onmouseover = function() { if (typeof(timer)!='undefined'){clearTimeout(timer)}; show('prodmenu','prodlink'); }
o.onmouseout  = function() { delayhide('prodmenu'); }

o=document.getElementById('prodmenu');
o.onmouseover = function() { clearTimeout(timer); }
o.onmouseout  = function() { delayhide('prodmenu'); }

