/* 
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.
*/
matchColumns=function(){ 
//alert("start func")
     var divs,contDivs,maxHeight,divHeight,d; 
	
     // get all <div> elements in the document 
//alert(document.getElementById("left_div").style.height)
     divs=document.getElementsByTagName('div'); 
//alert(divs.length);
     contDivs=[]; 

     // initialize maximum height value 

     maxHeight=0; 

     // iterate over all <div> elements in the document 
//alert(divs[i].className);
check_n = 0;
check_l = 0;
     for(var i=0;i<divs.length;i++){ 
	

		if(divs[i].className == "container")
		 {
			//alert('et');
		//	alert(divs[i].offsetHeight);
			container_h = divs[i].offsetHeight;
			cn = i;
			check_n = 1;
		 }
		 if(divs[i].className == "left-menu")
		 {
			//alert('et');
		//	alert(divs[i].offsetHeight);
			left_menu_h = divs[i].offsetHeight;
			ln = i;
			check_l = 1;
		 }
        

     } 

     // assign maximum height value to all of container <div> elements 
if(check_n == 1 && check_l == 1)
	{
if(container_h > left_menu_h)
	{
		maxHeight = container_h;
		index = cn;
	}
	else
	{
		maxHeight = left_menu_h;
		index = ln;
	}
 if(maxHeight < 400)
	{
		maxHeight = 400;
	}

		document.getElementById("navigation").style.height = maxHeight + "px";
		document.getElementById("left_div").style.height = maxHeight + "px";
	}
	
        //  divs[index].style.height=maxHeight + "px"; 

     

} 

// Runs the script when page loads 

window.onload=function(){ 

     if(document.getElementsByTagName){ 

          matchColumns();			 

     } 

} 



