rem:  PositionThreadPane(); 
add:  scrolled = ScrollToMessage(type, true, true /* selectMessage */); 
context:     OnItemEvent: function(folder, event) {        var eventType = event.GetUnicode();        if (eventType == "FolderLoaded") {		if(folder)		{			var resource = folder.QueryInterface(Components.interfaces.nsIRDFResource);			if(resource)			{				var uri = resource.Value;				//dump("In OnFolderLoaded for " + uri +"\n");            				if(uri == gCurrentFolderToReroot)				{					gCurrentFolderToReroot="";					var msgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder);					if(msgFolder)					{						msgFolder.endFolderLoading();						RerootFolder(uri, msgFolder, gCurrentLoadingFolderViewType, gCurrentLoadingFolderViewFlags, gCurrentLoadingFolderSortType, gCurrentLoadingFolderSortOrder);						gIsEditableMsgFolder = IsSpecialFolder(msgFolder, MSG_FOLDER_FLAG_DRAFTS);						gCurrentLoadingFolderSortType = 0;						gCurrentLoadingFolderSortOrder = 0;            gCurrentLoadingFolderViewType = 0;            gCurrentLoadingFolderViewFlags = 0;            SetFocusThreadPane();            if (gNextMessageAfterLoad)             {              gNextMessageAfterLoad = false;              // should scroll to new here.              PositionThreadPane();            }					}				}				if(uri == gCurrentLoadingFolderURI)				{				  gCurrentLoadingFolderURI = "";				  //Now let's select the first new message if there is one          var beforeScrollToNew;				  if(showPerformance) {				    beforeScrollToNew = new Date();                  }				  ScrollToFirstNewMessage();				  if(showPerformance) {				      var afterScrollToNew = new Date();				      var timeToScroll = (afterScrollToNew.getTime() - beforeScrollToNew.getTime())/1000;				      var afterFolderLoadTime = new Date();				      var timeToLoad = (afterFolderLoadTime.getTime() - gBeforeFolderLoadTime.getTime())/1000;					  dump("Time to load " + uri + " is " +  timeToLoad + " seconds\n");				  	  dump("of which scrolling to new is " + timeToScroll + " seconds\n");				  }    				SetBusyCursor(window, false);				}			}		}        } else if (eventType == "DeleteOrMoveMsgCompleted") {			HandleDeleteOrMoveMsgCompleted(folder);        }               else if (eventType == "DeleteOrMoveMsgFailed") {                        HandleDeleteOrMoveMsgFailed(folder);        }    }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/fad580183ff8da50448a0ac41f282512b54d2905/msgMail3PaneWindow.js/clean/mailnews/base/resources/content/msgMail3PaneWindow.js