﻿
        function AdjustColumnsHeight()
        {

            var hColumnL = 0;
            var hColumnM = 0;
            var hColumnR = 0;

            // get a reference to the DIVS that make up the columns

            var columnL = window.document.getElementById('contentL');
            var columnM = window.document.getElementById('contentM');
            var columnR = window.document.getElementById('contentR');
            
            // calculate the max height

            if (columnL != null) {hColumnL = columnL.offsetHeight;}
            if (columnM != null) {hColumnM = columnM.offsetHeight;}
            if (columnR != null) {hColumnR = columnR.offsetHeight;}
            
            var maxHeight = Math.max(hColumnL,Math.max(hColumnM,hColumnR));

//            alert("L:" + hColumnL.toString() + "; " + "M:" + hColumnM.toString() + "; " + "R:" + hColumnR.toString() + "; " + "max:" + maxHeight.toString());

            // set the height of all DIVS to the max height
//                alert("Layout has no columnL");
            if (columnL != null) {columnL.style.height = maxHeight + 'px';}
            if (columnM != null) {columnM.style.height = maxHeight + 'px';}
            if (columnR != null) {columnR.style.height = maxHeight + 'px';}

            // Show the footer
//            window.document.getElementById('footer').style.visibility = 'inherit';
//            window.document.getElementById('footer').style.top = (maxHeight + 148).toString() + 'px';
        }
        window.onload = function() { AdjustColumnsHeight(); }

