// JavaScript Document

/*topNav = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("topmenu");
		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", "");
				}
			}
		}
	}
}

sideNav = function() {
	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", "");
				}
			}
		}
	}
}

loadFunctions=function() {
	topNav();
	sideNav();
}
window.onload=loadFunctions;*/


function expandMenu(listName) {
	var control=document.getElementById(listName);
	var listElements=control.getElementsByTagName("li");
	
	for(var i=0; i<listElements.length; i++) {
		//EXPAND MENU
		listElements[i].onmouseover=function() {
				var uls=this.getElementsByTagName("ul");
				for(var n=0; n<uls.length; n++) {
					if(n==0) {
						uls[n].style.display="block";
					}
					
				}
			}
		//CLOSE MENU	
		listElements[i].onmouseout=function() {
			var uls=this.getElementsByTagName("ul");
				for(var n=0; n<uls.length; n++) {
					if(n==0) {
						uls[n].style.display="none";
					}
					
				}
		}
	}
}