rem: var allKeys = tagService.keyEnumerator; while (allKeys.hasMore()) 
add: var tagArray = tagService.getAllTags({}); for (var i = 0; i < tagArray.length; ++i) 
context: function ToggleMessageTagKey(index){  if (GetNumSelectedMessages() < 1)    return;  // set the tag state based upon that of the first selected message,  // just like we do for markAsRead etc.  var msgHdr = gDBView.hdrForFirstSelectedMessage;  var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"]                             .getService(Components.interfaces.nsIMsgTagService);  var allKeys = tagService.keyEnumerator;  while (allKeys.hasMore())   {    var key = allKeys.getNext();    if (!--index)     {      // found the key, now toggle its state      var curKeys = msgHdr.getStringProperty("keywords");      if (msgHdr.label)        curKeys += " $label" + msgHdr.label;      var addKey  = (" " + curKeys + " ").indexOf(" " + key + " ") < 0;      ToggleMessageTag(key, addKey);      return;    }  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/c0bf344d92aa97e4d89f2f062f2fc27bb4d23399/mailWindowOverlay.js/buggy/mail/base/content/mailWindowOverlay.js