var sat=null;

function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  sat=window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}


function satellite(url,breite,hoehe) {
  if ( !sat || sat.closed ) { MM_openBrWindow('../../satellite.php?pic='+url,'axilaris','toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no',breite,hoehe,'true'); }
  else { sat.focus(); }
}

function YY_showHideLayers(L2show, L2hide) {
  if (document.all != null){ //ie
    var yydiv = document.all.tags("DIV");
    for (i=0; i<(yydiv.length); i++){
      if (yydiv[i]) {var yydivname = yydiv[i].id;} else {var yydivname = '';}
      if (yydivname.search(L2hide) != -1) document.all[yydivname].style.display = 'none';
      if (yydivname.search(L2show) != -1) document.all[yydivname].style.display = 'block';
        }
  }else
  if (document.getElementById){ //mz
    var yydiv = document.getElementsByTagName("DIV");
    for (i=0; i<(yydiv.length); i++){
      if (yydiv[i]) {var yydivname = yydiv[i].id;} else {var yydivname = '';}
      if (yydivname.search(L2hide) != -1) document.getElementById(yydivname).style.display = 'none';
      if (yydivname.search(L2show) != -1) document.getElementById(yydivname).style.display = 'block';
    }
  }
}


function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function switch2Div(id,alle) {
	YY_showHideLayers('contentpart_'+id, 'contentpart');
	for (i=0; i<alle; i++) {
  		var myObj=MM_findObj('tn'+i);
		if (i==id) { myObj.className='aktiv'; }
		else { myObj.className=''; }
	}
}


function UncryptMail(zeichenkette) {
	var n=0;
	var r="";
	for (i=0;i<zeichenkette.length;i++) {
		n=zeichenkette.charCodeAt(i);
		if (n>=8364) { n=128; }
		r+=String.fromCharCode(n-(-4));
	}
	location.href=r;
}


