function Onload()
{
	setContentHeight();
	xAddEventListener(window,'resize',setContentHeight,false);
}

function setContentHeight() {
  
  mainContentHeight = xHeight("main");
  leftContentHeight = xHeight("left");
  
  if (mainContentHeight >= leftContentHeight) {
	maxHeight = mainContentHeight+233;
  } else {
	maxHeight = leftContentHeight+233;
  }
  
  if (maxHeight < Math.floor(xClientHeight())) {
	xHeight("wholepage", Math.floor(xClientHeight()));
  } else {
	xHeight("wholepage", maxHeight)
  }
}

if (window.addEventListener)
{
	window.addEventListener('load', Onload, false); 
}
else if (window.attachEvent)
{
	window.attachEvent('onload', Onload);
}

