// x.js only gets loaded if javascript is enabled
document.write("<"+"script type='text/javascript' src='/js/x.js'><"+"/script>");

// Detect Browser
var detect = navigator.userAgent.toLowerCase();

// checkBrowser is used for checking the browser name
function checkBrowser(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}


function adjustLayout()
{
  // Get natural heights
  var cHeight = xHeight("contentarea");
  var lHeight = xHeight("sidecolumn");

  // Other variant names of the sidecolumn could be used
  if (lHeight == 0)
  {
  	lHeight = xHeight("imgsidecolumn");
  }
  if (lHeight == 0)
  {
  	lHeight = xHeight("rightsidecolumn");
  }
  
  // Find the maximum height
  var maxHeight =
    Math.max(cHeight, lHeight);

  // Assign maximum height to all columns
  xHeight("contentarea", maxHeight);
  xHeight("sidecolumn", maxHeight);
 
  // Show the footer
  xShow("footer");
}

window.onload = function()
{
  xAddEventListener(window, "resize",
    adjustLayout, false);
  adjustLayout();
}