// layout3col.js
// Note: you may need to change the source code for location of the script files

if (document.getElementById || document.all) { // minimum dhtml support required
  document.write("<"+"script type='text/javascript' src='http://maskar.com/testing/jano/scripts/x_core.js'><"+"/script>");
  document.write("<"+"script type='text/javascript' src='http://maskar.com/testing/jano/scripts/x_event.js'><"+"/script>");
  document.write("<"+"style type='text/css'>#footer{visibility:hidden;}<"+"/style>");
  window.onload = winOnLoad;
}
function winOnLoad()
{
  var ele = xGetElementById('main');
  if (ele && xDef(ele.style, ele.offsetHeight)) { // another compatibility check
    adjustLayout();
    xAddEventListener(window, 'resize', winOnResize, false);
  }
}
function winOnResize()
{
  adjustLayout();
}
function adjustLayout()
{
  // Get natural heights
  var lHeight = xHeight("maincontent");
  var rHeight = xHeight("rightcontent");

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

  // Assign maximum height to all columns
  xHeight("main", maxHeight);
  xHeight("right", maxHeight);

  // Show the footer
  xShow("footer");
}
