if (document.getElementById || document.all) { // minimum dhtml support required
  document.write("<"+"script type='text/javascript' src='js/x_core.js'><"+"/script>");
  document.write("<"+"script type='text/javascript' src='js/x_event.js'><"+"/script>");
  document.write("<"+"script type='text/javascript' src='js/x_slide.js'><"+"/script>");
  document.write("<"+"script type='text/javascript' src='js/x_timer.js'><"+"/script>");
  document.write("<"+"script type='text/javascript' src='js/Scroller.js'><"+"/script>");
  document.write("<"+"style type='text/css'>#footer, #footerShadow {visibility:hidden;}<"+"/style>");
}

function winOnLoad()
{
  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') + 70;
  var rHeight = xHeight('rightColumnContent') + 70;
  
  // 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);

  xHeight('leftShadow', maxHeight);
  xHeight('centerShadow', maxHeight);
  xHeight('rightShadow', maxHeight);
  
  // Show the footer
  xTop('footer', maxHeight+70);  
  xShow('footer');
  
  xTop('footerShadow', maxHeight+70);  
  xShow('footerShadow');
}
