
function findPosY(obj)
{
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
}

  
function findPosX(obj)
{
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
}

function showmenu(obj)
{
	var div = document.getElementById(obj.id+"_");
	var x = findPosX(obj);
	var y = findPosY(obj);
	div.style.top = (y + 22) + "px";
	div.style.left = (x - 1) + "px";
	div.style.display="";
}
function showmenu2(id, act)
{
	document.getElementById(id).style.display = "";
	var newid = id.substr(0, id.length-1);
	if (newid == act)
		document.getElementById(newid).className="topmenua";
	else
		document.getElementById(newid).className="topmenu_hover";
}
function hidemenu(obj)
{
	document.getElementById(obj.id+"_").style.display = "none";
}
function hidemenu2(id, act)
{
	document.getElementById(id).style.display = "none";
	var newid = id.substr(0, id.length-1);
	if (newid == act)
		document.getElementById(newid).className="topmenua";
	else
		document.getElementById(newid).className="topmenu";
}

function highlight2(obj, act)
{
	if (obj.id == act)
		obj.className = "topmenua";
	else
		obj.className = "topmenu_hover";
}

function downlight2(obj, act)
{
	if (obj.id == act)
		obj.className = "topmenua";
	else
		obj.className = "topmenu";
}