//
// suckerfish.js
//
// JavaScript code for SuckerFish CSS menus
//

// Suckerfish script for IE-compatible drop-down CSS menus
startList = 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", "");
				}

				// Find and set 2nd level LI elements
				for (j=0; j<node.childNodes.length; j++) {
					node2 = node.childNodes[j];
					if (node2.nodeName=="UL") {
						for (k=0; k<node2.childNodes.length; k++) {
							node3 = node2.childNodes[k];
							if (node3.nodeName=="LI") {
								node3.onmouseover=function() {
									this.className+=" over2";
								}
								node3.onmouseout=function() {
									this.className=this.className.replace(" over2", "");
								}
							}
						}
					}
				}


			}
		}
	}
}

window.onload=startList;

