function adjustLayout() {
		
		var cHeight = xHeight("leftpanel");
		var dHeight = xHeight("content");
		var eHeight = xHeight("rightpanel");

		var headerHeight = xHeight("header")+ xHeight("footer");
		
		
		var maxHeight = Math.max(cHeight,dHeight,eHeight);
		
		var windowHeight = xClientHeight() - headerHeight - 2;
	
		if (maxHeight < windowHeight) {
			xHeight("content",windowHeight);
			xHeight("leftpanel",windowHeight);
			xHeight("rightpanel",windowHeight);
		}else{	
			xHeight("content",maxHeight);
			xHeight("leftpanel",maxHeight);
			xHeight("rightpanel",maxHeight);
			xHeight("main",maxHeight+headerHeight + 2);
		}
	}
