var allHeight = 0;
var maintab = document.getElementById('maintab');
var mainrow = document.getElementById('mainrow');
for(i=0;i<maintab.rows.length;i++) {
if (maintab.rows[i].id != 'mainrow') {
allHeight += maintab.rows[i].offsetHeight;
}
}
iHeight = document.body.offsetHeight;
var addHeight = iHeight - allHeight;
if (addHeight > 0) {
mainrow.style.height = addHeight + 'px';
maintab.style.height = '100%';
}
function myresize(evt) {
iHeight = document.body.offsetHeight;
var addHeight = iHeight - allHeight;
if (addHeight > 0) {
mainrow.style.height = addHeight + 'px';
maintab.style.height = '100%';
}
document.location.reload();
}
window.onresize = myresize