rem:  if (folder.parent && folder.parent.URI) { return FindNextFolder(folder.parent.URI); } 
context: function FindNextFolder(originalFolderURI){    if (!originalFolderURI) return null;    var originalFolderResource = RDF.GetResource(originalFolderURI);    var folder = originalFolderResource.QueryInterface(Components.interfaces.nsIFolder);    if (!folder) return null;    try {       var subFolderEnumerator = folder.GetSubFolders();       var done = false;       while (!done) {         var element = subFolderEnumerator.currentItem();         var currentSubFolder = element.QueryInterface(Components.interfaces.nsIMsgFolder);         // don't land in the Trash folder.         if(!IsSpecialFolder(currentSubFolder, MSG_FOLDER_FLAG_TRASH)) {           if (currentSubFolder.getNumUnread(false /* don't descend */) > 0) {             // if the child has unread, use it.             return currentSubFolder.URI;           }           else if (currentSubFolder.getNumUnread(true /* descend */) > 0) {             // if the child doesn't have any unread, but it's children do, recurse             return FindNextFolder(currentSubFolder.URI);           }         }         try {           subFolderEnumerator.next();         }          catch (ex) {           done=true;         }      } // while    }    catch (ex) {        // one way to get here is if the folder has no sub folders    }     if (folder.parent && folder.parent.URI) {      return FindNextFolder(folder.parent.URI);    }    return null;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/08c99a8091153c5c186914388bf9a5d42e87e6c9/msgViewNavigation.js/clean/mailnews/base/resources/content/msgViewNavigation.js