

function closeParticipatingBusinessBody(switchImageID, containerID, headerContainerID)
{
    var switchImage = document.getElementById(switchImageID);
    var container = document.getElementById(containerID);
    var headerContainer = document.getElementById(headerContainerID);

    if (switchImage)
    {
        if (switchImage.src.indexOf("minus") >= 0)
        {
            switchImage.src = switchImage.src.replace("minus", "plus");
            container.style.display = 'none';
            headerContainer.className = 'ParticipatingBusinessHeaderContainerClosed';
        }
    }
}

function toggleParticipatingBusinessBody(switchImageID, containerID, headerContainerID)
{
    var switchImage = document.getElementById(switchImageID);
    var container = document.getElementById(containerID);
    var headerContainer = document.getElementById(headerContainerID);

    if (switchImage)
    {
        if (switchImage.src.indexOf("plus") >= 0)
        {
            switchImage.src = switchImage.src.replace("plus", "minus");
            container.style.display = 'block';
            headerContainer.className = 'ParticipatingBusinessHeaderContainerExpanded';
        }
        else if (switchImage.src.indexOf("minus") >= 0)
        {
            switchImage.src = switchImage.src.replace("minus", "plus");
            container.style.display = 'none';
            headerContainer.className = 'ParticipatingBusinessHeaderContainerClosed';
        }
    }
}

function activateParticipatingBusiness(businessType)
{
    switch (businessType)
    {
        case "attractions":
            toggleParticipatingBusinessBody("_attractionsSwitch", "_attractionsBody", "_attractionsHeaderContainer");
            closeParticipatingBusinessBody("_lodgingSwitch", "_lodgingBody", "_lodgingHeaderContainer");
            closeParticipatingBusinessBody("_restaurantsSwitch", "_restaurantsBody", "_restaurantsHeaderContainer");
            closeParticipatingBusinessBody("_shoppingSwitch", "_shoppingBody", "_shoppingHeaderContainer");
           break;
        case "lodging":
            closeParticipatingBusinessBody("_attractionsSwitch", "_attractionsBody", "_attractionsHeaderContainer");
            toggleParticipatingBusinessBody("_lodgingSwitch", "_lodgingBody", "_lodgingHeaderContainer");
            closeParticipatingBusinessBody("_restaurantsSwitch", "_restaurantsBody", "_restaurantsHeaderContainer");
            closeParticipatingBusinessBody("_shoppingSwitch", "_shoppingBody", "_shoppingHeaderContainer");
            break;
        case "restaurants":
            closeParticipatingBusinessBody("_attractionsSwitch", "_attractionsBody", "_attractionsHeaderContainer");
            closeParticipatingBusinessBody("_lodgingSwitch", "_lodgingBody", "_lodgingHeaderContainer");
            toggleParticipatingBusinessBody("_restaurantsSwitch", "_restaurantsBody", "_restaurantsHeaderContainer");
            closeParticipatingBusinessBody("_shoppingSwitch", "_shoppingBody", "_shoppingHeaderContainer");
            break;
        case "shopping":
            closeParticipatingBusinessBody("_attractionsSwitch", "_attractionsBody", "_attractionsHeaderContainer");
            closeParticipatingBusinessBody("_lodgingSwitch", "_lodgingBody", "_lodgingHeaderContainer");
            closeParticipatingBusinessBody("_restaurantsSwitch", "_restaurantsBody", "_restaurantsHeaderContainer");
            toggleParticipatingBusinessBody("_shoppingSwitch", "_shoppingBody", "_shoppingHeaderContainer");
            break;
        case "none":
            closeParticipatingBusinessBody("_attractionsSwitch", "_attractionsBody", "_attractionsHeaderContainer");
            closeParticipatingBusinessBody("_lodgingSwitch", "_lodgingBody", "_lodgingHeaderContainer");
            closeParticipatingBusinessBody("_restaurantsSwitch", "_restaurantsBody", "_restaurantsHeaderContainer");
            closeParticipatingBusinessBody("_shoppingSwitch", "_shoppingBody", "_shoppingHeaderContainer");
            break;
    }
}