// layout3.js
// Cross-Browser.com & SitePoint.com - Equal Column Height Demo (3 Column)

if (document.getElementById || document.all) { // minimum dhtml support required
  /*document.write("<"+"style type='text/css'>#footer{visibility:hidden;}<"+"/style>");*/
  window.onload = winOnLoad;
}
function winOnLoad()
{
  var ele = xGetElementById('left');
  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 lHeight = xHeight('left');
  var rHeight = xHeight('rightcontent');
	var padding = 10;

  // Find the maximum height
  var maxHeight = Math.max(300, Math.max(lHeight, rHeight));

// Assign maximum height to all columns
	xHeight('bodycontent', maxHeight+padding);
  xHeight('left', maxHeight);
  xHeight('rightcontent', maxHeight);

	// Show the footer
	xTop('footer',maxHeight+191);
  xShow('footer');
	
	//o=document.getElementById('copyright');
	//o.innerHTML=lHeight+','+rHeight+','+maxHeight;
}

