// JavaScript Document
function adjustLayout()
{
  // Get natural heights
  var clientHeight = xClientHeight();
  var contentHeight = xHeight("content");
  var headerHeight = xHeight("header");
  // nav section contains all floating elements, so guess at the height
  var navHeight = 20;
  var footerHeight = xHeight("footer");
  var clientBodyHeight = clientHeight - headerHeight - navHeight - footerHeight;
  // Find the maximum height
//  alert("contentHeight: "+contentHeight);
//  alert("clientBodyHeight: "+clientBodyHeight);
  if (clientBodyHeight > contentHeight){
	  xHeight("content", clientBodyHeight);
  }
  // Show the footer
  xShow("footer");
}
window.onload = function()
{
  xAddEventListener(window, "resize", adjustLayout, false);
  adjustLayout();
}