// JavaScript Document

  function GetWeite()
  {
    if (window.innerWidth) return window.innerWidth;
    else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
    else return 0;
  }
  function GetHoehe()
  {
    if (window.innerHeight) return (window.innerHeight);
    else if (document.documentElement.clientHeight) return (document.documentElement.clientHeight);
    else if (document.body.clientHeight) return (document.body.clientHeight);
    else return 0;
  }

  function GetMenuUntenTop()
  {
      return (divHeader.offsetHeight + divMenuOben.offsetHeight);
  }
  
  function GetMenuUntenSpacerHeight() 
  {

      divHeader = eval(document.getElementById("header"));
      divMenuOben = eval(document.getElementById("menu_oben"));
      
      return (Hoehe - GetMenuUntenTop()) - 50;
  
  }
  
  function MenuFitsInWindow()
  {
      return (GetMenuUntenTop() + 50 < GetHoehe());
  }
  
  function PageResize(force)
  {


    /*var IE7 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 7.")!=-1)) ? true : false;*/
    
    if ((currheight != document.documentElement.clientHeight) || (document.documentElement.clientHeight==0)) {

        currheight = document.documentElement.clientHeight;

        if (Weite!=GetWeite()) {
          Weite = GetWeite();
        }

        if (Hoehe!=GetHoehe() || force) {
    
          Hoehe = GetHoehe();
          document.resizespacer.height = Hoehe - 137;
          document.getElementById("content").style.height = (Hoehe - 187) + 'px';

          if (MenuFitsInWindow()) {
            document.getElementById("content").style.overflow = 'auto';
          } else {
            document.getElementById("content").style.overflow = 'visible';
          }
          
          document.menuspacer.height = GetMenuUntenSpacerHeight();

        }

      //alert('Firefox');
    } else {
      //alert('IE7');
    }


  }

  if (!window.Weite && window.innerWidth)
  {
    var Weite = 0;
    var Hoehe = 0;
    var currheight = 0;
    window.onresize = PageResize;
    Weite = GetWeite();
    Hoehe = GetHoehe();
  }
        

