
AddEvent(window,"load",AfterLoad);



function AfterLoad() {
  var list = document.getElementById("list");
  if (list == null) return;

  h2Collection = list.getElementsByTagName("H2");

  if (h2Collection == null) return;
  for (var h2i=0;h2i<h2Collection.length;h2i++) {
    h2 = h2Collection[h2i];
    AddEvent(h2,"click",Expand);



    if (InitialSection != "" &&  h2.innerHTML.replace(/ /g,"").toLowerCase().indexOf(InitialSection.toLowerCase()) > -1) {
      ShowList(h2);
    }
  }

  
}

function Expand(evt) {
  elm = ( (evt.target) ? evt.target : evt.srcElement);
  if (elm.nodeName == "SPAN") elm = elm.parentNode;
  ShowList(elm);
}

function ShowList(elm) {


  var plus = elm.getElementsByTagName("span");
  if (plus != null) plus = plus[0];

  elm = elm.nextSibling;


  var ul = null;
  while (elm != null && elm.nodeName.toLowerCase() != "ul" && elm.nodeName.toLowerCase() !="h2") {
    elm = elm.nextSibling;
  }

  if (elm.nodeName.toLowerCase() == "ul") ul = elm;
  if (ul != null && plus != null) {
    if (plus.innerHTML != "+") {
      ul.style.display = "none";
      plus.innerHTML= "+";
    } else {
      ul.style.display = "block";
      plus.innerHTML= "&minus;";
    }
  }
}

