// layout2.js
// Cross-Browser.com & SitePoint.com - Equal Column Height Demo (2 Column)

if (document.getElementById || document.all) { // minimum dhtml support required

  xAddEventListener(window, 'load', winOnLoad, false);
}

function winOnLoad()
{
  var ele = xGetElementById('generic-content');
  if (ele && xDef(ele.style, ele.offsetHeight)) { // another compatibility check
    adjustLayout();
    xAddEventListener(window, 'resize', adjustLayout, false);
  }
}

function adjustLayout()
{
  // Get content heights
  
  var pLeftHeight = xHeight('generic-content');
  var pRightHeight = xHeight('right-column');
  //var pOtherHeight = xHeight('left_area');
	
  // Find the maximum height
  var maxHeight = Math.max(pLeftHeight, pRightHeight);
  // Assign maximum height to all columns
  
  xHeight('generic-content', maxHeight);
  xHeight('right-column', maxHeight);
 // xHeight('left_area', maxHeight);

  // Show the footer
  xGetElementById('footer').style.visibility = 'visible';
}

