menuDelay = null;

function menuSafeBrowser() {
	if (ie4 || ie5 || ns6) { return true; }
	return false;
}

function hideMenus() {
	var i,e,code;
	cancelHideDelay();
	for (i = menuList.length; i--;) {
		code = menuList[i];
		e = getElement("flyoutDep"+ code);
		if (e) { hideElement(e,true); }
	}
}

function menuOver(code) {
	if (!menuSafeBrowser()) { return; }
	hideMenus();
	if (!code) { return; }
	e = getElement("flyoutDep"+ code);
	if (e) { showElement(e,true); }
}

function menuOut(code) {
	if (!menuSafeBrowser()) { return; }
	hideMenusDelayed();
}

function menuItemOver(e,highlight,highlightclass) {
	if (!menuSafeBrowser()) { return; }
	if (typeof highlight == "undefined") { highlight = true; }
	if (typeof highlightclass == "undefined") { highlightclass = "menuOver"; }
	cancelHideDelay();
	if (highlight) { e.className = highlightclass; }
}

function menuItemOut(e,highlightclass) {
	if (!menuSafeBrowser()) { return; }
	if (typeof highlightclass == "undefined") { highlightclass = "menu"; }
	e.className = highlightclass;
	hideMenusDelayed();
}

function hideMenusDelayed() {
	if (!menuSafeBrowser()) { return; }
	window.clearTimeout(menuDelay);
	menuDelay = window.setTimeout("hideMenus()",1000);
}

function cancelHideDelay() {
	window.clearTimeout(menuDelay);
}

function navigate(url) {
	window.location.href = url;
}

function ac() { return ("ac="+ (Math.floor((Math.random() * 900000)) + 100000)); }
