rem: for (var i = 0; i < addThese.length; i++) { 
add: for (i = 0; i < addThese.length; i++) { 
context: function AddAvailableLanguage(){  var Languagename = new String();  var Languageid = new String();    var addThese = new Array();  var addTheseNames = new Array();  var invalidLangs = new Array();  //selected languages  for (var nodeIndex=0; nodeIndex < available_languages.selectedItems.length; nodeIndex++) {    var selItem =  available_languages.selectedItems[nodeIndex];    Languagename    = selItem.getAttribute('label');    Languageid      = selItem.getAttribute('id');    if (!LangAlreadyActive(Languageid)) {      addThese[nodeIndex] = Languageid;      addTheseNames[nodeIndex] = Languagename;    }  }  //user-defined languages  var otherField = document.getElementById( "languages.other" );  var selCount = addThese.length;  if (otherField.value) {    var LanguageidsString = otherField.value.replace(/\s/g,"").toLowerCase();    var Languageids = LanguageidsString.split(separatorRe);    for (var i = 0; i < Languageids.length; i++) {      Languageid = Languageids[i];            if (IsRFC1766LangTag(Languageid)) {        if (!LangAlreadySelected(Languageid)) {          if (!LangAlreadyActive(Languageid)) {            Languagename = GetLanguageTitle(Languageid);            if (!Languagename)              Languagename = '[' + Languageid + ']';            addThese[i+selCount] = Languageid;            addTheseNames[i+selCount] = Languagename;          }        }      }      else {        invalidLangs[invalidLangs.length] = Languageid;      }    }    if (invalidLangs.length > 0) {      var errorMsg = prefLangBundle.GetStringFromName("illegalOtherLanguage") + " " +                     invalidLangs.join(", ");      var errorTitle = prefLangBundle.GetStringFromName("illegalOtherLanguageTitle");            var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                                 .getService(Components.interfaces.nsIPromptService);                                       prompter.alert(this.window, errorTitle, errorMsg);      otherField.focus();      return false;    }  }    for (var i = 0; i < addThese.length; i++) {    AddListItem(window.opener.document, active_languages, addThese[i], addTheseNames[i]);  }  available_languages.clearSelection();  return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/6f3cd659cc90c7f3563ea9e48a2285ba599d877b/pref-languages.js/clean/xpfe/components/prefwindow/resources/content/pref-languages.js