// Adjust page layout according to highest column
function adjustLayout()  
{



//
// Browser Detection
// check if we need the mac hack
//
//isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
//IEmac = ((document.all)&&(isMac)) ? true : false;
//if (IEmac) {alert('IE Mac detected!')}



 // Get natural heights  
 var cHeight = xHeight("centerColumn");  
 var lHeight = xHeight("leftColumn");  
 var rHeight = xHeight("rightColumn");
 
 //get height of Left Column "bottom" element
 var lColBottomHeight = xHeight("leftColBottom")
 
 //get top position of left column
 // equals the height of the "top" DIV
 var topLeftCol = xHeight("top")
 
 // Find the maximum height  
 var maxHeight =  
   Math.max(cHeight, Math.max(lHeight, rHeight));
   
//mac hack
	//if (IEmac) {maxHeight = maxHeight + 30}

 
 // Assign maximum height to all columns  
 xHeight("centercolumn", maxHeight);  
 xHeight("leftcolumn", maxHeight);  
 xHeight("rightcolumn", maxHeight);
 //xHeight("content", maxHeight);
 
 
 //re-position the Left Column "bottom" element to the foot of the Left Column
 // not used for this website
// var leftColBottom_Top = (topLeftCol + maxHeight) - lColBottomHeight;
// xTop("leftColBottom", leftColBottom_Top)
 

 
 // Show the footer
 xTop("footer", maxHeight);
 xShow("footer");  
}

//listen for when the adjustment should be made
window.onload = function()  
{  
 xAddEventListener(window, "resize",  
   adjustLayout, false);  
 adjustLayout();  
}  