// 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('links');
  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('links');
  var rHeight = xHeight('rechts');
  var cHeight = xHeight('mitte');
  var hHeight = xHeight('mittehistory');

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

  // Assign maximum height to all columns
  xHeight('links', maxHeight);
  xHeight('mitte', maxHeight);
  xHeight('rechts', maxHeight);
  xHeight('mittehistory', maxHeight);
  
    // Inhalt anpassen
  xHeight('inhalt', maxHeight + 230);

}

