﻿// JScript File

/* <![CDATA[ */ 

function AdjustColumnsHeight()
{
    // get a reference to the three DIVS that make up the columns
    var container = window.document.getElementById('container');
    var contentwrapper = window.document.getElementById('contentwrapper');
    var contentright = window.document.getElementById('contentright');
    var contentleft = window.document.getElementById('contentleft');    
    var banner = window.document.getElementById('banner');
    var footer =  window.document.getElementById('navbarbottom');
    var content2 = window.document.getElementById('content2');
    var content1 = window.document.getElementById('content1');
    
    // calculate the max height
    var hContainer = container.offsetHeight;
    var hContentWrapper = contentwrapper.offsetHeight;
    var hContentRight = contentright.offsetHeight;
    var hBanner = banner.offsetHeight;
    var hFooter = footer.offsetHeight;
    var hContent1 = content1.offsetHeight;
    var hContent2 = content2.offsetHeight;    
    
    //alert('Container' + hContainer)
    //alert('Wrapper  ' + hContentWrapper)
    //alert('Right Col' + hContentRight)
    
    var maxHeight = Math.max(hContainer, hContentWrapper, hContentRight);

    if (maxHeight < 800)
    {
    maxHeight = 1500;
    }

    // set the height of all 3 DIVS to the max height
    contentright.style.height = maxHeight - hBanner - hContent1 - hFooter + 'px';  
    contentleft.style.height = maxHeight - hBanner - hContent1 - hFooter + 'px'; 
    container.style.height = maxHeight + 'px';
    contentwrapper.style.height = maxHeight + 'px';  
    
    // Show the footer
    //window.document.getElementById('navbarbottom').style.visibility = 'inherit';

}


function div1mouseover(divid, id)
{
    document.getElementById(divid).style.backgroundImage = "url(Images/TornPaper" + id + "On.png)";
}

function div1mouseout(divid, id)
{
    document.getElementById(divid).style.backgroundImage = "url(Images/TornPaper" + id + ".png)";
}


function hidediv(divid, mode)
{

    if (mode = '0')
    {
        document.getElementById(divid).style.visibility = "hidden";
    }
    else
    {
         document.getElementById(divid).style.visibility = "visible";
    }
}   


window.onload = function() { AdjustColumnsHeight(); }   



