// $Id$
var menubar = new Object();
menubar.init = function() {
	if (document.getElementById) {
		var root = document.getElementById("menubar-main");
		if (root) {
			if (root.childNodes) {
				for (i = 0; i < root.childNodes.length; i++) {
					node = root.childNodes[i];
					if (node.nodeName == "LI" || node.nodeName == "li") {
						//if (!node.className || node.className.search(/active/) < 0) {
							node.onmouseover = function() {
								if (this.className) this.className = this.className.replace(" hout", " hover");
								else this.className = "hover";
								//if (menubar.active) menubar.active.className = menubar.active.className.replace(" active", "");
							}
							node.onmouseout = function() {
								if (this.className) this.className = this.className.replace(" hover", " hout");
								else this.className = "hout";
								if (menubar.active) menubar.active.className += " active";
							}
						//} else {
							//if (node.parentNode.id == "menubar") menubar.active = node;
						//}
					}
				}
			}
		}
	}
}
menubar.onload = (window.onload) ? window.onload : function () {};
window.onload = function () {menubar.onload(); menubar.init()};
