var lastMenu = null;
var tm = null;

function showMenu(num)
{
	hideMenu();
	var obj = $('SubMenu' + num);
	obj.style.display = "block";
	var pos = Element.positionedOffset($('ParentMenu' + num));
//	obj.style.left = pos.left;
	obj.style.top = pos.top -1;
	lastMenu = num;
}

function hideMenu()
{
	if (lastMenu != null) {
		$('SubMenu' + lastMenu).style.display = "none";
		lastMenu = null;
		if (tm != null) {
			clearTimeout(tm);
			tm = null;
		}
	}
}