/* spezielles Javascript für Dropdown-Navigationen */

function addNaviMouseOver(navRoot) {
	for (var 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", "");
			}
		}
		if (!node.childNodes) continue;
		for (var j=0; j<node.childNodes.length; j++) {
			subnode = node.childNodes[j];
			if (subnode.nodeName=="UL") addNaviMouseOver(subnode);
		}
	}
}

startList = function() {
	if (document.all && document.getElementById) {
		var allElems = document.getElementsByTagName('UL');
		for (var i=0; i<allElems.length; i++) {
			var thisElem = allElems[i];
			if (!thisElem.className) continue;
			if ((thisElem.className.indexOf('b3navi_type_hdropdown') != -1) || (thisElem.className.indexOf('b3navi_type_vdropdown') != -1)) {
				addNaviMouseOver(thisElem);
			}
		}
	}
}

addLoadEvent(startList);
