// SimpleMenu 1.1 - (c) 2003 Robert Bares

var offsetT;
var offsetL;
if (document.all)    {n=0;ie=1;ns6=0;}
if (document.getElementById && !document.all)    {n=0;ie=0;ns6=1;}
function ShowMenu(menuid) {
	if (ie) {
		offsetT = findPosY(document.all(menuid+"img"));
		offsetT = offsetT + 19;
		offsetL = findPosX(document.all(menuid+"img"));
		if (menuid != "menu1") offsetL = offsetL + 10;
		document.all(menuid).style.top = offsetT;
		document.all(menuid).style.left = offsetL;
		document.all(menuid).style.visibility = 'visible';
		}
	if (ns6) {
		offsetT = findPosY(document.getElementById(menuid+"img"));
		offsetT = offsetT + 19;
		offsetL = findPosX(document.getElementById(menuid+"img"));
		if (menuid != "menu1") offsetL = offsetL + 10;
		document.getElementById(menuid).style.top = offsetT;
		document.getElementById(menuid).style.left = offsetL;
		document.getElementById(menuid).style.visibility = 'visible';
		}
	}
function HideMenu(menuid) {
	if (ie) document.all(menuid).style.visibility = 'hidden';
	if (ns6) document.getElementById(menuid).style.visibility = 'hidden';
	}

function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
	}

function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
	}