window.onresize = function(){
   if(resizeTimer) clearTimeout(resizeTimer);
	  resizeTimer = setTimeout("doResize()",0);
}

function doResize(){
	if (self.innerHeight) {    // all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}				
	var mainframe = getobject('mainframe');
	mainframe.style.height = windowHeight - bottom_bar_height + 'px';
	var mainbody = getobject('mainbody');				
	mainbody.style.height = windowHeight - bottom_bar_height + 'px';
}			
setInterval("doResize()", 2000)	