
// JavaScript Document
var timeout;
var count = 0;
var bottom_pos = 0;
var body_height = 0;
function ch_resize(){
	
	var hid = '';
	count++;
	jQuery('div#Body div.record div').each(function(){
	   	 var top = jQuery(this).position().top;
		 var height = jQuery(this).height();
		 var id = jQuery(this).attr('id');
		 var bottom = top+height;
		 if(id!='window_1' && id!='window_2'){
		 if(bottom_pos<bottom){
			  bottom_pos = bottom;
			  hid = jQuery(this).attr('id');
		 }
		 }
	});
	bottom_pos = (bottom_pos>body_height)?bottom_pos:body_height;
	var fh = jQuery("div#Footer").height()+30;
	jQuery("#window_1").css('height',bottom_pos+3+'px');
	jQuery("#window_2").css('height',bottom_pos+3+'px');
	jQuery("div#Footer").css('top',bottom_pos+fh+'px');
	var b = 0;
	if(count>5){
	 window.clearInterval(timeout);
	}
}

jQuery(document).ready(function(){
body_height = jQuery('div#Body div.record').height();
timeout  = window.setInterval("ch_resize()",500);

});
