function adjustLayout()
{
  // Get natural heights
  var Height1 = xHeight("latestnews");
  var Height2 = xHeight("featureimage");
  
  var Height3 = xHeight("box1");
  var Height4 = xHeight("box2");
  var Height5 = xHeight("box3");
  var Height6 = xHeight("box4");
  
  var Height7 = xHeight("maincontent");
  //alert(xWidth('midsection'));
  var Width1 = xWidth("masthead");

  // Find the maximum height
  var maxHeightHome = Math.max(Height1, Height2);
  var maxHeightBox = Math.max(Height3, Math.max(Height4, Math.max(Height5, Height6)));


  // Assign maximum height to all columns
  xHeight("latestnews", maxHeightHome);
  xHeight("featureimage", maxHeightHome);
  
  xHeight("box1", maxHeightBox);
  xHeight("box2", maxHeightBox);
  xHeight("box3", maxHeightBox);
  xHeight("box4", maxHeightBox);
  
  if (Width1 > 800) 	/*	Added this because it was too buggy at smaller resolutions		*/
  {
	  xHeight("subnav", Height7);
	  xHeight("supportingcontent", Height7);
  }
  


  // Show the footer
 // xShow("footer");
}
function init()
{
  xAddEventListener(window, "resize", adjustLayout, false);
  adjustLayout();
}
// requires js/eventmanager.js
EventManager.Add(window,'load', init);