function parentPosition(ch) {

var valueT = 0, valueL = 0;

do
{
valueT += ch.offsetTop || 0;
valueL += ch.offsetLeft || 0;
ch = ch.offsetParent;
}
while (ch);
return [valueL, valueT];

}

function menu() {

navRoot = document.getElementById("menu");
for (i=0; i<navRoot.childNodes.length; i++)
{
node = navRoot.childNodes[i];
if (node.nodeName=="LI")
{
node.onmouseover=function()
{
this.className+=" over";

}
node.onmouseout=function()
{
this.className=this.className.replace("over", "");
}



tagA = document.getElementsByTagName("UL");
for(a = 0; a < tagA.length; a++)
{
if (tagA[a].className == 'submenu')
{
parentPosition(tagA[a]);
}

}

}
}

 

}

function allf() {
menu();
}
window.onload=allf;