
function aendern(x){ 

	alert(x);
	document.opener.location.href = x;
	self.focus();
}



var popupWnd;

function openPopUp(theURL) {
	if (popupWnd){
		if (popupWnd.closed) {popupWnd = window.open(theURL,"newWnd","width=350,height=450,scrollbars=yes,left=170,top=150"); popupWnd.focus();}
		else {popupWnd.close(); popupWnd = window.open(theURL,"newWnd","width=350,height=450,scrollbars=yes,left=170,top=150"); popupWnd.focus();}
	}
	else {popupWnd = window.open(theURL,"newWnd","width=350,height=450,scrollbars=yes,left=170,top=150"); popupWnd.focus();}
}




function fadeInBHead(eBx,num){
	if (num > 0){		
		num = num   - 6;		
		//document.getElementById('pointer0').style.clip = 'rect(0px '+ num+'px 220px 0px)';				
		document.getElementById('pointer0').style.clip = 'rect(0px 770px '+ num+'px 0px)';				
		setTimeout("fadeInBHead('pointer0',"+num+");",2);																				
	}
}	


var timer1=null;
//-------------------------------------------------------------------------------------------------			
// needed for xhtml dtds 
px = (document.getElementById) ? "px" : "";

//-------------------------------------------------------------------------------------------------			
// use the offset variable to refine the pointers end position
// setting it to 0 sees the pointer end at left position of element
// so if we need to adjust it so that the pointer centers over text etc.. 
// then this is the variable to use;
	var offset = 15;
//-------------------------------------------------------------------------------------------------			
// Controls the speed of the animation
	var timerspeed = 15;	
	
//-------------------------------------------------------------------------------------------------			
// controls the number of step from point a to point b. higher 
// numbers see a decrease in speed
//------------------------------------------------------------------
	var steps = 20;		//20

//-------------------------------------------------------------------------------------------------			
// controls the deceleration
// dont recommend changing this var as this number seems to work well 
// across all browsers
//------------------------------------------------------------------
	var decrease = 0.09;		//0.09 

	
//-------------------------------------------------------------------------------------------------			
// gets the current position of the link;
//------------------------------------------------------------------
function getPosition(id) { 
	if (document.getElementById) {
		endPos = document.getElementById(id).offsetLeft;
	}
	else if (document.layers) {
		endPos = document.layers[id].left;
	}
}	

//-------------------------------------------------------------------------------------------------			
// shoves the pointer around the screen based on what current link is activated
// to make a vertical one just change offsetLeft to offsetTop
// and change any references to .left to .top
// see my home page for an example
// http://www.dhtmlnirvana.com/
//------------------------------------------------------------------
function glideMenu(obj) {


	if (document.getElementById) {
		el = document.getElementById(obj) ;
	}
	
	else if (document.layers) {
		el = document.layers[obj] ;
	}
	el.xpos = el.offsetLeft;
		
	if (el.xpos < endPos) {
		offset = 9;
		clearTimeout(timer1);
	}
	else if (el.xpos > endPos) {
		offset = -17;
		clearTimeout(timer1);
	}

	if (el.xpos == endPos) {
		offset = 0;	
		clearTimeout(timer1);
	}
	
		distance = endPos - el.xpos + offset;
		steps = distance*decrease; 
		el.xpos += steps;
		el.style.left = el.xpos+px ;
		timer1= setTimeout("glideMenu('" + obj + "')",timerspeed);
}


var arrLastVis = "";
var fadeOutFlg = 0;
//-------------------------------------------------------------------------------------------------			
//	EIN UND AUSSCHLATEN DER INFOBOXEN
//------------------------------------------------------------------
function goDiv(){				

	//alert(goDiv.arguments[1]);
			
	eBx = goDiv.arguments[0];												
	if (arrLastVis != goDiv.arguments[0]){	
		if (arrLastVis != ""){
			document.getElementById(arrLastVis).style.visibility	= "hidden";																	
		}					
		if (goDiv.arguments[1] == 1){			
			document.getElementById(eBx).style.clip = 'rect(0px 0px 0px 0px)';				
			document.getElementById(goDiv.arguments[0]).style.visibility	= "visible";	
			
			document.getElementById("pointer").style.width = '200px';		//325	das ist die breite des sliders (untermenues)
			document.getElementById("pointer").style.height = '95px';		//75	
			
			getPosition(arguments[0]);
			glideMenu('pointer')			
			fadeInB(goDiv.arguments[0],0);	
			
		}				
		else {
			document.getElementById(goDiv.arguments[0]).style.visibility	= "hidden";																	
		}									
	}			
		
	//merke dir das letzte element
	//--------------------------------------------------------
	arrLastVis = goDiv.arguments[0];
}
			
