add: gPageNumber = 0;  
context: function OpenSearch(aSearchStr, engineURIs){  var searchEngineURI = nsPreferences.copyUnicharPref("browser.search.defaultengine", null);  var defaultSearchURL = nsPreferences.getLocalizedUnicharPref("browser.search.defaulturl", null);  if (!defaultSearchURL) {    regionalBundle = document.getElementById("regionalBundle");    defaultSearchURL = regionalBundle.getString("defaultSearchURL");  }  var searchDS = Components.classes[ISEARCH_CONTRACTID].getService(nsIInternetSearchService);  var escapedSearchStr = encodeURIComponent(aSearchStr);  sidebarInitiatedSearch = true;  searchDS.RememberLastSearchText(escapedSearchStr);  sidebarInitiatedSearch = false;  var gURL;  try {    if (!engineURIs || engineURIs.length <= 1) {      // not called from sidebar or only one engine selected      if (engineURIs && engineURIs.length == 1) {        searchEngineURI = engineURIs[0];        gURL = "internetsearch:engine=" + searchEngineURI + "&text=" + escapedSearchStr;      }      if (!searchEngineURI)        searchEngineURI = regionalBundle.getString("defaultSearchURL");      // look up the correct search URL format for the given engine      try {        var whichButtons = new Object;        whichButtons.value = 0;        var searchURL = searchDS.GetInternetSearchURL(searchEngineURI, escapedSearchStr, 0, 0, whichButtons);        doNavButtonEnabling(whichButtons.value, searchDS, 0);      }      catch (ex) {        debug("Exception when calling GetInternetSearchURL: " + ex);        searchURL = "";      }      defaultSearchURL = searchURL ? searchURL : defaultSearchURL + escapedSearchStr;      if (!searchURL)        gURL = "";      // load the results page of selected or default engine in the content area      if (defaultSearchURL)        loadURLInContent(defaultSearchURL);    }    else {      // multiple providers      searchURL = "";      for (var i = 0; i < engineURIs.length; ++i) {        searchURL += !searchURL ? "internetsearch:" : "&";        searchURL += "engine=" + engineURIs[i];      }      searchURL += ("&text=" + escapedSearchStr);      gURL = searchURL;      loadURLInContent(encodeURI("chrome://communicator/content/search/internetresults.xul?" + searchURL));    }  }  catch (ex) {    debug("Exception: " + ex);  }  setTimeout("checkSearchProgress()", 1000);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2caf4dd8aa1124b2a8f75b36d18d4a741f6f2dd0/search-panel.js/buggy/xpfe/components/search/resources/search-panel.js