﻿function resizeLayout() {       
    headerHeight = parseInt(document.getElementById('bannerRow').offsetHeight);
    footerHeight = parseInt(document.getElementById('footerRow').offsetHeight);	    

    document.getElementById('bannerRow').style.height = '245px';
    document.getElementById('footerRow').style.height = '30px';

    var contentHeight = document.getElementById('aspPlaceHolder').clientHeight;
    var contentHeightOffset = parseInt(document.getElementById('bannerRow').style.height) + parseInt(document.getElementById('footerRow').style.height);
    
    if((document.documentElement.clientHeight - contentHeightOffset) > parseInt(contentHeight)){
       document.getElementById('menuContentRow').style.height = (document.documentElement.clientHeight - contentHeightOffset) + 'px';
    } else {
        document.getElementById('menuContentRow').style.height = contentHeight + 'px';
    }
}

function resizeLayoutTo(passedHeight) {       
    headerHeight = parseInt(document.getElementById('bannerRow').offsetHeight);
    footerHeight = parseInt(document.getElementById('footerRow').offsetHeight);	    

    document.getElementById('bannerRow').style.height = '245px';
    document.getElementById('footerRow').style.height = '30px';
    
    var contentHeight = passedHeight;
    var contentHeightOffset = parseInt(document.getElementById('bannerRow').style.height) + parseInt(document.getElementById('footerRow').style.height);
    
    if((document.documentElement.clientHeight - contentHeightOffset) > parseInt(contentHeight)){
        document.getElementById('menuContentRow').style.height = (document.documentElement.clientHeight - contentHeightOffset) + 'px';
    } else {
        document.getElementById('menuContentRow').style.height = contentHeight + 'px';
    }
}
