	function openMenu(movX,event,id)
	{
		var xPos = findPosXByName(id+"Menu");
		var obj = document.getElementById(id);

		
		var xPosInt = 0;
		
		try {
			xPosInt = parseInt(xPos)
		} catch (ex) {
			xPosInt = 0;
		}
		
		try {
			movXInt = parseInt(movX);
		} catch (ex) {
			movXInt = 0;
		}
		
		xPosInt++;
		xPosInt = xPosInt + movXInt;
		
		if (obj == "undefined" || obj == null)
		{
			return;
		}

		obj.style.left = xPosInt+"px";
		
		obj.style.visibility = "visible";	
	}
	
	function tidyAll()
	{
		var menudiv = document.getElementById("menudiv");
		
		for (i = 0; i < menudiv.childNodes.length; i++)
		{
			var menuitemName = menudiv.childNodes[i].id;
			
			if (menuitemName != "undefined" && menuitemName != null)
			{
				menuitemName = menuitemName.substring(0,menuitemName.length - 4);
				var submenuitem = document.getElementById(menuitemName);
				
				if (submenuitem != null && submenuitem != "undefined")
				{
					submenuitem.style.visibility = "hidden";
				}
			}		
		}
	}
	
	function tidyMenu(id)
	{
		document.getElementById(id).style.visibility = "hidden";
	}
