// JavaScript Document
function change(listIdPrefix,group) {
    collapsedList = document.getElementById(listIdPrefix + "_closed");
    expandedList = document.getElementById(listIdPrefix + "_opened");
    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] + "_closed").style.display = "block";
            document.getElementById(group[i] + "_opened").style.display = "none";
}
    }
}

// mutually exclusive lists
var A = new Array();
A[A.length] = "list6";
A[A.length] = "list5";
A[A.length] = "list4";
A[A.length] = "list3";
A[A.length] = "list1";
A[A.length] = "list2";
