// JavaScript Document

function GetElementsByClass (rootobj, classname)  // I changed the function name
{
 var temparray = new Array ();
 var inc = 0;
 for (var i = 0; i < rootobj.length; i++)
 {
  if (rootobj [i].className == classname)
   temparray [inc++] = rootobj [i];
 }
 return temparray
}

function sweeptoggle (ec, id)
{
 var thestate = (ec == "expand") ? "block" : "none";
 var inc = 0;
 var alltags = document.getElementById (id).getElementsByTagName ("*");
 var occurence = GetElementsByClass (alltags, "switchcontent");
 while (occurence [inc])
 {
  occurence [inc].style.display = thestate;
  inc++;
 }
 revivestatus ();
}


function ShowPubsPulldown() {if (document.getElementById('publication').style.display == 'block') {document.getElementById('publication').style.display = 'none';}
else {document.getElementById('publication').style.display = 'block';}}
