function funcwidth () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function funcheight () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

/*Netscape*/
if (!window.alteWeite && window.innerWidth) {
  window.onresize = rebuild;
  varwidth = funcwidth();
  varheight = funcheight();
}

function rebuild () {
  if (varwidth != funcwidth() || varheight != funcheight())
    location.href = location.href;
}