function autoHeight(expandContainer) {
    try {
        setWrapFooter();

        if (expandContainer) {
            window.onresize = function() {
                autoHeight(expandContainer);
            }
        }
        var window_height = jQuery(window).height();
        var wrap_container_height = jQuery("#content").outerHeight() + parseInt(jQuery("#wrap-container").css("margin-top"));
        var wrap_footer_height = jQuery("#wrap-footer").outerHeight() || 0;
        var wrap_footer_bottom = parseInt(jQuery("#wrap-footer").css("margin-bottom"));
        var wrap_page_ref_height = jQuery("#wrap-page-ref").outerHeight() || 0;

        if (expandContainer) {
            if ((window_height - wrap_container_height - wrap_footer_bottom) > wrap_footer_height + wrap_page_ref_height) {
                push_height = (window_height - wrap_container_height - wrap_footer_bottom - wrap_page_ref_height);
            } else {
                push_height = (wrap_footer_height + wrap_page_ref_height);
            }
        } else {
            push_height = (wrap_footer_height);
        }
        document.getElementById('push').style.height = push_height + "px";
        document.getElementById('wrap-container').style.marginBottom = (0 - wrap_footer_height) + "px";
    }
    catch (e) {}
};

function setWrapFooter() {
    try {
        /*var fwrap1 = document.getElementById('fwrap1');
        var fwrap2 = document.getElementById('fwrap2');
        var fwrap3 = document.getElementById('fwrap3');
*/
        /*fwrap1.style.height = fwrap2.style.height = fwrap3.style.height = jQuery("#wrap-footer").outerHeight() + "px";*/
    }
    catch (e) {}
}

