 function removeEmptyNavLists(navID)
 {
     var ulCollection;                   // stores all the <ul> children of the navigation <ul>.
     var liCollection;                   // stores all the <li> children of various <ul> elements.
     var deletedChild;                   // temporary variable. Represents the child <ul> that is to be deleted.
     var deletionArray = new Array();    // stores references to all the <ul> elements that do not have children and will be eliminated. The hitlist.
     
     // 'get' the navigation menu, store it under the 'navigationList' variable.
     navigationList = document.getElementById(navID);
     
     // collect all child <ul> elements into a single object.
     ulCollection = navigationList.getElementsByTagName("UL");               
         
     // collect all child <li> elements of the current <ul>.
     for(ulCounter=0; ulCounter < ulCollection.length; ulCounter++)
     {
         liCollection = ulCollection[ulCounter].getElementsByTagName("LI");  
         if(liCollection.length < 1)
         {
             deletionArray[deletionArray.length] = ulCollection[ulCounter];
         }
     }
 
     // loop thru the 'deletionArray' and starting deleting nodes.
     for(x=0; x < deletionArray.length; x++)
     {
             deletedChild = deletionArray[x].parentNode.removeChild(deletionArray[x]);
     }
 }