rem: var lastWithSameTitle; 
add: var lastWithSameTitle = null; 
context: function stylesheetFillPopup(forDocument, menuPopup, itemNoOptStyles){  var children = menuPopup.childNodes;  var i;  for (i = 0; i < children.length; ++i) {    var child = children[i];    if (child.getAttribute("class") == "authssmenuitem")      menuPopup.removeChild(child);  }  var noOptionalStyles = true;  var styleSheets = forDocument.styleSheets;  var currentStyleSheets = [];  for (i = 0; i < styleSheets.length; ++i) {    var currentStyleSheet = styleSheets[i];    if (currentStyleSheet.title) {      if (!currentStyleSheet.disabled)        noOptionalStyles = false;      var lastWithSameTitle;      if (currentStyleSheet.title in currentStyleSheets)        lastWithSameTitle = currentStyleSheets[currentStyleSheet.title];      if (!lastWithSameTitle) {        var menuItem = document.createElement("menuitem");        menuItem.setAttribute("label", currentStyleSheet.title);        menuItem.setAttribute("data", currentStyleSheet.title);        menuItem.setAttribute("type", "radio");        menuItem.setAttribute("checked", !currentStyleSheet.disabled);        menuItem.setAttribute("class", "authssmenuitem");        menuItem.setAttribute("name", "authorstyle");        menuItem.setAttribute("oncommand", "stylesheetSwitch(_content.document, this.getAttribute('data'))");        menuPopup.appendChild(menuItem);        currentStyleSheets[currentStyleSheet.title] = menuItem;      } else {        if (currentStyleSheet.disabled)          lastWithSameTitle.setAttribute("checked", false);      }    }  }  itemNoOptStyles.setAttribute("checked", noOptionalStyles);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/10044e869ad0e2335d3c60947a8f873eb37b311c/navigator.js/clean/xpfe/browser/resources/content/navigator.js