﻿
window.onload = function() {
    var centerPanel = document.getElementById('centerPanel');
    var homePagePanel = document.getElementById('homePagePanel');
    var subtiteNav = document.getElementById('subsiteNav');
    var subcontent = document.getElementById('subcontent');

    var wrapHeight = 0;

    if (centerPanel){
    	if (centerPanel.clientHeight > wrapHeight) wrapHeight = centerPanel.clientHeight;
    }
    if (homePagePanel){
    	if (homePagePanel.clientHeight > wrapHeight) wrapHeight = homePagePanel.clientHeight;
    }
    if(subtiteNav){
    	if (subtiteNav.clientHeight > wrapHeight) wrapHeight = subtiteNav.clientHeight;
    }

    if (subcontent.clientHeight > wrapHeight) wrapHeight = subcontent.clientHeight;

    var headerPanel = document.getElementById('headerPanel');

    document.getElementById('page').style.height = wrapHeight + headerPanel.clientHeight + 'px';
}