function autoLayout(){
  var w = document.documentElement.clientWidth;
  var h = document.documentElement.clientHeight;
  w = (w>900) ? w : 900;
  var cs = $('contents').style;
  var ms = $('main').style;
  var ss = $('side').style;
  cs.width = w+'px';
  ms.width = (w-180)+'px';
  cs.height = (h-65)+'px';
  ms.height = (h-65)+'px';
  ss.height = (h-65)+'px';
}

Event.observe(window, 'load', autoLayout);
Event.observe(window, 'resize', autoLayout);


