
var menu_class = "dropmenu"

initMenu = function() {
	
	//Open current location in menu
	/*
	var loc = window.location.toString().replace(window.location.hash, "");

	var menu_items = getElementsBySelector("#" + menu_id + " a");
	for(var i=0; i<menu_items.length; i++){
		var m = menu_items[i];
		if(m.href == loc && m.className.indexOf("skip") < 0){

			m.className += " selected";
			var p = m.parentNode;
			while(p.id != menu_id){
				if(p.tagName == "LI")
					p.className = "selected";
				p = p.parentNode;
			}
		}
	}*/

	//Set up dropdown/popout menu system
	if (!(document.all&&document.getElementById)) {
		return;
	}
	var nav_items = getElementsBySelector("." + menu_class + " li");
	
	for (i=0; i<nav_items.length; i++) {
		node = nav_items[i];
		if (node.nodeName=="LI") {
			node.onmouseover=function() {
				this.className+=" hover";
			}
			node.onmouseout=function() {
				this.className=this.className.replace(" hover", "");
			}
		 }
	}
}

EventUtils.addEventListener(window,'load',initMenu);


