var ident;

if (navigator.appName == "Microsoft Internet Explorer") {
	ident = 130;
} else {
	ident = 130;
}

function getUL (node) {
	for (var e = 0; e < node.childNodes.length; e++) {
		if (node.childNodes[e].nodeName == 'UL') {
			return node.childNodes[e];
		}
	}
}

/* Fix FireFox Bug */
function hideAllUL(obj) {
	var nodes = obj.parentNode.childNodes;
	for (var u = 0; u < nodes.length; u++) {
		if (nodes[u].nodeName == 'LI' && nodes[u] != obj) {
			var ul = getUL(nodes[u]);
			if (ul) {
				ul.style.display = 'none';
			}
		}
	}
}

function initUL (navRoot, _ident) {
	var node, child;

	if (navRoot != null) {
		for (var i = 0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
	
			if (node.nodeName == "LI") {
				child = getUL(node);
	
				if (child != null) {
					child.style.left = _ident;
	
					node.onmouseover = function() {
						var ul = getUL(this);
						ul.style.display = 'block';
	
						/* Fix FireFox Bug */
						hideAllUL(this);
						hideAllSelect();
					}
					node.onmouseout = function() {
						var ul = getUL(this);
						ul.style.display = 'none';
						showAllSelect();
					}
	
					initUL (child, ident);
				}
			}
		}
	}
}

startList = function() {
	var navRoot;

	navRoot = document.getElementById("nav");
	initUL(navRoot, 0);
}

