// JavaScript Document

startList = function() {
	//alert('function called');
	if (document.all && document.getElementById) {
		//alert('if statement called');
		var collegeNav = document.getElementById("college-nav");
		var campusNav = document.getElementById("campus-nav");
		var communityNav = document.getElementById("community-nav");
		var quicklinksRoot = document.getElementById("quicklinks-nav");
		
		for (i = 0; i < collegeNav.childNodes.length; i++) {
			node = collegeNav.childNodes[i];
			if (node.nodeName == "LI") {
				node.onmouseover=function() {
					this.className += " over";
				}
				node.onmouseout = function() {
					this.className = this.className.replace(" over", "");
				}
			}
		}
		for (i = 0; i < campusNav.childNodes.length; i++) {
			node = campusNav.childNodes[i];
			if (node.nodeName == "LI") {
				node.onmouseover=function() {
					this.className += " over";
				}
				node.onmouseout = function() {
					this.className = this.className.replace(" over", "");
				}
			}
		}
		for (i = 0; i < communityNav.childNodes.length; i++) {
			node = communityNav.childNodes[i];
			if (node.nodeName == "LI") {
				node.onmouseover=function() {
					this.className += " over";
				}
				node.onmouseout = function() {
					this.className = this.className.replace(" over", "");
				}
			}
		}
		for (i = 0; i < quicklinksRoot.childNodes.length; i++) {
			node = quicklinksRoot.childNodes[i];
			if (node.nodeName == "LI") {
				node.onmouseover=function() {
					this.className += " over";
				}
				node.onmouseout = function() {
					this.className = this.className.replace(" over", "");
				}
			}
		}		
	}
}

window.onload=startList;