﻿function bodyHeightComp()
{
var intSiteMapNodeHeight=document.getElementById("siteMapNode").offsetHeight;
var intContentHeight = document.getElementById("contentBody").offsetHeight+147;/* 147 = 57 height of uppergradient+ ,+20 body padding-top and padding-bottom ,+70 of contentFooter*/    
var intCommunityHeight=document.getElementById("community").offsetHeight;
var intSubSideLinkBodyHeight=document.getElementById("subSideLinkBody").offsetHeight+6+8;/*6 is the height of subSideLinkUpper, 8 is the height of subSideLinkBottom */
var intMainSideLinkHeight=document.getElementById("mainSideLink").offsetHeight;/*126 is the height of lowerlink*/
var intLowerLink=document.getElementById("lowerLink").offsetHeight;/*lowerlink images of the main link*/
var intContentHighestDiv = Math.max(intMainSideLinkHeight, intContentHeight);

//alert("Content Height: "+ intContentHeight);
//alert("Side Height: "+intMainSideLinkHeight);
//alert("Highest: "+intContentHighestDiv);
    if (intContentHeight<=intMainSideLinkHeight)
    {  
        document.getElementById("contentBody").style.height = (intContentHighestDiv-147) + "px"; /* 147 = 57 height of uppergradient+ ,+20 body padding-top and padding-bottom ,+70 of contentFooter*/
//         alert(intCommunityHeight);
    }
    else
    {
        document.getElementById("contentBody").style.height = (intContentHighestDiv-156) + "px"; /* 147 = 57 height of uppergradient+ ,+20 body padding-top and padding-bottom ,+70 of contentFooter, +9(unknown)*/
        
        var intHeight=intContentHighestDiv -intMainSideLinkHeight;        
        document.getElementById("community").style.height = intHeight+171 + "px"; //+41+30(unknown)*/
        
    }
}