// JavaScript Document

/* configuration settings */
var hideDelay = 500; // amount of time to wait before hiding the current menu, in milliseconds

var showing = false;
var currentlyShowing;
var hide_timeout;

function showMenu(menuID) {
	if (showing) {
		cancelHide();
		_hideMenus();
	}
	
	currentlyShowing = menuID;
	showing = true;
	
	thisMenu = document.getElementById(menuID);
	
	thisMenu.style.visibility = "visible";
}

function hideMenu(){
	hide_timeout = setTimeout('_hideMenus()', hideDelay);
}
 
function hideMenusNow(){
	if (showing) {
		cancelHide();
		_hideMenus();
	}
}
 
function cancelHide(){
	clearTimeout(hide_timeout);
}

function _hideMenus(){
	if (showing) document.getElementById(currentlyShowing).style.visibility = 'hidden';
	showing = false;
}

function fwLoadMenus(){return false;}