var highlighted = false;

/*
function highlightMenu(menu) {
	var element = document.getElementById(menu);
	if (element.className.indexOf("Selected") == -1) {
		element.className += "Selected";
		highlighted = true;
	}
	element.style.cursor = "hand";
	element.style.cursor = "pointer";
}

function unhighlightMenu(menu) {
	if (highlighted) {
		var orgClassName = document.getElementById(menu).className;
		document.getElementById(menu).className = orgClassName.substring(0, orgClassName.length-8);
		highlighted = false;
	}
	
}
*/

function highlightMenu(menu) {
	var element = ($(menu));
	
	if (!element.hasClassName("navHover")) {
		element.addClassName("navHover");
	}
	/*
	These are added directly to the 'navHover' stylesheet declaration.
	
	element.style.cursor = "hand";
	element.style.cursor = "pointer";
	*/
}

function unhighlightMenu(menu) {
	if ($(menu).hasClassName("navHover")) {
		// var orgClassName = document.getElementById(menu).className;
		// document.getElementById(menu).className = orgClassName.substring(0, orgClassName.length-8);
		$(menu).removeClassName('navHover');
	}
	
}

function changePage(location) {
	document.location.href = location;
}


/*function sfHover() {
	var sfEls = document.getElementById("testnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
} */


