/* $Id: adjust.js,v 1.2 2004/03/04 05:19:36 saida Exp $ */
function adjustLayout()
{
  // Get natural heights
  var mHeight = xHeight("MainArea");
  var lHeight = xHeight("LeftArea");
  var rHeight = xHeight("RightArea");

  // Find the maximum height
  var maxHeight =
    Math.max(mHeight, Math.max(lHeight, rHeight));

  // Assign maximum height to all columns
  xHeight("Main", maxHeight);
  xHeight("Center", maxHeight);
  xHeight("Left", maxHeight);
  xHeight("Right", maxHeight);

  var sHeight = xHeight("SiteTitle");
  var gHeight = xHeight("GlobalNavigation");
  var hHeight = sHeight+gHeight;

  // xTop("Main", hHeight);
  // xTop("Center", hHeight);
  // xTop("Left", hHeight);
  // xTop("Right", hHeight);

  // Show the footer
  e=xGetElementById("Footer");
  e.style.visibility='inherit';

  // xTop("Footer", maxHeight+sHeight+gHeight);
  //xShow("Footer");
}

window.onload = function()
{
  xAddEventListener(window, "resize", adjustLayout, false);
  adjustLayout();
}

