//this script loops through all subsections

function hideSubSections() {
 if (!getElementsByClass) return;
 var subsections = getElementsByClass("subsection");
 for (var i=0; i<subsections.length; i++) {
   var subsection = subsections[i];
   subsection.style.display="none";
 } //end for (var i=0; i<subsections.length; i++)
} //end function hideSubSections

function showSubSection(objLink) {
  hideSubSections();
  if (objLink.href!=='') {
    id=objLink.href.split('#');
    id=id[1];
    if (document.getElementById(id)) { document.getElementById(id).style.display="block"; }
  } //end if (anc.href&&anc.href!=='')
} //end function showSubSection(anc)

function initSubSections() {
  hideSubSections();
 var anchors = getElementsByClass("showSubSection");
 for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
	anchor.onclick = function () { showSubSection(this); return false; }
  }
 var subsections = getElementsByClass("subsection");
 subsections[0].style.display="block";
} //end function showSubSection(anc)

addLoadEvent(initSubSections);
