var menuHideTimeout = Array();

function showMenu(menuID) {
	var menuObj = document.getElementById(menuID);
	menuObj.style.display = 'block';
	if(menuHideTimeout[menuID] != null) {
		clearTimeout(menuHideTimeout[menuID]);
	}
}

function hideMenu(menuID) {	
	if(menuHideTimeout[menuID] != null) {
		clearTimeout(menuHideTimeout[menuID]);
	}
	menuHideTimeout[menuID] = setTimeout("performMenuHide('"+menuID+"')",300);
}

function performMenuHide(menuID) {
	var menuObj = document.getElementById(menuID);
	menuObj.style.display = 'none';
}
