/* 
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(){ 

     var divs,diff,col1Height, col2Height,rightHeight,d1,d2,maxHeight; 
	 var found1 = false;
	 var found2 = false;
	
     // get all <div> elements in the document 

     divs=document.getElementsByTagName('div'); 

     contDivs=[]; 

     // initialize maximum height value 

     maxHeight=0; 

     // iterate over all <div> elements in the document 

     for(var i=0;i<divs.length;i++){ 

          // make collection with <div> elements with class attribute 'container' 

          if(/\bwelcome_text\b/.test(divs[i].className)){ 

                d1=divs[i]; 

                //contDivs[contDivs.length]=d; 

                // determine height for <div> element 

                if(d1.offsetHeight){ 

                     col1Height=d1.offsetHeight; 					

                } 

                else if(d1.style.pixelHeight){ 

                     col1Height=d1.style.pixelHeight;					 

                } 

                // calculate maximum height 

				found1 = true;

          } 
		  else
          if(/\bnews_text\b/.test(divs[i].className)){ 

                d2=divs[i]; 


                // determine height for <div> element 

                if(d2.offsetHeight){ 

                     col2Height=d2.offsetHeight; 					

                } 

                else if(d2.style.pixelHeight){ 

                     col2Height=d2.style.pixelHeight;					 

                } 

                // calculate maximum height 

				found2 = true;

          }
		  
		  if(found1&&found2)
		   break;

     } 

     // assign maximum height value to all of container <div> elements 
 
	         //rightHeight = col2Height + 95;
			 rightHeight = col2Height + 97;
			 if(rightHeight < col1Height)
			 {
			  diff = col1Height - rightHeight;
			  col2Height = col2Height + diff;
			 }
			 else
			  if(rightHeight > col1Height)
			  {
			   diff = rightHeight - col1Height;
			   col1Height = col1Height + diff;
			  } 
		 

          d1.style.height=col1Height + "px"; 
		  d2.style.height=col2Height + "px";
		  

} 

// Runs the script when page loads 

window.onload=function(){ 

     if(document.getElementsByTagName){ 

          matchColumns();			 

     } 

} 


