// JavaScript Document

//JavaScript Document

var doresize=0;

function docisloaded() {
  doresize=1;
  liveResize();
  
}

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 () {
    if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
    {
      liveResize();
      Weite=Fensterweite();
      Hoehe=Fensterhoehe();
    }
}




var aktuelleBreite = 620;

	function getBrowserWidth() {
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	  }
	  return myWidth;
	}

	function getBrowserHeight() {
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	  }
	  return myHeight;
	}

  function liveResize() {
    if (doresize==1)
    {
        var neueHoehe=getBrowserHeight()-187;
		if (neueHoehe!=document.getElementById('middle').style.height)
		{
			document.getElementById('content').style.height=neueHoehe+"px";
			document.getElementById('middle').style.height=neueHoehe+"px";
			document.getElementById('sidebar').style.height=neueHoehe+"px";
		}
    }
  }