rem: var ids = ["expandedKeywordImage","expandedHeaderView","msgHeaderView","collapsedHeaderView","collapsedKeywordImage","editMessageBox","expandedAttachmentBox"]; for (i in ids) { var element = document.getElementById(ids[i]); if (element) { if (aKeywords) element.setAttribute("class", aKeywords); else {  element.setAttribute("class", element.getAttribute("originalclass")); 
add: var elements = document.getElementsByAttribute("keywordrelated","true"); var len = elements.length; for (var i=0; i<len; i++) { var element = elements[i]; var originalclass = element.getAttribute("originalclass");      if (!originalclass) { element = document.getAnonymousElementByAttribute(element, "keywordrelated", "true"); originalclass = element.getAttribute("originalclass"); }  if (aKeywords) { if (element.getAttribute("appendoriginalclass") == "true") { aKeywords += " " + originalclass; 
context: function SetKeywords(aKeywords) {   // we cache the last keywords.    // if there is no chagne, we do nothing.  // most of the time, this will be the case.  if (aKeywords == gLastKeywords)    return;  // these are the UI elements who care about keywords  var ids = ["expandedKeywordImage","expandedHeaderView","msgHeaderView","collapsedHeaderView","collapsedKeywordImage","editMessageBox","expandedAttachmentBox"];  for (i in ids) {    var element = document.getElementById(ids[i]);    if (element) {      if (aKeywords)         element.setAttribute("class", aKeywords);      else {        // if no keywords, reset class to the original class        element.setAttribute("class", element.getAttribute("originalclass"));      }    }  }  // cache the keywords   gLastKeywords = aKeywords;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/37288dd2a4b1b06c2844168a246fb482701361a6/mailWindow.js/buggy/mailnews/base/resources/content/mailWindow.js