
function meOnLoad(){
	//hidesub(document.getElementById('navi').firstChild.firstChild,'next');
	//hidesub(document.getElementById('navi').firstChild.lastChild,'prev');
	breadcrump('visible');
}
function resetAll(elementLi,direction){
	var curnode,aktnode;
	if(elementLi){
		curnode=elementLi 	
		while(curnode){
			resetHover(curnode);
			for(var x=0;x<curnode.childNodes.length;x++){
				aktnode=curnode.childNodes[x];
				if(aktnode.nodeName=='UL'){
					if(aktnode.firstChild){
						resetAll(aktnode.firstChild);
					}
				}
			}
			curnode=curnode.nextSibling; 	
		}
	}
}
function resetHover(elementLi){
	sibling=elementLi;
	while(sibling){
		if(sibling.firstChild.style.backgroundColor!='rgb(255, 255, 255)' && sibling.firstChild.style.backgroundColor!='#fff'  && sibling.firstChild.style.backgroundColor!='#ffffff' )
			setThisNo(sibling.firstChild); 
		sibling=sibling.nextSibling;
	}
}
function resetHover1(elementA){
	if(elementA.style.backgroundColor!='rgb(255, 255, 255)' && elementA.style.backgroundColor!='#fff'  && elementA.style.backgroundColor!='#ffffff' && elementA.style.backgroundImage!="url(fileadmin/probaby.de/images/bg-navi-gelb.gif)")
// && elementA.style.backgroundImage!="url(fileadmin/probaby.de/images/bg-navi-gelb.gif)"
		setThisNo(elementA); 
}
function hidesub(elementLi,direction){
	var curnode,aktnode;
	if(elementLi){
		if(direction=='prev'){
			curnode=elementLi.previousSibling; 	
		}else{
			curnode=elementLi.nextSibling; 	
		}
		while(curnode){
			for(var x=0;x<curnode.childNodes.length;x++){
				aktnode=curnode.childNodes[x];
				if(aktnode.nodeName=='UL'){
					if(aktnode.firstChild){
						//alert(aktnode.firstChild)
						resetSub(aktnode);
						hidesub(aktnode.firstChild,'next');
						hidesub(aktnode.lastChild,'prev');
					}
					aktnode.style.visibility='hidden';
				}
			}
			if(direction=='prev'){
				curnode=curnode.previousSibling; 	
			}else{
				curnode=curnode.nextSibling; 	
			}
		}
	}
}
function resetSub(elementUl){
	sibling=elementUl.firstChild;
	while(sibling){
		setThisNo(sibling.firstChild); 
		sibling=sibling.nextSibling;
	}
}

