  var screenHeight = document.getElementById("html").offsetHeight;
  var bodyHeight = Math.round(screenHeight * .95);
  var margin = Math.round(screenHeight - bodyHeight) / 2.5;
  document.getElementById("body").style.height = bodyHeight + "px";
  document.getElementById("container").style.height = (bodyHeight - 156 - 4) + "px"; // -4 compensates for borders
  document.getElementById("body").style.marginTop = margin + "px";
  document.getElementById("menu").style.top = (156 + margin) + "px";
  if (screenHeight < 600) {document.getElementById("menu").style.top = "0px";}

  var screenWidth = document.getElementById("html").offsetWidth;
  var percentW = screenWidth / 100 - 8; percentW = 90 - (percentW * 2);
  var trueWidth = Math.round(screenWidth * percentW / 100);
  document.getElementById("body").style.width = trueWidth + "px";
  document.getElementById("menu").style.right = ((100 - percentW) / 2) + "%";

// adjust thumbbox on property page
  var page = document.location.toString();
  if (page.indexOf("sale.php") != -1) {
    document.write("<style type='text/css'>div.thumbbox {width: " + (document.getElementById("container").offsetWidth - 512 - 16 - 16 - 30) + "px;}</style>"); // 504 = max photo width, 16 = padding, 30 = margin of error
  }
