rem: ChangeFolderByDOMNode(selArray[0]); 
add: var startIndex = {}; var endIndex = {}; folderOutliner.outlinerBoxObject.selection.getRangeAt(0, startIndex, endIndex); var folderResource = GetFolderResource(folderOutliner, startIndex.value); var msgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder); if (msgFolder == msgWindow.openFolder) return; else { var sortType = 0; var sortOrder = 0; var viewFlags = 0; var viewType = 0;    if (!(msgFolder.isServer)) { try { var msgDatabase = msgFolder.getMsgDatabase(msgWindow); if (msgDatabase) { var dbFolderInfo = msgDatabase.dBFolderInfo; sortType = dbFolderInfo.sortType; sortOrder = dbFolderInfo.sortOrder; viewFlags = dbFolderInfo.viewFlags; viewType = dbFolderInfo.viewType; } } catch (ex) { dump("failed to get view & sort values.  ex = " + ex +"\n"); } } ChangeFolderByURI(folderResource.Value, viewType, viewFlags, sortType, sortOrder); } 
context: function FolderPaneSelectionChange(){  var tree = GetFolderTree();  if(tree)  {    var selArray = tree.selectedItems;    if ( selArray && (selArray.length == 1) )    {      ChangeFolderByDOMNode(selArray[0]);    }    else    {      ClearThreadPane();    }  }  if (!gAccountCentralLoaded)    ClearMessagePane();  if (gDisplayStartupPage)  {    loadStartPage();    gDisplayStartupPage = false;  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/938770831965cde1ef5c4ce945b768186518efae/commandglue.js/clean/mailnews/base/resources/content/commandglue.js