/* Script to pop open a hidden sub-section category and scroll down to the anchor link.
This script can handle list items with multiple classes, just supply the class
which does the hiding as a parameter. The function requires two parameters:
the id of the containing element and the class which hides the list items.
class of the hidden list items. */

function popOpen(whichElem) {
   if (!document.getElementById && !document.getElementsByTagName) return false;
   theElem = document.getElementById(whichElem);
   var whichLink = theElem.getElementsByTagName("div");
   if (whichLink.length > 0)
   {
       whichLink[0].style.display = "block";
       var theH4 = theElem.getElementsByTagName("h4");
       var theLink = theH4[0].getElementsByTagName("a");
       theLink[0].className = "drawerOpen";
   }
}