function resetSibling(elementLi,force){
	sibling=elementLi.previousSibling;
	//alert(sibling);
	while(sibling){
		if((sibling.firstChild.style.backgroundColor!='rgb(255, 255, 255)' && sibling.firstChild.style.backgroundColor!='#fff' && sibling.firstChild.style.backgroundColor!='#ffffff' )|| force)
			setThisNo(sibling.firstChild); 
		sibling=sibling.previousSibling;
	}
	sibling=elementLi.nextSibling;
	while(sibling){
		if((sibling.firstChild.style.backgroundColor!='rgb(255, 255, 255)' && sibling.firstChild.style.backgroundColor!='#fff' && sibling.firstChild.style.backgroundColor!='#ffffff' ) || force)
			setThisNo(sibling.firstChild); 
		sibling=sibling.nextSibling;
	}
}
function setThisAct(elementA){
	if(elementA.style.backgroundColor!='rgb(255, 255, 255)' && elementA.style.backgroundColor!='#fff'  && elementA.style.backgroundColor!='#ffffff' ){
		elementA.style.color='#fff';
		elementA.style.backgroundColor='#fff';
		elementA.style.backgroundImage='url(fileadmin/probaby.de/images/bg-navi-gelb.gif)';
	}
	//resetSibling(elementA.parentNode);
}
function setThisHover(elementA){
	elementA.style.color='#fff';
	elementA.style.backgroundImage='url(fileadmin/probaby.de/images/bg-navi-grau.gif)';
	resetSibling(elementA.parentNode);
}
function setThisHover1(elementA){
	elementA.style.color='#fff';
	if( elementA.style.backgroundColor!='rgb(255, 255, 255)' && elementA.style.backgroundColor!='#fff'  && elementA.style.backgroundColor!='#ffffff' )
		elementA.style.backgroundImage='url(fileadmin/probaby.de/images/bg-navi-grau1.gif)';
	//resetSibling(elementA.parentNode);
}
function setThisCur(elementA){
	if (elementA.style.backgroundImage && elementA.style.backgroundImage=="url(fileadmin/probaby.de/images/bg-navi-gelb.gif)")
		return;
	
	var isrot="";
	elementA.style.color='#fff';
	for(var x=0; x<elementA.attributes.length;x++)
		if(elementA.attributes[x].value=='rot')
			isrot=1;
	if(isrot){
		elementA.style.backgroundImage='url(fileadmin/probaby.de/images/bg-navi-rot.gif)';
	}else{ 
		if( elementA.style.backgroundColor!='rgb(255, 255, 255)' && elementA.style.backgroundColor!='#fff'  && elementA.style.backgroundColor!='#ffffff' )
			if(elementA.id=='esprit'){
					elementA.style.backgroundImage='url(fileadmin/probaby.de/images/esprit_over.gif)';
					elementA.style.backgroundColor='#809397';
			}else if(elementA.id=='oskars'){
					elementA.style.backgroundImage='url(fileadmin/probaby.de/images/oskars_over.gif)';
					elementA.style.backgroundColor='#809397';
			}else if(elementA.id=='probaby'){
					elementA.style.backgroundImage='url(fileadmin/probaby.de/images/probaby_over.gif)';
					elementA.style.backgroundColor='#809397';
			}else{
				elementA.style.backgroundImage='url(fileadmin/probaby.de/images/bg-navi-grau.gif)';
			}
	}
	//resetSibling(elementA.parentNode);
}
function setThisNo(elementA){
	var isrot="";
	for(var x=0; x<elementA.attributes.length;x++)
		if(elementA.attributes[x].value=='rot')
			isrot=1;
	if(!isrot){
		if(elementA.id=='esprit'){
			elementA.style.backgroundImage='url(fileadmin/probaby.de/images/esprit_no.gif)';
			elementA.style.backgroundColor='transparent';
		}else if(elementA.id=='oskars'){
			elementA.style.backgroundImage='url(fileadmin/probaby.de/images/oskars_no.gif)';
			elementA.style.backgroundColor='transparent';
		}else if(elementA.id=='probaby'){
			elementA.style.backgroundImage='url(fileadmin/probaby.de/images/probaby_no.gif)';
			elementA.style.backgroundColor='transparent';
		}else{
			//elementA.parentNode.className='no';
			elementA.style.color='#809397';
			elementA.style.backgroundColor='transparent';
			elementA.style.backgroundImage='none';
		}
	}
}
function setParentCur(elementLi){
	var parentLi=elementLi.parentNode.parentNode;
	if(parentLi.nodeName=='LI'){
		resetSibling(parentLi);
		parentLi.firstChild.style.color='#fff';
		parentLi.firstChild.style.backgroundColor='#fff';
		parentLi.firstChild.style.backgroundImage='url(fileadmin/probaby.de/images/bg-navi-grau.gif)';
	}
}
function breadcrump(showhide){
	if(document.getElementById('breadcrump'))
		document.getElementById('breadcrump').style.visibility=showhide;
}
function showsub(elementLi){
		var doreturn=true;
		breadcrump('hidden');
		setParentCur(elementLi);
		resetSibling(elementLi,true);
		setThisAct(elementLi.firstChild);
		//alert(elementLi.firstChild.style.backgroundColor);
		hidesub(elementLi,'prev');
		hidesub(elementLi,'next');
		for(x=0;x<elementLi.childNodes.length;x++){
			aktnode=elementLi.childNodes[x];
			if(aktnode.nodeName=='UL'){
				aktnode.style.visibility='visible';
				doreturn=false;
			}
		}
		return doreturn;
}
function showLayer(l){
	hideAll();
	var lay=document.getElementById(l);
	if(lay)
		lay.style.visibility='visible';
}
var global_l;
function showLayer1(l,acttiefe){
	if(tiefe==4 && acttiefe==3){
	}else{
		if(global_l!=l)
			hideAll1();
		global_l=l;
		var lay=document.getElementById('pid'+l);
		if(lay)
			lay.style.display='block';
		var lay=document.getElementById('overtexte');
		if(lay){
			lay.style.left='10px';
			lay.style.top='165px';
		}
	}
	tiefe=acttiefe;
}
function hideLayerH(l){
	var lay=document.getElementById(l);
	if(lay)
		lay.style.visibility='hidden';
}
function hideLayerH1(l){
	if(l=='content')
		var id=l;
	else
		var id= 'pid'+l;
	var lay=document.getElementById(id);
	if(lay)
		lay.style.display='none';
}
function hideAll(){
	hideLayerH('karte1');
	hideLayerH('karte2');
	hideLayerH('karte3');
	hideLayerH('karte4');
	hideLayerH('karte5');
	hideLayerH('karte6');
	hideLayerH('karte7');
	hideLayerH('karte8');
	hideLayerH('karte9');
	hideLayerH('karte10');
	hideLayerH('karte11');
	hideLayerH('karte12');
	hideLayerH('karte13');
	hideLayerH('karte14');
	hideLayerH('karte15');
	hideLayerH('karte16');
}
function hideAll1(){
	var pids=wagrpidlist.split(',');
	for(var x=0;x<pids.length;x++){
		hideLayerH1(pids[x]);
	}
	hideLayerH1('content');
	hideLayerH('showimage');
}

function openFlipbook(url) {
	window.open(url, 'flipbook', 'height=720,width=950');
}
