Weite=Fensterweite();
Hoehe=Fensterhoehe();

function Fensterweite() {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function Fensterhoehe() {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

function neuAufbau () {
	neuehoehe=(Math.floor((Fensterhoehe()-584)/2)-2);
	if(neuehoehe<0) {neuehoehe=0;}
	neuehoehe_farbe=neuehoehe+40+48+27;
	neuebreite=(Math.floor((Fensterweite()-900)/2)-2);
	if(neuebreite<0) {neuebreite=0;}
	document.getElementById("buehne").style.top=neuehoehe+"px";
	document.getElementById("buehne").style.height=(584+neuehoehe)+"px";
	document.getElementById("inhalt").style.height=(414+neuehoehe)+"px";
	document.getElementById("farbe").style.top=neuehoehe_farbe+"px";
	document.getElementById("buehne").style.left=neuebreite+"px";
	document.getElementById("buehne").style.visibility="visible";
	document.getElementById("farbe").style.visibility="visible";
	if(document.getElementById("text2")) {
		document.getElementById("text2").style.height=(414+neuehoehe-80)+"px";
		}
}

window.onresize = neuAufbau;

var browser=null;
var popupWin=null;
var isMac=navigator.userAgent.toLowerCase().indexOf('mac')!=-1;
var isNav=navigator.appName=="Netscape";
function max(){
	var url = '';
	if ((isNav || isMac) && window.screen){
		var w=window.screen.availWidth;
		var h=window.screen.availHeight;

		if (isNav){
			w-=10;
			h-=30;
		}
		popupWin=window.open(url, 'maxwin', 'toolbar=0,menubar=0,location=0,directories=0,status=0,resizable=1,scrollbars=0,top=0,left=0,width='+ w +',height=' + h ); 
	}else{
		popupWin=window.open(url, 'maxwin', 'fullscreen=1,scrollbars=0'); 
	}
	document.forms.versteckt.un.value=document.forms.login.un.value;
	document.forms.versteckt.pw.value=document.forms.login.pw.value;
	document.forms.versteckt.submit();
}
