<!--
// EXPANDABLE DIVS
// 
function swap(listIdPrefix,group) {
    collapsedList = document.getElementById(listIdPrefix + "_collapsed");
    expandedList = document.getElementById(listIdPrefix + "_expanded");
    if (collapsedList.style.display == "block") {
        collapsedList.style.display = "none";
        expandedList.style.display = "block";
    } else {
        collapsedList.style.display = "block";
        expandedList.style.display = "none";
    }
    if (group) {
        ensureExclusivity(listIdPrefix,group);
    }
}

function ensureExclusivity(listIdPrefix,group) {

//alert("listIdPrefix is " + listIdPrefix + ", group is " + group);

    for (var i = 0 ; i < group.length ; i++) {
        if (group[i] != listIdPrefix) {
            document.getElementById(group[i] + "_collapsed").style.display = "block";
            document.getElementById(group[i] + "_expanded").style.display = "none";
        }
    }
}

// mutually exclusive lists
var groupA = new Array();
groupA[groupA.length] = "list_a_excl";
groupA[groupA.length] = "list_b_excl";
groupA[groupA.length] = "list_c_excl";

//Expandable lists can be nested to an arbitrary depth without any additional complexity. 
//Just nest the divs within which the various list elements are coded. 
//The example below defines mutually exclusive groups of lists at each level of nesting. 

var outerGroup = new Array();
outerGroup[outerGroup.length] = "list_1";
outerGroup[outerGroup.length] = "list_2";

var innerGroup1 = new Array();
innerGroup1[innerGroup1.length] = "list_1_a";
innerGroup1[innerGroup1.length] = "list_1_b";

var innerGroup2 = new Array();
innerGroup2[innerGroup2.length] = "list_2_a";
innerGroup2[innerGroup2.length] = "list_2_b";

//-->