matchHeight=function(){ 
     var divs,contDivs,maxHeight,divHeight,di; 
     // 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 ii=0;ii<divs.length;ii++){ 
          // make collection with <div> elements with class attribute 'container' 
          if(/\bcontainer\b/.test(divs[ii].className)){ 
                di=divs[ii]; 
                contDivs[contDivs.length]=di; 
                // determine height for <div> element 
                if(di.offsetHeight){ 
                     divHeight=di.offsetHeight; 
                } 
                else if(di.style.pixelHeight){ 
                     divHeight=di.style.pixelHeight; 
                } 
                // calculate maximum height 
                maxHeight=Math.max(maxHeight,divHeight); 
          } 
     } 
     // assign maximum height value to all of container <div> elements 
     for(var ii=0;ii<contDivs.length;ii++){ 
          contDivs[ii].style.height=maxHeight; 
     } 
} 
