rem: str += "NickName"; 
add: attrs = ["NickName"]; 
context: function onSearch(){    gStatusText.setAttribute("label", "");    gPropertiesButton.setAttribute("disabled","true");    gComposeButton.setAttribute("disabled","true");    gSearchSession.clearScopes();    var currentAbURI = document.getElementById('abPopup').getAttribute('value');     gSearchSession.addDirectoryScopeTerm(GetScopeForDirectoryURI(currentAbURI));    saveSearchTerms(gSearchSession.searchTerms, gSearchSession);    var searchUri = currentAbURI + "?(";    var count = gSearchSession.searchTerms.Count();    for (var i=0; i<count; i++) {     var searchTerm = gSearchSession.searchTerms.GetElementAt(i).QueryInterface(nsIMsgSearchTerm);     // get the "and" / "or" value from the first term     if (i == 0) {       if (searchTerm.booleanAnd)          searchUri += "and";       else         searchUri += "or";     }     var str = "(";     switch (searchTerm.attrib) {       case nsMsgSearchAttrib.Name:         str += "DisplayName";  // search first, last, display too?         break;       case nsMsgSearchAttrib.Email:         str += "PrimaryEmail";         break;       case nsMsgSearchAttrib.PhoneNumber:         str += "WorkPhone"; // search home phone too?         break;       case nsMsgSearchAttrib.Organization:         str += "Company";         break;       case nsMsgSearchAttrib.Department:         str += "Department";         break;       case nsMsgSearchAttrib.City:         str += "WorkCity";         break;       case nsMsgSearchAttrib.Street:         str += "WorkAddress";         break;       case nsMsgSearchAttrib.Nickname:         str += "NickName";         break;       case nsMsgSearchAttrib.WorkPhone:         str += "WorkPhone";         break;       case nsMsgSearchAttrib.HomePhone:         str += "HomePhone";         break;       case nsMsgSearchAttrib.Fax:         str += "FaxNumber";         break;       case nsMsgSearchAttrib.Pager:         str += "PagerNumber";         break;       case nsMsgSearchAttrib.Mobile:         str += "CellularNumber";         break;       case nsMsgSearchAttrib.Title:         str += "JobTitle";         break;       case nsMsgSearchAttrib.AdditionalEmail:         str += "SecondEmail";         break;       // XXX todo, what about the others?  what about generic, like _AimScreenName       default:         str += "DisplayName";         break;     }      str += ",";     switch (searchTerm.op) {      case nsMsgSearchOp.Contains:        str += "c";        break;      case nsMsgSearchOp.DoesntContain:        str += "!c";        break;      case nsMsgSearchOp.Is:        str += "=";        break;      case nsMsgSearchOp.Isnt:        str += "!=";        break;      case nsMsgSearchOp.BeginsWith:        str += "bw";        break;      case nsMsgSearchOp.EndsWith:        str += "ew";        break;      case nsMsgSearchOp.SoundsLike:        str += "~=";        break;      default:        str += "c";        break;     }     // append the term to the searchUri     searchUri += str + "," + escape(searchTerm.value.str) + ")";    }    searchUri += ")";    SetAbView(searchUri, null, null);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b44576ce9e450596fbfdea60459ace3601988c6f/ABSearchDialog.js/clean/mailnews/base/search/resources/content/ABSearchDialog.js