
/*
 * Re-sizes a frame based on size of the window contnent, plus an extra few
 * pixels
 */
function iFrameHeight(id) {
    // Firefox, mozilla-based browsers
    if(document.getElementById && !(document.all)) {
        var h = document.getElementById(id).contentDocument.body.scrollHeight
        h += 40
        document.getElementById(id).style.height = h + "px"
        // IE (all versions)
    } else if(document.all) {
        var h = document.frames(id).document.body.scrollHeight
        h += 40
        document.all[id].style.height = h + "px"
    }
    
}

function adjustTopFrame() {
    var id  = 'mainframe'
    // Firefox, mozilla-based browsers
    if(document.getElementById && !(document.all)) {
        var h = top.document.getElementById(id).contentDocument.body.scrollHeight
        h += 40
        top.document.getElementById(id).style.height = h + "px"
        // IE (all versions)
    } else if(document.all) {
        var h = top.document.frames(id).document.body.scrollHeight
        h += 40
        top.document.all[id].style.height = h + "px"
    }
    
}