var BROWSER_NS=(document.all)?"false":"true";
if(!document.all && document.getElementsByTagName){
	document.all = document.getElementsByTagName("*");
}
var leftnav=rightnav=true;
function mausdrauf(bild) {
	if ((bild.indexOf("LeftTravNav")>-1 && leftnav)||(bild.indexOf("RightTravNav")>-1 && rightnav)||(bild.indexOf("TravNav")<0)) {
//	alert('machen');
		wechsel = eval(bild + "maus.src");
		var Schalter = 1;
		var i;
		if(document.layers)	{
			for(i=0;i<document.layers.length;i++){    		
				if(document.layers[i].document[bild]){
		   			document.layers[i].document[bild].src = wechsel;
		   			Schalter = 0;
		   		}
		   	}
	        if(document[bild] && Schalter){
				document[bild].src = wechsel;
			}
		}
		else if (document.all && document[bild]){
			document[bild].src = wechsel;
		}
	}
	return true;
}

function normal(bild){
	if ((bild.indexOf("LeftTravNav")>-1 && leftnav)||(bild.indexOf("RightTravNav")>-1 && rightnav)||(bild.indexOf("TravNav")<0)) {
		wechsel = eval(bild + "normal.src");
		var Schalter = 1;	
		var i;
		if(document.layers)	{
			for(i=0;i<document.layers.length;i++){		
		    	if(document.layers[i].document[bild]){
		    		document.layers[i].document[bild].src = wechsel;
		    		Schalter = 0;
		    	}
		    }
			if(document[bild] && Schalter){
				document[bild].src = wechsel;
			}
		}
		else if (document.all && document[bild]){
			document[bild].src = wechsel
		}
	}
	return true;
}
function inaktiv(bild){
	wechsel = eval(bild + "inactive.src");
	var Schalter = 1;	
	var i;
	if(document.layers)	{
		for(i=0;i<document.layers.length;i++){		
	    	if(document.layers[i].document[bild]){
	    		document.layers[i].document[bild].src = wechsel;
	    		Schalter = 0;
	    	}
	    }
		if(document[bild] && Schalter){
			document[bild].src = wechsel;
		}
	}
	else if (document.all && document[bild]){
		document[bild].src = wechsel
	}
	return true;
}
function getPath(url){		
	pos=( (url.lastIndexOf("/")+1) | (url.lastIndexOf("\\")+1) )-1;
	newpath=url.substring(0,pos);	// Der hintere Teil ist abgeschnitten
	pos=( (newpath.lastIndexOf("/")+1) | (url.lastIndexOf("\\")+1) )-1;	
	newpath=newpath.substring(pos+1,url.length);	// das Verzeichnis
	return(newpath);
}
function checkTrav(){
	myPath='../'+getPath(location.href)+'/pb.html';
	if (myPath == tree[0][2]) {
		inaktiv('LeftTravNavButton0');
		leftnav=false;
	}
	if (myPath == tree[(tree.length-1)][2]) {
		inaktiv('RightTravNavButton0');
		rightnav=false;
	}
}
function travPrev(){
	var pos = parent.pb.location.search.indexOf("POOLSID=");
	if(pos > -1){
		myPath='../'+document.location.search.substr(pos+8,document.location.search.length)+'/pb.html';
	}else{
		myPath='../'+getPath(location.href)+'/pb.html';
	}
	var i = 0;
	for(i = 0; ((i < tree.length) && (myPath != tree[i][2])); i++);
	if (i>0) location.href=tree[(i-1)][2];
	var ypos = parseInt(parent.getCookie("MenueYPos"));
	//if(ypos > 0){
		ypos -= 20; 
	//}
	parent.setSessionCookie("MenueYPos",ypos,0);
}
function travNext(){
	var pos = parent.pb.location.search.indexOf("POOLSID=");
	if(pos > -1){
		myPath='../'+document.location.search.substr(pos+8,document.location.search.length)+'/pb.html';
	}else{
		myPath='../'+getPath(location.href)+'/pb.html';
	}
	var i = 0;
	for(i = 0; ((i < tree.length) && (myPath != tree[i][2])); i++);
	if ((i+1)<tree.length) location.href=tree[(i+1)][2];
	var ypos =  parseInt(parent.getCookie("MenueYPos"));
	//if(ypos > 0){
		ypos += 20; 
	//}
	parent.setSessionCookie("MenueYPos",ypos,0);
}
function showTipp(furl){
	leftwin=(screen.width-480)/2;
	topwin=75; //((screen.height-360)/2);
	tippWindow = window.open("../"+furl, "TIPP", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=480,height=404,left="+leftwin+",top="+topwin);
//	tippWindow.moveTo(screen.width/2-480, screen.height/2-360);
	tippWindow.focus();
}

function showFeedback(type, pageid, width, height){
	parent.feedback=type;
	leftwin=screen.width/2-width/2;
	topwin=100; //(screen.height/2-height/2);
	feedbackWindow = window.open("feedback"+pageid+".html", "FEEDBACK", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width="+width+",height="+height+",left="+leftwin+",top="+topwin);
//	feedbackWindow.moveTo(screen.width/2-width/2, screen.height/2-height/2);
	feedbackWindow.focus();
}
function trim(str){
	return str.replace(/[\s]+$$/g,"");
}
toolsReady=true;
