startList = function() {
	navRoot = document.getElementById("menu");
	var subover = false;

	if (navRoot) {
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					if (subover) {
						this.style.backgroundColor = this.className == 'active' ? "#efefef" : "white";
					} else {
						this.style.backgroundColor = "#f5f5f5";
					}
				}
				node.onmouseout=function() {
					this.style.backgroundColor = this.className == 'active' ? "#efefef" : "white";
				}
			}
			for (j=0; j<node.childNodes.length; j++) {
				newnode = node.childNodes[j];
				if (newnode.nodeName=="UL") {
					for (k=0; k<newnode.childNodes.length; k++) {
						subnode = newnode.childNodes[k];
						if (subnode.nodeName=="LI") {
							subnode.onmouseover=function() {
								subover = true;
								this.style.backgroundColor = "#f5f5f5";
							}
							subnode.onmouseout=function() {
								subover = false;
								this.style.backgroundColor = this.className == 'active' ? "#efefef" : "white";
							}
						}
					}
				}
			}
		}
	}
}

window.onload=startList;