rem: function InitMessageTags(menuType) 
add: function InitMessageTags(menuPopup) 
context: function InitMessageTags(menuType){  var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"]                             .getService(Components.interfaces.nsIMsgTagService);  var allTags = tagService.tagEnumerator;  var allKeys = tagService.keyEnumerator;  // remove any existing non-static entries...  var menuItemId = menuType + "-tagpopup";  var menupopupNode = document.getElementById(menuItemId);  for (var i = menupopupNode.childNodes.length; i > 2; --i)    menupopupNode.removeChild(menupopupNode.firstChild);  var menuseparator = menupopupNode.firstChild;  // now rebuild the list  var msgHdr = gDBView.hdrForFirstSelectedMessage;  var curKeys = msgHdr.getStringProperty("keywords");  while (allTags.hasMore())  {    var tag = allTags.getNext();    var key = allKeys.getNext();    // TODO we want to either remove or "check" the tags that already exist    var newMenuItem = document.createElement("menuitem");    newMenuItem.setAttribute("label", tag);    newMenuItem.setAttribute("value", key);    newMenuItem.setAttribute("type", "checkbox");    var removeKey = (" " + curKeys + " ").indexOf(" " + key + " ") > -1;    newMenuItem.setAttribute('checked', removeKey);    newMenuItem.setAttribute('oncommand', 'ToggleMessageTagCmd(event.target)');    menupopupNode.insertBefore(newMenuItem, menuseparator);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f61761febea1879c923efb684355ca9338b4f703/mailWindowOverlay.js/buggy/mailnews/base/resources/content/mailWindowOverlay.js