//-------------------------------------------------------------------------------------------------	
//	HOEHE DER INFOBOX AUFZIEHEN
//  DAS RUCKELT ETWAS - BESSER IST ES DIE BREITE AUFZUZIEHEN
//------------------------------------------------------------------
function fadeInB(eBx,num){
		//alert(eBx);
		if (num < 230){		
			num = num   + 2;		
			document.getElementById(eBx).style.clip = 'rect(0px '+ num+'px 100px 0px)';			//100 war 80	
			setTimeout("fadeInB(eBx,"+num+");",8);		//12 vorher																		
		}
}	

//-------------------------------------------------------------------------------------------------	
function moveBg(trgLPos,currLPos){
	
	//fadeOUTHBg(76);	
	
	document.getElementById("bgBx").style.width = '100px';					
	document.getElementById("bgBx").style.left = trgLPos;	
	
	fadeInHBg(0);	
		
}

//-------------------------------------------------------------------------------------------------	
function fadeOUTHBg(num){
	if (num > 0){	
		num = num  - 2;
		document.getElementById("bgBx").style.height = num+'px';	
		setTimeout("fadeOUTHBg("+num+");",25)											
	}
	
}	

//-------------------------------------------------------------------------------------------------	
function fadeInHBg(num){
	if (num < 76){	
		num = num  + 4;
		document.getElementById("bgBx").style.height = num+'px';	
		setTimeout("fadeInHBg("+num+");",5)											
	}
}	

//-------------------------------------------------------------------------------------------------	
function fadeInH(eBx,num){
	if (num < 250){	
		num = num  + 2;
		document.getElementById(eBx).style.clip = 'rect(0px 160px '+ num+'px 0px)';	
		setTimeout("fadeInH(eBx,"+num+");",5)											
	}
}	

//-------------------------------------------------------------------------------------------------	
function fadeOutH(eBx,num){
	if (num > 0){	
		num = num  - 15;
		document.getElementById(eBx).style.clip = 'rect(0px 160px '+ num+'px 0px)';	
		setTimeout("fadeOutH(eBx,"+num+");",5)											
	}
}	

//-------------------------------------------------------------------------------------------------	
//	schreibe den aktuellen link (den der anwender geklickt hat
//  in die infobox
//------------------------------------------------------------------

function writeCurrLnk(){
	mMnuTxt = writeCurrLnk.arguments[0];												
	sMnuTxt = writeCurrLnk.arguments[1];												
	document.getElementById("currLnkBx").innerHTML = mMnuTxt +  "/" + sMnuTxt;
}


//------------------------------------------------------
// some js fct
// LEDL & PARTNER (HL)
// last mod: 2004/04/22 
//------------------------------------------------------


// oeffnen des fensters fuer die druckansicht
// da fehlt noch, ob das fenster schon aktiv ist
// wenn ja, dann nur den content neu laden, und
// den focus auf das fenster. derzeit geht ein neues
// fenster auf.
//---------------------------------------------------------

function prtCnt() {
		var wndUrl;
		var wndDef = 'toolbar=no,locationbar=no,status=no,scrollbars=yes,menubar=no,resizeable=no,location=no';
		wndDef += (",width=" + 600);
		wndDef += (",height=" + 530);
				
		if (prtCnt.arguments[0]){
			//wndUrl = prtCnt.arguments[0] + "&prt=TRUE";
			wndUrl = prtCnt.arguments[0];
		}		
		else {		
			//wndUrl = document.location.href + "&prt=TRUE";		
			wndUrl = document.location.href;		
		}		
		
		var meineVar;
		meineVar = wndUrl;
		wndUrl = meineVar.replace('_p_','_o_');
		wndUrl = wndUrl.replace('_s_','_o_');
		wndUrl = wndUrl.replace('_e_','_o_');
		
		//alert(wndUrl);
		
		var wndNme = 'wndUrl';
		var printWindow=window.open(wndUrl, wndNme, wndDef);
		printWindow.focus();
}