navHover = function() {
	var lis = document.getElementById("navmenu-v").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className="";
			/*this.className.replace(new RegExp(" iehover"), "");*/
		}
		lis[i].onclick=function(){
			
			var lis = document.getElementById("navmenu-v").getElementsByTagName("LI");
			for(var j=0; j<lis.length; j++){
				if(this.className!="ieclick"){
					/* (1.mal geklickt) className wird sp?ter auf ieclick gesetzt
					alle anderen li's auf ursprung, au?er die Elternelemente */
					var hover=false;
					if(this == lis[j].parentNode.parentNode){
						hover =true;
					}
					if(this==lis[j].parentNode.parentNode.parentNode.parentNode){
						hover=true;
					}
					if(this==lis[j].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode){
						hover=true;
					}
					
					if(hover==false){
						lis[j].onmouseover=function(){
							this.className= "";
						}
						lis[j].onmouseout=function(){
							this.className="";
						}
						lis[j].className="";
					}
					
				}
				else{
					/* 2. mal geklickt alles auf ursprung */
					lis[j].onmouseover=function(){
						this.className=" iehover";
					}
					lis[j].className="";
					this.className=" ieclick";
					
				}
			}
			
			if(this.className=="ieclick"){
				/* 2. mal geklickt alles auf ursprung */
				this.className="";
				this.onmouseout =  function(){
					this.className="";
				}
				this.onmouseover = function(){
					this.className=" iehover";
				}
			}
			else{
				/* 1. mal geklickt setze alles auf ieclick*/
				this.className=" ieclick";
				this.onmouseover=function(){
					this.className=" ieclick";
				}
				this.onmouseout = function(){
					this.className= " ieclick";
				}
			}
			
		}
	}
}



if (window.attachEvent){window.attachEvent("onload", navHover); }
else if(window.addEventListener){ window.addEventListener("load", navHover,true); }
