function adjustLayout()  
{  
 // Get natural heights  
 var cHeight = xHeight("content")+50;
 var lHeight = xHeight("left")+50;  
 var rHeight = xHeight("right")+50; 
 
 // Find the maximum height  
 var maxHeight = 300+  
   Math.max(cHeight, Math.max(lHeight, rHeight));
if (maxHeight<xClientHeight()){
	maxHeight=xClientHeight();
}  
 //alert(lHeight+":"+cHeight+":"+rHeight+"":"+fHeight+"__"+maxHeight);
// Assign maximum height to all columns
  xHeight("mainwrap", maxHeight);   
 //  xHeight("content", maxHeight);  
 // xHeight("left", maxHeight);  
 // xHeight("right", maxHeight);
 
}
window.onload = function()  
{  
 xAddEventListener(window, "resize",  
   adjustLayout, false);  
 adjustLayout();  
}  
