function getWindowHeight() {
  // Die Höhe des sichtbaren Bereichs für den Inhalt ermitteln.
  var windowHeight = 0;
  if (typeof(window.innerHeight) == 'number') {
    // Wird bei z.B. Firefox, Opera, Netscape und Safari benutzt.
    windowHeight = window.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight) {
    // Welcher Browser ?.
    windowHeight = document.documentElement.clientHeight;
  }
  else if (document.body && document.body.offsetHeight) {
    // Wird bei Internet Explorer benutzt.
    if (window.navigator.userAgent.indexOf("Mac") >= 0) {
      windowHeight = document.body.clientHeight; 
    }
    else {
      windowHeight = document.body.offsetHeight;
    }
  }
  return windowHeight;
}

function setFooter() {
  // Die Höhe des Inhalts-Block (DIV) setzen, damit der Fuß-Block erscheint.
  if (document.getElementById) {
    var windowHeight = getWindowHeight();
    if (windowHeight > 0) {
      var contentHeight = windowHeight - 
                          document.getElementById('header').offsetHeight -
                          document.getElementById('fusszeile').offsetHeight;
     if (contentHeight < 0) {
        contentHeight = 0;
      }
      document.getElementById('basis').style.height = contentHeight + 'px';
    }
  }
}

window.onload = function() {
  setFooter();
}

window.onresize = function() {
  setFooter();
}
