// JavaScript Document

fixHeight=function(){ 
 
                // Declare and initialize variables
 
                var divs,contDivs,maxHeight,divHeight,d; 
 
                maxHeight=0; 
 
                contDivs=[]; 
 
        
 
                divs=document.getElementsByTagName('div');              // get all <div> elements in the document 
 
                for(var i=0;i<divs.length;i++){                         // for all divs…
 
                        if(/\bfixheight\b/.test(divs[i].className)){    // find those with the class attribute ‘fixheight’…
 
                                 d=divs[i]; 
 
                                 contDivs[contDivs.length]=d; 
 
 
 
                                 // determine their height, defined as either offsetHeight or pixelHeight
 
                                 if(d.offsetHeight){ divHeight=d.offsetHeight; }
 
                                 else if(d.style.pixelHeight){ divHeight=d.style.pixelHeight; } 
 
 
 
                                 // Keep track of the largest div height
 
                                 maxHeight=Math.max(maxHeight,divHeight); 
 
                        } 
 
                } 
 
 
 
                // assign all divs the height of the tallest div
 
                for(var i=0;i<contDivs.length;i++){ 
 
                        contDivs[i].style.height=maxHeight + "px"; 
 
                } 
 
        } 
 
 
 
        // Run fixheight on page load 
 
        window.onload=function(){ 
 
                if(document.getElementsByTagName){ fixHeight(); } 
 
        }
 
        // ]]>
