
setupListHoverFor = function(elt, recurse) {

    for (var i = 0; i < elt.childNodes.length; i++) {

	var node = elt.childNodes[i];

	if (node.nodeName == "LI") {

            if (recurse) {

                for (var j = 0; j < node.childNodes.length; ++j) {

                    var subnode = node.childNodes[j];

                    if (subnode.nodeName == "UL") {
                        setupListHoverFor(subnode, false);
                    }
                }
            }

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

setupListHover = function() {
    if (document.all && document.getElementById) {
	var navRoot = document.getElementById("nav");
	setupListHoverFor(navRoot, true);
    }
}
    
window.onload = setupListHover;


