        function spanClick(obj)
        {
            var li = getFirstParent(obj,"li");
            var ul = li.getElementsByTagName("ul")[0];
            var newDisplay = ul.style.display==""?"block":"";
            hideAll(obj);
            ul.style.display=newDisplay;
            var parentUL = getFirstParent(obj,"UL");
            while(parentUL!=null)
            {
              parentUL.style.display = "block";
              parentUL = getFirstParent(parentUL,"UL");
            }
        }        
        function getFirstParent(obj,tag)
        {
            obj = obj.parentNode;
            while(obj.tagName.toUpperCase()!=tag.toUpperCase())
            {
               if(obj.tagName.toUpperCase()=="BODY")
               {
                   return null;
               }
               obj = obj.parentNode;
            }
            return obj;
        }
        function hideAll(obj)
        {
	    var baseUL = getTopMostParent(obj,"UL");
	    var uls = baseUL.getElementsByTagName("UL");
            var iCount;
            for(iCount=0;iCount<uls.length;iCount++)
            {
              uls[iCount].style.display = "";
            }
        }
        function getTopMostParent(obj,tag)
        {
            var node = null;
            var obj = obj.parentNode;
            while(obj.tagName.toUpperCase()!="BODY")
            {
                if(obj.tagName.toUpperCase()==tag.toUpperCase())
                {
                    node=obj;
                }
                obj = obj.parentNode;
            }
            return node;
        }
        

