$(function() {
    $(window).resize(resize).trigger('resize');    
});

function resize() {
    var h = $(window).height() - $('#header').height() - $('#footer').height() - 30;
    $('#content').css('height', h);
    $('#treeholder').css('height', h - 40);
}

function excel() {
    var iframe = $('#treeholder').get(0);
    var doc = iframe.contentDocument || iframe.contentWindow.document;
    var tree = doc.frames ? doc.frames.tree : doc.getElementById('tree').contentWindow;
    tree.excel();
    tree.initMultipleSelect();
    return false;
}