function showLayer(id){
 	 a=document.getElementById(id);
 	 a.style.visibility = "visible";
 	 nav=id.replace('sub','');
 	 setNav(nav);
}
function setNav(nav){
	 b=document.getElementById(nav);
 	b.style.color='#333';
	b.style.border='#333 1px solid';
	b.style.borderBottom='#f8f8f8 1px solid';
	b.style.backgroundColor='#f8f8f8';
	b.style.fontWeight='normal'; 
	b.style.letterSpacing='1px';
}
function restoreNav(nav){
	if(aktivnav!=nav){
		b=document.getElementById(nav);
 	 	b.style.backgroundColor='#fff';
		b.style.border='#fff 1px solid';
	    b.style.fontWeight='normal'; 
	 	b.style.letterSpacing='3px';
	}
}
function hideLayerH(id){
 	 a=document.getElementById(id);
 	 a.style.visibility = "hidden";
 	 nav=id.replace('sub','');
 	 restoreNav(nav);
}
function hideAll(){
	hideLayerH('subprodukte');
	hideLayerH('subdesign');
}


function showLayer(id){
 	 a=document.getElementById(id);
 	 a.style.visibility = "visible";
}




function meOnLoad(){
	hidenavi(document.getElementById('subnavi').firstChild.firstChild,'next');
	hidenavi(document.getElementById('subnavi').firstChild.lastChild,'prev');
}
function hidenavi(elementLi,direction){
	if(elementLi){
		if(direction=='prev'){
			curnode=elementLi.previousSibling; 	
		}else{
			curnode=elementLi.nextSibling; 	
		}
		while(curnode){
			for(x=0;x<curnode.childNodes.length;x++){
				aktnode=curnode.childNodes[x];
				if(aktnode.nodeName=='UL'){
					if(aktnode.id!=activsub){
						aktnode.style.display='none';
					}
				}
			}
			if(direction=='prev'){
				curnode=curnode.previousSibling; 	
			}else{
				curnode=curnode.nextSibling; 	
			}
		}
	}
}
function showsubnavi(elementLi){
		hidenavi(elementLi,'prev');
		hidenavi(elementLi,'next');
		for(x=0;x<elementLi.childNodes.length;x++){
			aktnode=elementLi.childNodes[x];
			if(aktnode.nodeName=='UL')aktnode.style.display='block';
		}
}
