﻿//FocusForum™ Template ©1990 - 2011 Document view script...
//Author: Dave Jinkersn

var doc;
var docMargin = 1;
window.document.body.onload = docLoad;
window.onresize = docResize;

function docLoad() {
    doc = document.getElementById("document");
    if (doc) {
        doc.style.height = (document.body.parentNode.offsetHeight - document.body.offsetTop - header.offsetHeight - body.offsetHeight - footer.offsetHeight - docMargin) + "px";
        docResize(); 
    }
}

function docResize() {
    doc = document.getElementById("document");
    if (doc) {
        doc.style.height = (document.body.parentNode.offsetHeight - document.body.offsetTop - header.offsetHeight - body.offsetHeight - footer.offsetHeight - docMargin) + "px";
        //alert("parent offset height: " + document.body.parentNode.offsetHeight);
        //alert("body offset top" + document.body.offsetTop);
        //alert("header offset height: " + header.offsetHeight);
        //alert("body offset height: " + body.offsetHeight);
        //alert("footer offset height: " + footer.offsetHeight);
    } 
}

function expandDescription(objText) {
    var objLeft = objText.offsetLeft;
    var objTop = objText.offsetTop;
    objText.style.height = '50px';
    objText.style.top = objTop - 25 + 'px';
    objText.style.left = objLeft + 'px';
    objText.style.position = 'absolute';
}
function colapseDescription(objText) {
    var objLeft = objText.offsetLeft;
    var objTop = objText.offsetTop;
    objText.style.height = '25px';
    objText.style.top = objTop + 25 + 'px';
    objText.style.left = objLeft + 'px';
    objText.style.position = 'static';
}

