// expand or collapse the list by setting the correct style
// on the parent list item.
function toggleList( theItem )
{
  for(var x=0;x < theItem.childNodes.length;x++){
    if(theItem.childNodes[x]){
      if (theItem.childNodes[x].nodeName == "UL") {
        if (theItem.childNodes[x].style.display == "none") {
          theItem.childNodes[x].style.display = "block";
        }
        else {
          theItem.childNodes[x].style.display = "none";
        }
      }
    }
  }
}

// prevent a click on a child list element from reaching the
// parent.  
function cancel( evt )
{
  // stop event from bubbling
  if( window.event )
    window.event.cancelBubble = true;  // ie
  else if (evt.stopPropagation) 
    evt.stopPropagation();  // firefox
}

