//<script>
var mF = "";
var mT = 500;
var	show = "visible";
var	hide = "hidden";

function MenuRootOpen(obj)
{
	if (mF)
	{
		eval(mF);
		clearTimeout(mT);
	}
	ShowHide(obj.id, show);
}

function MenuSwap(elementID, vizProp)
{
	if (vizProp == show)
	{
		if (mF)
		{
			eval(mF);
			clearTimeout(mT);
		}
	}
	else
	{
		mF = "";
	}
	ShowHide(elementID, vizProp);
}

function MenuTimeOff(elementID, childID)
{
	mF = "MenuSwap('" + elementID + "', '" + childID + "', hide)";
	mT = setTimeout(mF, 200);
}

function ShowHide(elementID, vizProp)
{
	childID = 'child_' + elementID;
	element = document.getElementById(elementID);
	child = document.getElementById(childID);
	
	if (child)
	{
		child.style.visibility = vizProp;
		child.style.left = element.getBoundingClientRect().left - 3;
	}
}
