function adjustLayout()
{
  // Get natural heights
  var cHeight = xHeight("container");
  var lHeight = xHeight("sidebar");
  var rHeight = xHeight("sidebar2");

  // Find the maximum height
  var maxHeight =
    Math.max(cHeight, Math.max(lHeight, rHeight));

  // Assign maximum height to all columns
  xHeight("container", maxHeight);
  xHeight("sidebar", maxHeight);
  xHeight("sidebar2", maxHeight);

  // Show the footer
  xShow("footer");
}

window.onload = function()
{
  xAddEventListener(window, "resize",
    adjustLayout, false);
  adjustLayout();
}

