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

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

function resizeBg() {
  /* if (Weite != getWidth() || Hoehe != getHeight())
    location.href = location.href; */
    // document.body.style.backgroundImage = "url('bg/background.jpg.php?w="+getWidth()+"&h="+getHeight()+"');";
    document.body.background = "http://www.datenextern.de/designstu.be/bg/background.jpg.php?w="+getWidth()+"&h="+getHeight();
}

/* Mozilla: listen to resizes */
if (!window.Weite && window.innerWidth) {
  window.onresize = resizeBg;
}
