function v2_ExpandCollapseList(ExpandBooleanField, ListPanel, HeaderPanel) 
{
    if ($(ExpandBooleanField).value == 'true') 
    {
        v2_CollapseList(ExpandBooleanField, ListPanel, HeaderPanel);
    }
    else
    {
        v2_ExpandList(ExpandBooleanField, ListPanel, HeaderPanel); 
    }
}

function v2_ExpandList(ExpandBooleanField, ListPanel, HeaderPanel)
{
    $(ExpandBooleanField).value = 'true';
    $(ListPanel).className = "ExpandableList_ListContainer";
    $(HeaderPanel).className = "ExpandableList_ToggleOpen";
}

function v2_CollapseList(ExpandBooleanField, ListPanel, HeaderPanel)
{
    $(ExpandBooleanField).value = 'false';
    $(ListPanel).className = "ExpandableList_ListContainer_Hide";
    $(HeaderPanel).className = "ExpandableList_Toggle";
}

function v2_ExpandCollapseListAlt(ExpandBooleanField, ListPanel, HeaderPanel, UseAltStyle) 
{
    if ($(ExpandBooleanField).value == 'true') 
    {
        v2_CollapseList(ExpandBooleanField, ListPanel, HeaderPanel);
    }
    else
    {
        v2_ExpandListAlt(ExpandBooleanField, ListPanel, HeaderPanel, UseAltStyle); 
    }
}

function v2_ExpandListAlt(ExpandBooleanField, ListPanel, HeaderPanel, UseAltStyle)
{
    $(ExpandBooleanField).value = 'true';
    if (UseAltStyle == 'True')
    {
        $(ListPanel).className = "ExpandableList_ListContainer";    
    }
    else
    {
        $(ListPanel).className = "ExpandableList_ListContainerAlt";    
    }
    $(HeaderPanel).className = "ExpandableList_ToggleOpen";
}

function ExpandCollapseList(ExpandBooleanField, ListPanel, HeaderPanel, DateLabel, ArrowImageControl, OpenArrow, ClosedArrow) 
{
    if ($(ExpandBooleanField).value == 'true') 
    {
        CollapseList(ExpandBooleanField, ListPanel, HeaderPanel, DateLabel, ArrowImageControl, ClosedArrow);
    }
    else
    {
        ExpandList(ExpandBooleanField, ListPanel, HeaderPanel, DateLabel, ArrowImageControl, OpenArrow);
    }
}

function ExpandList(ExpandBooleanField, ListPanel, HeaderPanel, DateLabel, ArrowImageControl, ArrowImage)
{
    $(ExpandBooleanField).value = 'true';
    $(ListPanel).className = "ExpandibleLists_ListContainerSelected";
    $(DateLabel).className = "ExpandibleLists_Date"
    $(ArrowImageControl).src = ArrowImage;
    $(ArrowImageControl).alt = 'List Expanded';
    $(HeaderPanel).className = "ExpandibleLists_ListContainerSelected";
}

function CollapseList(ExpandBooleanField, ListPanel, HeaderPanel, DateLabel, ArrowImageControl, ArrowImage)
{
    $(ExpandBooleanField).value = 'false';
    $(ListPanel).className = "ExpandibleLists_ListContainer_Hide";
    $(DateLabel).className = "ExpandibleLists_Date_Hide"
    $(ArrowImageControl).src = ArrowImage;
    $(ArrowImageControl).alt = 'List Closed';
    $(HeaderPanel).className = "ExpandibleLists_ListContainer";
}

function ShowHideDropDown(ShowBooleanField, ListPanel, HeaderPanel)
{
    if ($(ShowBooleanField).value == 'true') 
    {
        HideDropDown(ShowBooleanField, ListPanel, HeaderPanel);
    }
    else
    {
        ShowDropDown(ShowBooleanField, ListPanel, HeaderPanel);
    }
}

function HideDropDown(ShowBooleanField, ListPanel, HeaderPanel)
{
    $(ShowBooleanField).value = 'false';
    $(ListPanel).className = "SearchRefineDD_ListContainer_Hide";
    $(HeaderPanel).className = "SearchRefineDD_Header";
}

function ShowDropDown(ShowBooleanField, ListPanel, HeaderPanel)
{
    $(ShowBooleanField).value = 'true';
    $(ListPanel).className = "ExpandableList_ListContainerAlt";
    $(HeaderPanel).className = "SearchRefineDD_Header_Hide";
}