// layout2.js
// Cross-Browser.com & SitePoint.com - Equal Column Height Demo

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>");
  window.onload = winOnLoad;
}
function winOnLoad()
{
	
  var ele = xGetElementById('footer');
  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('content');
  var rHeight = xHeight('right');
  var lHeight = xHeight('left');
  //alert(xClientWidth()+''+ document.body.clientWidth);
//  document.getElementById('right').style.left=xClientWidth()-170;
//  document.getElementById('right').style.visibility='visible';
   if(xClientWidth()<750)
   {
   	document.getElementById('headArrows').style.display='none';
   	document.getElementById('headSlogan').style.display='none';
   }
	else
   {
   	document.getElementById('headArrows').style.display='block';
   	document.getElementById('headSlogan').style.display='block';
   }
  // Find the maximum height
  var maxHeight = Math.max(lHeight, rHeight, cHeight);
  //alert(xClientHeight()+' '+maxHeight+' ');
  // Assign maximum height to all columns
//  xHeight('main', maxHeight);
//  xHeight('right', maxHeight);  
  xClientHeight()<(maxHeight+130) ? document.getElementById("footer").style.top=maxHeight+129 : document.getElementById("footer").style.bottom=0;
  document.getElementById("footer").style.display='block';
}