var y = fensterhoehe();
var z = toprowheight();

function fensterhoehe() {
  if (window.innerHeight) {return window.innerHeight;}
  else if (document.documentElement && document.documentElement.clientHeight) {
    return document.documentElement.clientHeight;}
  else if (document.body && document.body.clientHeight) {
    return document.body.clientHeight;}
  else {return 0;}
  }

function bodyheight() {
  if (document.body && document.body.getAttribute) {
    return document.body.getAttribute("height");}
  else {return 0;}
  }

function toprowheight() {
  if (fensterhoehe() > bodyheight()) {
    return (fensterhoehe() - bodyheight()) / 2;}
  else {return 1;}
  }

function centerpage() {
  if (fensterhoehe() > bodyheight()) {
  document.getElementById("toprow").setAttribute("height", toprowheight(), 0);
  window.setTimeout("centerpage()", 500);}
  else {document.getElementById("toprow").setAttribute("height", 1, 0);
  window.setTimeout("centerpage()", 500);}
  }

function setiframeheight() {
  if (fensterhoehe() > 500) {
 document.getElementById("iframe").setAttribute("height", fensterhoehe() - 180, 0);
 window.setTimeout("setiframeheight()", 500);}
  else {document.getElementById("iframe").setAttribute("height", 320, 0);
 window.setTimeout("setiframeheight()", 500);}
 }
 
function swapleftimg() {
  if (fensterhoehe() > 700) {
  document.getElementById("left").setAttribute("background", "../images/bg02_a.gif", 0);
  window.setTimeout("swapleftimg()", 500);}
  else {document.getElementById("left").setAttribute("background", "../images/bg02.gif", 0);
  window.setTimeout("swapleftimg()", 500);}
  }
