function hideShowRes(divID, twoCol){
    var divVar = document.getElementById(divID);
    if(divVar.style.display == "none" || !divVar.style.display){
        divVar.style.display = "block";
        if(twoCol){
            setNewHeight(1);
        }
    }
    else{
        divVar.style.display = "none";
        if(twoCol){
            setNewHeight(0);
        }
    }
}

var orgHeight;

function checkModHeight(){
    var signInMod = document.getElementById("signInMod");
    var signUpMod = document.getElementById("signUpMod");

    if(signInMod && signUpMod){
        var maxH = Math.max(signInMod.offsetHeight,signUpMod.offsetHeight) - 30;
        orgHeight = maxH;
        signInMod.style.height=maxH+'px';
        signUpMod.style.height=maxH+'px';
    }
}

function setNewHeight(setHeight){
    var newHeight = document.getElementById("moreHelpArea");
    var signInMod = document.getElementById("signInMod");
    var signUpMod = document.getElementById("signUpMod");

    if(signInMod && signUpMod){
        if(setHeight){
            var totalHeight = newHeight.offsetHeight + signInMod.offsetHeight -100;
            signInMod.style.height=totalHeight+'px';
            signUpMod.style.height=totalHeight+'px';
        }
        else{
            signInMod.style.height=orgHeight+'px';
            signUpMod.style.height=orgHeight+'px';
        }
    }

}

addLoadEvent(checkModHeight);

