/* 
Derived from a script by Alejandro Gervasio. 
Modified to work in FireFox by Stefan Mischook for Killersites.com

How it works: just apply the CSS class of 'column' to your pages' main columns.
*/
function matchColumns()
{ 
	if ( typeof( window[ 'contentadjust' ] ) == "undefined" ) {
		contentadjust = 0;
	} 

	var col1h, col2h, maxh;
	col1h = 0;
	col2h = 0;
	maxh = 0;

	//element = document.getElementById(id);
	
	var col1 = document.getElementById('contentarea-withnav-content');
	var col2 = document.getElementById('left-nav-content');
	
	//alert ('hello4');
	
                if (col1.offsetHeight){ 

                     col1h=col1.offsetHeight; 					

                } 

                else if(col1.style.pixelHeight){ 

                     col1h=col1.style.pixelHeight;					 

                }
				
				if (col2.offsetHeight){ 

                     col2h=col2.offsetHeight; 					

                } 

                else if(col2.style.pixelHeight){ 

                     col2h=col2.style.pixelHeight;					 

                } 

                // calculate maximum height 

                maxh=Math.max(col1h,col2h); 
				
				//maxh=(maxh/16) - 1.25;	
				maxh = maxh - 20;

     // assign maximum height value to all of container <div> elements 


          col1.style.height = (maxh + contentadjust) + "px"; 
		  col2.style.height = maxh + "px"; 
} 

// Runs the script when page loads 

window.onload = checkcols;

function checkcols(){
	 if (document.getElementById)
	 { 
		matchColumns();

     } 
} 


