add: if (!gSearchInput) getDocumentElements(); 
context: function onEnterInSearchBar(){   viewDebug ("onEnterInSearchBar gSearchInput.value = " + gSearchInput.value + " showing criteria = " + gSearchInput.showingSearchCriteria +"\n");   if (gSearchInput.value == ""  /* || gSearchInput.showingSearchCriteria */)    {          if (gDBView.viewType == nsMsgViewType.eShowQuickSearchResults         || gDBView.viewType == nsMsgViewType.eShowVirtualFolderResults)     {       statusFeedback.showStatusString("");       disableQuickSearchClearButton();       viewDebug ("onEnterInSearchBar gDefaultSearchViewTerms = " + gDefaultSearchViewTerms + "gVirtualFolderTerms = "         + gVirtualFolderTerms + "gXFVirtualFolderTerms = " + gXFVirtualFolderTerms + "\n");       var addTerms = gDefaultSearchViewTerms || gVirtualFolderTerms || gXFVirtualFolderTerms;       if (addTerms)       {           viewDebug ("addTerms = " + addTerms + " count = " + addTerms.Count() + "\n");           initializeSearchBar();           onSearch(addTerms);       }       else        restorePreSearchView();     }     else if (gPreQuickSearchView && !gDefaultSearchViewTerms)// may be a quick search from a cross-folder virtual folder      restorePreSearchView();     //     gSearchInput.showingSearchCriteria = true;          gQSViewIsDirty = false;     return;   }   initializeSearchBar();   if (gClearButton)    gClearButton.setAttribute("disabled", false); //coming into search enable clear button      ClearThreadPaneSelection();   ClearMessagePane();   onSearch(null);   gQSViewIsDirty = false;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5ad293338cb49c6bde62af4024c54eb047735241/searchBar.js/clean/mailnews/base/resources/content/searchBar.js