
matchHeight=function(){ 

     var divmain,contDivs,maxHeight,divHeight,d,ctableht,paramA, paramB, paramC, paramD, paramE, paramF;
	 divmain = document.getElementById('bannertitle').offsetHeight;
	 ctableht = document.getElementById('ctable').offsetHeight;
	paramD = document.getElementById('wrapper').offsetHeight;
	 paramF = document.getElementById('contentteaser').offsetHeight;
	 //paramB = document.getElementById('adpress').offsetHeight;
	 
	 paramB = document.getElementById('medsrvcqlinks').offsetHeight;

	 
	 maxHeight = ctableht + divmain + paramF + paramB + paramD;
	 
	//alert(divmain);
	 //alert(maxHeight);
	 //maxHeight must be at least 420 px
	 
	 if (maxHeight <= 420)
	 	{
		//alert(maxHeight);
		
		 var contentElement = document.getElementById('contentmain');
	 	//20090202: document.getElementById('contentmain').style.height = maxHeight + 300 + 'px';
		document.getElementById('contentmain').style.height = maxHeight  + 'px';
		//20090202 : document.getElementById('footer').style.top=maxHeight + 560 + 'px';
		document.getElementById('footer').style.top=maxHeight + 330 + 'px';
		document.getElementById('footer').style.position='absolute';
	 	//alert(maxHeight);	
		}
	else
		{
		//alert(maxHeight);
		
		//20090202 : Revised
		//var contentElement = document.getElementById('contentmain');
	 	//document.getElementById('contentmain').style.height = maxHeight + 'px';
		//document.getElementById('footer').style.top=maxHeight + 270 + 'px';
		//document.getElementById('footer').style.position='absolute';
		
		

		
		var contentElement = document.getElementById('contentmain');
	 	document.getElementById('contentmain').style.height = maxHeight -120 + 'px';
	 	//document.getElementById('contentmain').style.height = maxHeight + 110 + 'px';
		document.getElementById('footer').style.top=maxHeight + 210 + 'px';
		//document.getElementById('footer').style.top=maxHeight + 440 + 'px';
		document.getElementById('footer').style.position='absolute';
		}
	
	

} 

// execute function when page loads 

window.onload=function(){ 

     if(document.getElementsByTagName){ 

          matchHeight(); 

     } 

} 
