if (document.getElementById || document.all) {
    xAddEventListener(window, 'load', winOnLoad, false);
}

var sLeftContentID;
var sMainContentID;

function winOnLoad() {
    sMainContentID = 'mainContent';
    sLeftContentID = 'leftContent';
    var ele = xGetElementById(sMainContentID);
    if (!ele) {
        sMainContentID = 'twoColumnMainContent';
        sLeftContentID = 'twoColumnLeftContent';
        ele = xGetElementById(sMainContentID);
    }
    if (!ele) {
        sMainContentID = 'threeColumnMainContent';
        sLeftContentID = 'threeColumnLeftContent';
        ele = xGetElementById(sMainContentID);
    }
    if (ele && xDef(ele.style, ele.offsetHeight)) { // another compatibility check
        adjustLayout();
        xAddEventListener(window, 'resize', winOnResize, false);
    }

}

function winOnResize() {
    adjustLayout();
}

function adjustLayout() {

    // Get content heights
    var mHeight = xHeight(sMainContentID);
    var lHeight = xHeight(sLeftContentID);

    // Assign maximum height to left side
    if (lHeight > 0 && lHeight < mHeight) xHeight(sLeftContentID, mHeight);

}


