rem: var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator); var searchWindow = windowManagerInterface.getMostRecentWindow("mailnews:search"); 
context: function MsgSearchMessages(){    var preselectedFolder = null;    if ("GetFirstSelectedMsgFolder" in window)      preselectedFolder = GetFirstSelectedMsgFolder();    var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();    var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);    var searchWindow = windowManagerInterface.getMostRecentWindow("mailnews:search");    if (searchWindow)        searchWindow.focus();    else        window.openDialog("chrome://messenger/content/SearchDialog.xul", "",                           "chrome,resizable,status,centerscreen,dialog=no", { folder: preselectedFolder });}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/9b625fd027dd9a6eb41d92743b877415f68eef61/mailWindowOverlay.js/clean/mailnews/base/resources/content/mailWindowOverlay.js