//alert(document.getElementById("footer").offsetHeight);

function getStyle(oElm, strCssRule){
    var strValue = "";
    if(document.defaultView && document.defaultView.getComputedStyle){
        strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
    }
    else if(oElm.currentStyle){
        strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
            return p1.toUpperCase();
        });
        strValue = oElm.currentStyle[strCssRule];
    }
    return strValue;
}

var docHeight = 600;

if (window.innerHeight) {
	var docHeight = parseInt(window.innerHeight);
}

if (document.body && document.body.offsetHeight) {
	var docHeight = parseInt(document.body.offsetHeight);
}

var headerHeight = 175;
var topnavHeight = 31;
var footerHeight = 29;
var puffer       = 43;

var newContentDivHeight = docHeight - headerHeight - topnavHeight - footerHeight - puffer - addheight;

newContentDivHeight = newContentDivHeight + "px";

document.getElementById("contentmiddle").style.height = newContentDivHeight;


