/* 
Note: VC May 2009
Moved from menu_primary.rm to here. 
Also modify to use proper onload call so as to be more compatible with other JS files
 */

window.onload = function () {
  startList();
}; 

startList = function() {

	//alert(navigator.userAgent);
	if ((navigator.userAgent.indexOf("MSIE")!=-1) && (navigator.userAgent.indexOf("Mac")!=-1)) {
		//mac on ie can't have the drop down menu
	}
	else{
		if (document.all&&document.getElementById) {
			navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}
}
//window.onload=startList;

function showMenu(value){
	if(document.all && document.all.selectMenuOuter){
		if(value){
			//document.all.selectMenuOuter.filters["revealTrans"].apply();
			document.all.categories.style.visibility = "hidden";
			//document.all.dropDownMenu.style.display = "block";
			if (document.all.sortby) {
				document.all.sortby.style.visibility = "hidden";
			}
			if (document.all.maxPage) {
				document.all.maxPage.style.visibility = "hidden";
			}
		}
		else{
			//document.all.dropDownMenu.style.display = "none";
			document.all.categories.style.visibility = "visible";
			if (document.all.sortby) {
				document.all.sortby.style.visibility = "visible";
			}
			if (document.all.maxPage) {
				document.all.maxPage.style.visibility = "visible";
			}
		}
	}
}