﻿
function adjustColumnsHeight() {

    var vDivMargin = 12;

    var hContent1 = 0;
    var hContent2 = 0;
    var hContent3 = 0;

    // get a reference to the DIVS that make up the columns

    var content1 = window.document.getElementById('Content1');
    var content2 = window.document.getElementById('Content2');
    var content3 = window.document.getElementById('Content3');

    var vDiv1 = window.document.getElementById('VDiv1');
    var vDiv2 = window.document.getElementById('VDiv2');

    // calculate the max height

    if (content1 != null) {

        if (content1 != null) { hContent1 = content1.clientHeight; }
        if (content2 != null) { hContent2 = content2.clientHeight; }
        if (content3 != null) { hContent3 = content3.clientHeight; }

        var maxHeight = Math.max(hContent1, Math.max(hContent2, Math.max(hContent3)));

//        var vDivHeight = maxHeight - 2 * vDivMargin;
        var vDivHeight = maxHeight - vDivMargin;

        vDiv1.style.height = vDivHeight + 'px';
        vDiv2.style.height = vDivHeight + 'px';
    }

}

function pageLoad() {
    adjustColumnsHeight();
}

if (typeof (Sys) !== "undefined") Sys.Application.notifyScriptLoaded();
