
matchHeight=function(){ 

     var divs,contDivs,maxHeight,divHeight,d;
	 //maxHeight = document.getElementById('contentmain').offsetHeight;
	 maxHeight = document.getElementById('cse-search-results').offsetHeight;

	 //alert(maxHeight);
	 
	 if (maxHeight <= 220)
	 	{
		//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').style.height = maxHeight + 300 + 'px';
		//document.getElementById('footer').style.top=maxHeight + 565 + 'px';
		document.getElementById('footer').style.top=maxHeight + 626 + 'px';
		document.getElementById('footer').style.position='absolute';
	 	//alert(maxHeight);	
		}
	else
		{
		 var contentElement = document.getElementById('contentmain');
	 	document.getElementById('contentmain').style.height = maxHeight + 50 + 'px';
		document.getElementById('footer').style.top=maxHeight + 380 + 'px';
		document.getElementById('footer').style.position='absolute';
		}
	
	

} 

// execute function when page loads 

window.onload=function(){ 

     if(document.getElementsByTagName){ 

          matchHeight(); 

     } 

} 