

function aendern(x){ 

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

/*---------------------------------------------------------------------------------------------------------*/
var popupWndVarWW;
function openPopUpWW(theURL,wndW,wndH) {
	
	//alert(1);
	wndDef = "width="+ openPopUpWW.arguments[1] +",height="+ openPopUpWW.arguments[2] +",scrollbars=yes";

	if (popupWndVarWW){
		if (popupWndVarWW.closed) {
			popupWndVarWW = window.open(theURL,"popupWndVarWW",wndDef); 
			popupWndVarWW.focus();
		}
		else {
			popupWndVarWW.close(); 
			popupWndVarWW = window.open(theURL,"popupWndVarWW",wndDef); 
			popupWndVarWW.focus();
		}
	}
	
	else {
		popupWndVarWW = window.open(theURL,"popupWndVarWW",wndDef);
		popupWndVarWW.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 openPopUpW(theURL,wndW,wndH) {
	
	var popupWndVar;
	wndDef = "width="+ openPopUpW.arguments[1] +",height="+ openPopUpW.arguments[2] +",scrollbars=yes";

	if (popupWndVar){
		if (popupWndVar.closed) {
			popupWndVar = window.open(theURL,"newWnd",wndDef); 
			popupWndVar.focus();
		}
		else {
			popupWndVar.close(); 
			popupWndVar = window.open(theURL,"newWnd",wndDef); 
			popupWndVar.focus();
		}
	}
	
	else {
		popupWndVar = window.open(theURL,"newWnd",wndDef);
		popupWndVar.focus();
	}
	
}

/*---------------------------------------------------------------------------------------------------------*/
function openPopUpWResbl(theURL,wndW,wndH) {	
	var popupWndVar;
	
	wndDef = "width="+ openPopUpWResbl.arguments[1] +",height="+ openPopUpWResbl.arguments[2] +",scrollbars=yes,status=yes,resizable=yes";
	//wndDef = "locationbar=no,resizable=yes";

	if (popupWndVar){
		if (popupWndVar.closed) {
			popupWndVar = window.open(theURL,"newWnd",wndDef); 
			popupWndVar.focus();
		}
		else {
			popupWndVar.close(); 
			popupWndVar = window.open(theURL,"newWnd",wndDef); 
			popupWndVar.focus();
		}
	}
	
	else {
		popupWndVar = window.open(theURL,"newWnd",wndDef);
		popupWndVar.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;
	
	
	/*gleich auf die position bringen*/
	el.style.left = endPos;
	
	

/*
KEINE ANIMATION
----------------------------	
*/

/*	
	
		
	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 arrLastPrt = "";
function schowPrt(){

	
	if (arrLastPrt != schowPrt.arguments[0]){	
		if (arrLastPrt != ""){
			document.getElementById(arrLastPrt).style.visibility	= "hidden";																	
		}					
	}	
	
	//alert(schowPrt.arguments[1]);
	document.getElementById(schowPrt.arguments[0]).style.visibility	= "visible";		
	if (schowPrt.arguments[1] == 0){			
		document.getElementById(schowPrt.arguments[0]).style.visibility	= "hidden";		
	}

	//alert(arrLastPrt);


	arrLastPrt = schowPrt.arguments[0];
	
	

}



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(eBx).style.clip = 'rect(0px 195px 205px 0px)';  			
			document.getElementById('S0').style.height = '510px';  			
			document.getElementById('S0').style.visibility	= "visible";										
		}				
		else {
			document.getElementById(goDiv.arguments[0]).style.visibility	= "hidden";																	
		}									
	}			
		
	//merke dir das letzte element
	//--------------------------------------------------------
	arrLastVis = goDiv.arguments[0];
	//alert(document.getElementById(eBx).style.height);
}
	
	
function chkIfToHide(){
	alert(1);
	if (arrLastVis != ""){
			document.getElementById(arrLastVis).style.visibility	= "hidden";																	
		}
}
	
			
//-------------------------------------------------------------------------------------------------	
//	HOEHE DER INFOBOX AUFZIEHEN
//  DAS RUCKELT ETWAS - BESSER IST ES DIE BREITE AUFZUZIEHEN
//------------------------------------------------------------------
function fadeInB(eBx,num){
		/*gleich aufziehen*/
		//document.getElementById(eBx).style.clip = 'rect(0px 230px 100px 0px)';

		/* hohe aufziehen*/
		/*
		if (num < 110){		
			num = num   + 2;		
			document.getElementById(eBx).style.clip = 'rect(0px 230px '+ num+'px 0px)';			//100 war 80	
			setTimeout("fadeInB(eBx,"+num+");",2);		//12 vorher																		
		}
		*/
		/*
		KEINE ANIMATION
		----------------------------	
		*/

		
		if (num < 230){		
			num = num   + 4;		
			document.getElementById(eBx).style.clip = 'rect(0px '+ num+'px 130px 0px)';			//100 war 80	
			setTimeout("fadeInB(eBx,"+num+");",1);		//12 vorher																		
		}
				
}	

function fadeInB2(num){		
		if (num < 100){		
			num = num   + 5;		
			document.getElementById('pointer').style.clip = 'rect(30px 230px '+ num+'px 0px)';			//100 war 80	
			setTimeout("fadeInB2("+num+");",4);		//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  - 5;
		document.getElementById(eBx).style.clip = 'rect(0px 150px '+ num+'px 0px)';	
		setTimeout("fadeOutH(eBx,"+num+");",12)											
	}
}	

//-------------------------------------------------------------------------------------------------	
function fadeOutB(eBx,num){
	
	alert(1);
	
	/*
	if (num > 0){	
		num = num  - 5;
		document.getElementById(eBx).style.clip = 'rect(0px '+ num+'px 150px 0px)';	
		setTimeout("fadeOutB(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=" + 650);
		wndDef += (",height=" + 570);
				
		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;		
			//wndUrl = parent.frames['frmCont'].document.location.href;
			wndUrl = document.location.href;		
		}		
		
		var meineVar;
		
		//alert(wndUrl.indexOf('html'));
		
		if (wndUrl.indexOf('html') < 1) {
			wndUrl = 'http://www.convisio.at/denkweisen_convisio-p-de.shtml';
		}
				
		meineVar = wndUrl;
		wndUrl = meineVar.replace('-p-','-o-');
		//wndUrl = meineVar.replace('_i_','_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();
}





function checkform(myform) {
		for (i=0; i<obligatory.length; i++) {
			x = eval("myform.elements['"+obligatory[i][0]+"']");	
			if (x == "" || x == null) {x = eval("myform."+obligatory[i][0]);} //ns6 ns7	
			if ((x.type == "text" || x.type == "textarea")) {
			if (x.value.length < obligatory[i][1]) {alert(obligatory[i][2]); x.focus(); x.select(); return false;}
			if (obligatory[i][3] == true) {
				var filter=/^.+@.+\..{2,4}$/
				if (filter.test(x.value) == false) {alert(obligatory[i][2]); x.focus(); x.select(); return false;}
			}

			} 
			else if (x.type == "select-one") {
				myvalue = x.options[x.options.selectedIndex].value;
				if (myvalue == null || myvalue == "") {alert(obligatory[i][2]); x.focus(); return false}					
			} 
			else if (x.type == "checkbox") {
				mychecked = false;		
				
				for (j=0; j<obligatory[i].length-1; j++) { 
					mybox = eval("myform.elements['"+obligatory[i][j]+"']");
					if (mybox == "" || mybox == null) {
						mybox = eval("myform."+obligatory[i][j]);
					} //ns6 ns7
				
					if (mychecked == false) {
						mychecked = mybox.checked
					}
				}
		
				if (mychecked == false) {
					alert(obligatory[i][obligatory[i].length-1]); 
					return false
				}
				
				} 
				else if (x[0].type == "radio") {			
					mychecked = false;		
					for (j=0; j<x.length; j++) { 
					if (mychecked == false) {
						mychecked = x[j].checked;
					}
				}
			
				if (mychecked == false) {
					alert(obligatory[i][2]); return false
				}
		}
	}

	return true;

}




/*---------------------------------------------------------------------------------------------------------*/
function test_DONOTUSE(){

	if (top.frames.length >0){
		if (top.frames[0].document.getElementById('divCurrLoc')){
			top.frames[0].document.getElementById('divCurrLoc').innerHTML = ".$strRerLnkTxt.";
		}	
	}
	
	//so schauts in einer zeile aus
	//if (top.frames.length >0){if (top.frames[0].document.getElementById('divCurrLoc')){top.frames[0].document.getElementById('divCurrLoc').innerHTML = ".$strRerLnkTxt.";}}


}

