rem: gSearchSession.addScopeTerm(GetScopeForFolder(gCurrentFolder), 
add: if (!gCurrentFolder.isServer) gSearchSession.addScopeTerm(GetScopeForFolder(gCurrentFolder), 
context: function onSearch(event){    dump("setting up search..\n");    gSearchSession.clearScopes();    // tell the search session what the new scope is    gSearchSession.addScopeTerm(GetScopeForFolder(gCurrentFolder),                                gCurrentFolder);    var searchSubfolders = document.getElementById("checkSearchSubFolders").checked;	if (gCurrentFolder && (searchSubfolders || gCurrentFolder.isServer) && gCurrentFolder.hasSubFolders)	{		var subFolderEnumerator = gCurrentFolder.GetSubFolders();		var done = false;		while (!done)		{			var next = subFolderEnumerator.currentItem();			if (next)			{				var nextFolder = next.QueryInterface(Components.interfaces.nsIMsgFolder);				if (nextFolder)					gSearchSession.addScopeTerm(GetScopeForFolder(nextFolder), nextFolder);			}			try 			{				subFolderEnumerator.next();			 } 			 catch (ex) 			 {				  done = true;			 }		}	}    // reflect the search widgets back into the search session    saveSearchTerms(gSearchSession.searchTerms, gSearchSession);    gSearchSession.search(msgWindow);    // refresh the tree after the search starts, because initiating the    // search will cause the datasource to clear itself    gThreadTree.setAttribute("ref", gThreadTree.getAttribute("ref"));    dump("Kicking it off with " + gThreadTree.getAttribute("ref") + "\n");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/7285f42bbc76cfdeea9e13ab40959abae6a4a96b/SearchDialog.js/clean/mailnews/base/search/resources/content/SearchDialog.js