// JavaScript Document// JavaScript Document
function div_ref_style (id) 
{
	if      (document.layers)         return document.layers[id];              
	else if (document.all)            return document.all[id].style;           
	else if (document.getElementById) return document.getElementById(id).style;
	else                              return null;	
}


function adjustDivHeight( div1, div2, div3, div4, footer ){
	var d1 = document.getElementById( div1 );
	var d2 = document.getElementById( div2 );
        var d3 = document.getElementById( div3 );
        var d4 = document.getElementById( div4 );
	var fo = document.getElementById( footer );


	
	if( d3.clientHeight > d4.clientHeight ){


         d1.style.height = ( d3.clientHeight + 100 ) + "px";
         d2.style.height = d1.clientHeight  + "px";
         fo.style.top  = ( d1.clientHeight + d1.offsetTop ) + "px";
	
                }else if( d2.clientHeight > d3.clientHeight ){
		//var oldHeight = d3.clientHeight;
		
                                
		d1.style.height = d2.clientHeight  + "px";
                fo.style.top  = ( d2.clientHeight + d2.offsetTop ) + "px";

	}
	else return;
}