function changeThemeRollover(id, img, action, id2, img2) 
{
    if (action == 'over') {
        document.getElementById(id).src = "/MACCWR/SiteDesigns/Default/images/design/a_theme_transparent.gif";

    }
    else if (action == 'out') {
        document.getElementById(id).src = img;
    }
    
    if (action == 'over') {
        document.getElementById(id2).style.backgroundImage = "url('" + img2 + "')";

    }
    else if (action == 'out') {
        document.getElementById(id2).style.backgroundImage = "url('" + img2 + "')";
    }
}

function changeRollover(id, action, newImg) {

    document.getElementById(id).style.backgroundImage = "url('" + newImg + "')";
}

function changeFeatureRollover(id, img) {

    document.getElementById(id).style.backgroundImage = "url('" + img + "')";
}

function toggleTextGraphics() 
{
    // IE    
    if (document.getElementById("text_graphic_toggle").innerText)
    {
        if (document.getElementById("text_graphic_toggle").innerText == "View Text Only") 
        {
            document.getElementById("text_graphic_toggle").innerText = "View With Graphics";
        }
        else 
        {
            document.getElementById("text_graphic_toggle").innerText = "View Text Only";
        }
    }
    
    // Firefox
    if (document.getElementById("text_graphic_toggle").textContent)
    {
        if (document.getElementById("text_graphic_toggle").textContent == "View Text Only") 
        {
            document.getElementById("text_graphic_toggle").textContent = "View With Graphics";
        }
        else {
            document.getElementById("text_graphic_toggle").textContent = "View Text Only";
        }
    }
}

function changeFooterButtonRollover(obj, action) 
{
    var img = obj.src;
    var pos;

    if (action == 'over') 
    {
        pos = img.indexOf(".gif");
    }
    else if (action == 'out') 
    {
        pos = img.indexOf("_rollover.gif");
    }

    var subString = img.substring(0, pos);
    var newString;

    if (action == 'over')
    {
        newString = subString + '_rollover.gif';
    }
    if (action == 'out') 
    {
        newString = subString + '.gif';
    }

    obj.src = newString;
}

function removeText() {

    if (document.getElementById("svSearchFOR").value == "Keyword Search") {
        document.getElementById("svSearchFOR").value = "";
    }
}

function findHeight() 
{
        //alert("find height fired");
        
        // Get the height of the LHS Navigation:
        var landingContainer = document.getElementById("landingContainer");
        var landingContainer_Height = ncBPFramework.DOM.elementDimensions(landingContainer).h;
        //alert("landingContainer Height: " + landingContainer_Height);
        
        // Get the height of the right hand side
        var landingRghContent = document.getElementById("landingRghContent"); 
        var landingRghContent_Height = ncBPFramework.DOM.elementDimensions(landingRghContent).h;
        //alert("landingRghContent Height: " + landingRghContent_Height);

        var combinedRightHeight = landingRghContent_Height;  //+ 68;
        //alert("Right Height: " + combinedRightHeight);

        // Now move the footer in line with the bottom left navigation
        if (combinedRightHeight < landingContainer_Height) 
        {
            var marginValue = landingContainer_Height - combinedRightHeight;
            //alert("marginValue: " + marginValue);
            marginValue = marginValue + "px 0px 0px 0px";
            var footerElement = document.getElementById("footerNav");
            footerElement.style.margin = marginValue;
        }

        // Get the height of the right breadcrumb:
        var landingBreadCrumbRight = document.getElementById("landing_bread_crumb_right");
        var landingBreadCrumbRight_Height = ncBPFramework.DOM.elementDimensions(landingBreadCrumbRight).h;
        //alert("landingBreadCrumbRight Height: " + landingBreadCrumbRight_Height);

        // Set the height of the left breadcrumb:
        var landingBreadCrumbLeft = document.getElementById("landing_bread_crumb_left");
        //alert("landingBreadCrumbLeft: " + landingBreadCrumbLeft);
        var heightValue = landingBreadCrumbRight_Height + "px";
        //alert("heightValue: " + heightValue);
        landingBreadCrumbLeft.style.height = heightValue;
        //alert("finish");

    }

