function adjustMargins() {
  var windowWidth = 0
  var windowHeight = 0;
  var newMargin = 0;

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    windowWidth = window.innerWidth;
    windowHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    windowWidth = document.documentElement.clientWidth;
    windowHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    windowWidth = document.body.clientWidth;
    windowHeight = document.body.clientHeight;
  }

  if (windowWidth >= 1600) {
    newMargin = 16;
  } else if (windowWidth >= 1400) {
    newMargin = 14;
  } else if (windowWidth >= 1200) {
    newMargin = 12;
  } else if (windowWidth >= 1000) {
    newMargin = 4;
  } else {
    newMargin = 2;
  }

  var obj = document.getElementById("content");
  obj.style.marginLeft = newMargin + "em";
  obj.style.marginRight = newMargin + "em";

  var title = document.getElementById("title");
  if (newMargin <= 2) {
    title.style.paddingLeft = "4em";
  } else if (newMargin >= 4) {
    title.style.paddingLeft = "0em";
  }
}
