logoOff = new Image();
logoOff.src = "/images/vimmbutton.png";
logoOn = new Image();
logoOn.src = "/images/menu/new/home5.gif";
logoShaded = new Image();
logoShaded.src="/images/vimmbutton2.png"

var selected;
var menuTip;
var menuTip2;
var urlstring = new Array(null, null, null, null);
var text = new Array();
text['manual'] = 'Hundreds of full-color manuals for viewing or download';
text['vault'] = 'Data, codes, reviews, & more for thousands of games';
text['store'] = 'Buy classic games, consoles, & accessories online';
text['emulate'] = 'The newest and greatest console emulators';
text['links'] = 'Browse the free for all links or add your own';
text['message'] = 'Got a question?  Comment?  Come on in';

function off(linkID) {
	menuTip.style.visibility = "hidden";
/*
	if (document.images["logo"].style.opacity)
		document.images["logo"].style.opacity = 1;
	if (document.images["logo"].filters)
		document.images["logo"].filters.alpha.opacity = 100;
*/
	document.images["logo"].src = logoOff.src;
	window.status = '';
}

function on(linkID, oldLogo) {
	menuTip = document.getElementById("menuTip");
	menuTip2 = document.getElementById("menuTip2");
	if (!text[linkID] || oldLogo)
		return;
	menuTip2.innerHTML = text[linkID];
/*
	if (document.images["logo"].style.opacity)
		document.images["logo"].style.opacity = .5;
	if (document.images["logo"].filters)
		document.images["logo"].filters.alpha.opacity = 50;
*/
	document.images["logo"].src = logoShaded.src;
	menuTip.style.visibility = "visible";
}

function select(linkID, skipReset) {
	if (selected && linkID != selected && !skipReset)
		document.images[selected].src = eval(selected + "Off.src");
	if (!skipReset)
		selected = linkID;
	document.images[linkID].src = eval(linkID + "Click.src");
}

function addToMenu(id, href, menu, menuBottom, newText) {
	var newLi = document.createElement('li');
	var newA = document.createElement('a');
	newLi.setAttribute('id', id);
	newA.setAttribute('href', href);
	newA.setAttribute('onMouseOver', "on('" + id + "')");
	newA.setAttribute('onMouseOut', "off('" + id + "')");
	menu.insertBefore(newLi, menuBottom);
	newLi.appendChild(newA);
	if (newText && !text[id])
		text[id] = newText;
}

function showSubMenu() {
	document.getElementById('subMenu').style.display = '';
	document.getElementById('menuDivider1').style.display = 'block';
	document.getElementById('menuDivider2').style.display = 'block';
}
