function adjustLayout()
{
  // Get natural heights
  var lHeight = xHeight("sideleft");
  var cHeight = xHeight("content");
  var scHeight = xHeight("sidecenter");
  var c2Height = xHeight("sidecontent");
  var rHeight = xHeight("sideright");

  // Find the maximum height
  var maxHeight =
    Math.max(cHeight, Math.max(lHeight, scHeight, c2Height, rHeight));

  // Assign maximum height to all columns
  xHeight("content", maxHeight);
  xHeight("sideleft", maxHeight);
  xHeight("sidecenter", maxHeight);
  xHeight("sidecontent", maxHeight);
  xHeight("sideright", maxHeight);

  // Show the footer
  xShow("footer");
}

window.onload = function()
{
  xAddEventListener(window, "resize",
    adjustLayout, false);
  adjustLayout();
}