
Menu = {timer:null, current:null};
Menu.getStyle = function (name) {
	if (document.getElementById) {
		return document.getElementById(name).style;
	} else {
		if (document.all) {
			return document.all[name].style;
		} else {
			if (document.layers) {
				return document.layers[name];
			}
		}
	}
};
Menu.show = function (name) {
	if (this.timer) {
		clearTimeout(this.timer);
	}
	this.getStyle(name).visibility = "visible";
	this.current = name;
};
Menu.hide = function () {
	Menu.clear();
	this.timer = setTimeout("Menu.doHide()", 100);
};
Menu.doHide = function () {
	if (this.current) {
		this.getStyle(this.current).visibility = "hidden";
		this.current = null;
	}
};

Menu.clear = function () {
	document.all["imgHome"].src = "/images/menu_home.gif";
	document.all["imgDownload"].src = "/images/menu_buy.gif";
	document.all["imgGuide"].src = "/images/menu_guide.gif";
	document.all["imgCommunity"].src = "/images/menu_community.gif";
	document.all["imgSupport"].src = "/images/menu_support.gif";
	document.all["imgLegal"].src = "/images/menu_legal.gif";
};

Menu.resetGlow = function (menuItem) {
	if (menuItem == "home") {
		document.imgHome.src = "/images/home2.gif";
	}
	if (menuItem == "download") {
		document.imgDownload.src = "/images/download2.gif";
	}
	if (menuItem == "guide") {
		document.imgGuide.src = "/images/game guide2.gif";
	}
	if (menuItem == "community") {
		document.imgCommunity.src = "/images/community2.gif";
	}
	if (menuItem == "support") {
		document.imgSupport.src = "/images/support2.gif";
	}
	if (menuItem == "legal") {
		document.imgLegal.src = "/images/legal2.gif";
	}
 	//document.imgGuide.src='/images/menu_buy.gif'; 	
};
