/*############################################################################## # Copyright (C) 2011 HPCC Systems. # # All rights reserved. This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . ############################################################################## */ var a_fixedTableNames = []; function initFixedTables(fixedTableNames) { if (typeof fixedTableNames != 'undefined') a_fixedTableNames = a_fixedTableNames.concat( fixedTableNames ); var nFixedTables = a_fixedTableNames.length; if (nFixedTables) { document.body.onresize=resizeFixedTableBodyDivs; for (var i=0; i h) bDiv.style.height = h; else { var tw = bTable.offsetWidth; var th = bTable.offsetHeight; var dw = bDiv.offsetWidth; var doubleBorder = 2; if (dw < tw+doubleBorder) bDiv.style.height = Math.min(h, th+20);//add height to fit horiz scrollbar to avoid vertical scrollbar else if (dw > tw+doubleBorder) bDiv.style.height = th+doubleBorder; } resizeFixedTableHeaderDiv(bDiv, a_fixedTableNames[0]) for (var i=1; i