/* MAIN NAVIGATION */

function startMenu(ulId) {
	var ulRoot = document.getElementById(ulId); // ulNav

	for (i=0; i<ulRoot.childNodes.length; i++) {
		liNode = ulRoot.childNodes[i];

			for(j=0; j<liNode.childNodes.length; j++) {
				tabNode = liNode.childNodes[j];

					if(tabNode.nodeName=="TABLE") {
						tabNode.onmouseover=function() {
							this.className+=" over";
						}
						tabNode.onmouseout=function() {
							this.className=this.className.replace("over", "");
						}
					}
			}
		}
}



/* SUB NAVIGATION */

function liOver(node) {

	if(node.nodeName=="LI") {
		node.onmouseover=function() {
			this.className+="over";
		}
		node.onmouseout=function() {
			this.className=this.className.replace("over", "");
		}
	}
}


function dropMenu(menuName) {
	
	var ulRoot = document.getElementById(menuName);

	for (i=0; i<ulRoot.childNodes.length; i++) {
		liNode = ulRoot.childNodes[i];
		liOver(liNode);

		for(j=0;  j<liNode.childNodes.length; j++) {
			tabNode = liNode.childNodes[j];
			if(tabNode.nodeName=="TABLE") {
				tabNode.onmouseover=function() {
					this.className+="over";
				}
				tabNode.onmouseout=function() {
					this.className=this.className.replace("over", "");
				}
			}
		}
	}
}


