
matchHeight=function(){ 

     var maxHeight, paramA, paramB, paramC, paramD, paramE, paramF;
	 //maxHeight = document.getElementById('contentmain').offsetHeight;
	 paramA = document.getElementById('story-holder').offsetHeight;
	 paramB = document.getElementById('quicklinks').offsetHeight;
	 //paramB = document.getElementById('container').offsetHeight;
	 paramC = document.getElementById('miniarticle1').offsetHeight;
	 paramD = document.getElementById('miniarticle2').offsetHeight;
	 //paramE = document.getElementById('mfindadoctor').offsetHeight;
	 paramF = document.getElementById('contentteaser').offsetHeight;
	 //paramB = 0;
	 //paramC = 0;
	 paramE = document.getElementById('wrapper').offsetHeight;
	 maxHeight = paramA + paramB + paramC + paramD + paramE + paramF;
	 

	 //alert(maxHeight);
	 
	 if (maxHeight <= 320)
	 	{
		//TO TRY : http://www.webdeveloper.com/forum/showthread.php?t=150796
		//var z=function(str){return document.getElementById(str)}; 
		//function getcode(){
		//var z = document.getElementById;
		
		//output= 
		
		//'border-color:'+z('backgroundvalues7').value+'; \n'
		//+'border-width:'+z('aboutmeborderselect2').value+'px; \n'
		//+'border-style:'+z('borderstyleid1').value+';z-index:2px; \n' 
		
		 //var contentElement = document.getElementById('contentmain');
	 	document.getElementById('contentmain_index').style.height = maxHeight + 'px';
		//document.getElementById('footer').style.top=maxHeight + 565 + 'px';
		document.getElementById('footer').style.top=maxHeight + 330 + 'px';
		document.getElementById('footer').style.position='relative';
	 	//alert(maxHeight);	
		}
	else
		{
		//alert(maxHeight);
		 var contentElement = document.getElementById('contentmain');
	 	document.getElementById('contentmain_index').style.height = maxHeight  + 105 + 'px';
		//document.getElementById('footer').style.top=maxHeight + 345 + '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(); 

     } 

} 
