// layout3.js
// Cross-Browser.com & SitePoint.com - Equal Column Height Demo (3 Column)
function Layout3CwinOnLoad()
{
  var ele = xGetElementById('leftColumn');
  if (ele && xDef(ele.style, ele.offsetHeight)) { // another compatibility check
    adjustLayout();
    xAddEventListener(window, 'resize', winOnResize, false);
  }
}
function winOnResize()
{
  adjustLayout();
}
function adjustLayout()
{
  // Get content heights
  var cHeight = xHeight('centerColumnContent');
  var lHeight = xHeight('leftColumnContent');
  var rHeight = xHeight('rightColumnContent');

  // Find the maximum height
  var maxHeight = Math.max(cHeight, Math.max(lHeight, rHeight));

  // Assign maximum height to all columns
  xHeight('leftColumn', maxHeight);
  xHeight('centerColumn', maxHeight);
  xHeight('rightColumn', maxHeight);

  // Show the footer
  xShow('footer');
}

