// Adjust page layout according to highest column
function adjustLayout()  
{  
 // Get natural heights  
 var cHeight = xHeight("contentArea");
 var sHeight = xHeight("statusArea");  
 var lHeight = xHeight("leftCol");  
 var rHeight = xHeight("rightCol");  
 
 // Find the maximum height  
 var maxHeight =  
   Math.max(cHeight + sHeight, Math.max(lHeight, rHeight));  
 
 // Assign maximum height to all columns  
 xHeight("contentArea", maxHeight - sHeight);  
 xHeight("leftCol", maxHeight);  
 xHeight("rightCol", maxHeight);  
 
 // Show the footer  
 xShow("footer");  
}

//listen for when the adjustment should be made
window.onload = function()  
{  
 xAddEventListener(window, "resize",  
   adjustLayout, false);  
 adjustLayout();  
}  