document.getLayer = function(id) {
	return (document.getElementById) ? document.getElementById( id ) : (document.all) ? document.all[ id ] : false;
}

var tdObj = false;

function showMenu(obj,strStat) {
	if (!isProducts) mouseOverSideNav(tdObj = obj,strStat);
	var layer = document.getLayer("prod_menu");

	if (layer && layer.style) {
		if (layer.timer) clearTimeout(layer.timer); layer.style.visibility = 'visible';
	}
}

function hideMenu() {
	var layer = document.getLayer("prod_menu");
	if ( layer && layer.style ) {
		// layer.timer = setTimeout("doHideMenu(" + (isProducts ? "false" : "true") + ");", 700);
		layer.timer = setTimeout( "doHideMenu()", 700 );
	}
}

function doHideMenu() {
	if ( tdObj && !isProducts ) mouseOutSideNav(tdObj);
	// if (tdObj) mouseOutSideNav(tdObj);
	var layer = document.getLayer("prod_menu");

	if (layer && layer.style) {
		layer.style.visibility = 'hidden';
	}
}

function mouseOverSideNav(obj,strStat) {
	if (tdObj && tdObj != obj) doHideMenu();
	window.status = strStat;

	if (obj.style) {
		obj.style.color = "#a53829";
		obj.style.backgroundColor = "#ecd3b0";
	}
}

function mouseOverMenuNav(obj,strStat) {
	window.status = strStat;

		if (obj.style) {
			obj.style.color = "#a53829";
			obj.style.backgroundColor = "#ecd3b0";
		}

}

function mouseOutSideNav(obj) {
	window.status = "";

	if (obj.style) {
		obj.style.color = "#ffffff";
		obj.style.backgroundColor = "#647793";
	}
}

function mouseOverTopNav(obj,strStat) {
	window.status = strStat;

	if (obj.style) {
		obj.style.color = "#000000";
		obj.style.backgroundColor = "#efd3b5";
		obj.style.border = "1px #ffffff solid";
	}
}

function mouseOutTopNav(obj) {
	window.status = "";

	if (obj.style) {
		obj.style.color = "#ffffff";
		obj.style.backgroundColor = "#353535";
		obj.style.border = "1px #353535 solid";
	}
}