
        function AdjustColumnsHeight()
        {

//            var column1YShift = -37;
            var column1YShift = 0;

            var hColumn1 = 0;
            var hColumn2 = 0;
            var hColumn3 = 0;
            var hColumn23 = 0;
            var hColumn123 = 0;
            var hColumn4 = 0;

            // get a reference to the DIVS that make up the columns

            var column1 = window.document.getElementById('column1');
            var column2 = window.document.getElementById('column2');
            var column3 = window.document.getElementById('column3');
            var column23 = window.document.getElementById('column23');
            var column123 = window.document.getElementById('column123');
            var column4 = window.document.getElementById('column4');
            
            // calculate the max height

            if (column1 != null)
            {

                if (column1 != null) {hColumn1 = column1.offsetHeight;}
                if (column2 != null) {hColumn2 = column2.offsetHeight;}
                if (column3 != null) {hColumn3 = column3.offsetHeight;}
                if (column23 != null) {hColumn23 = column23.offsetHeight;}
                if (column123 != null) {hColumn123 = column123.offsetHeight;}
                if (column4 != null) {hColumn4 = column4.offsetHeight;}
                
                var maxHeight = Math.max(hColumn1 + column1YShift,Math.max(hColumn2,Math.max(hColumn3,Math.max(hColumn23,Math.max(hColumn123 + column1YShift,hColumn4)))));

//                alert("1:" + hColumn1.toString() + "; " + "2:" + hColumn2.toString() + "; " + "3:" + hColumn3.toString() + "; " + "23:" + hColumn23.toString() + "; " + "123:" + hColumn123.toString() + "; " + "4:" + hColumn4.toString() + "; max:" + maxHeight.toString());

                // set the height of all DIVS to the max height
                if (maxHeight == hColumn1 + column1YShift)
                {
//                    alert("Layout has column1, which is the tallest");
                    if (column2 != null) {column2.style.height = maxHeight + 'px';}
                    if (column3 != null) {column3.style.height = maxHeight + 'px';}
                    if (column23 != null) {column23.style.height = maxHeight + 'px';}
                    if (column123 != null) {column123.style.height = maxHeight + 'px';}
                    if (column4 != null) {column4.style.height = maxHeight + 'px';}
                }
                else
                {
//                    alert("Layout has column1, which is not the tallest");
                    if (column1 != null) {column1.style.height = maxHeight - column1YShift + 'px';}
                    if (column2 != null) {column2.style.height = maxHeight + 'px';}
                    if (column3 != null) {column3.style.height = maxHeight + 'px';}
                    if (column23 != null) {column23.style.height = maxHeight + 'px';}
                    if (column123 != null) {column123.style.height = maxHeight + 'px';}
                    if (column4 != null) {column4.style.height = maxHeight + 'px';}
                }
            }
            else
            {
                if (column1 != null) {hColumn1 = column1.offsetHeight;}
                if (column2 != null) {hColumn2 = column2.offsetHeight;}
                if (column3 != null) {hColumn3 = column3.offsetHeight;}
                if (column23 != null) {hColumn23 = column23.offsetHeight;}
                if (column123 != null) {hColumn123 = column123.offsetHeight;}
                if (column4 != null) {hColumn4 = column4.offsetHeight;}
                
                var maxHeight = Math.max(hColumn1,Math.max(hColumn2,Math.max(hColumn3,Math.max(hColumn23,Math.max(hColumn123,hColumn4)))));

//                alert("1:" + hColumn1.toString() + "; " + "2:" + hColumn2.toString() + "; " + "3:" + hColumn3.toString() + "; " + "23:" + hColumn23.toString() + "; " + "123:" + hColumn123.toString() + "; " + "4:" + hColumn4.toString() + "; max:" + maxHeight.toString());

                // set the height of all DIVS to the max height
//                alert("Layout has no column1");
                if (column1 != null) {column1.style.height = maxHeight + 'px';}
                if (column2 != null) {column2.style.height = maxHeight + 'px';}
                if (column3 != null) {column3.style.height = maxHeight + 'px';}
                if (column23 != null) {column23.style.height = maxHeight + 'px';}
                if (column123 != null) {column123.style.height = maxHeight + 'px';}
                if (column4 != null) {column4.style.height = maxHeight + 'px';}

            }
            
        }
        window.onload = function() { AdjustColumnsHeight(); }


