add:   var oldFolderURI = folder.getAttribute("ref"); if(oldFolderURI != "null") { var oldFolder = GetMsgFolderFromURI(oldFolderURI); if(oldFolder && oldFolder.hasNewMessages()) oldFolder.clearNewMessages(); } 
context: function RerootFolder(uri, newFolder, isThreaded, sortID, sortDirection){  dump('In reroot folder\n');  var folder = GetThreadTreeFolder();  ClearThreadTreeSelection();  //Set the window's new open folder.  msgWindow.openFolder = newFolder;  //Set threaded state  ShowThreads(isThreaded);    //Clear out the thread pane so that we can sort it with the new sort id without taking any time.  folder.setAttribute('ref', "");  var column = FindThreadPaneColumnBySortResource(sortID);  if(column)	SortThreadPane(column, sortID, "http://home.netscape.com/NC-rdf#Date", false, sortDirection);  else	SortThreadPane("DateColumn", "http://home.netscape.com/NC-rdf#Date", "", false, null);  folder.setAttribute('ref', uri);    msgNavigationService.EnsureDocumentIsLoaded(document);  UpdateStatusMessageCounts(newFolder);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/767402957b672cdfd66cfb606f217dc4ddcd9726/commandglue.js/clean/mailnews/base/resources/content/commandglue.js