rem: if (preference.value.indexOf(selectedID) >= 0) return; 
add: var arrayOfPrefs = preference.value.split(/\s*,\s*/); for (var i = 0; i < arrayOfPrefs.length; ++i ){ if (arrayOfPrefs[i] == selectedID) return; } 
context:   addLanguage: function ()  {    var selectedID = this._availableLanguages.selectedItem.id;    var preference = document.getElementById("intl.accept_languages");    if (preference.value.indexOf(selectedID) >= 0)      return;          this._selectedItemID = selectedID;        if (preference.value == "")       preference.value = selectedID;    else      preference.value += "," + selectedID;      this._acceptLanguages[selectedID] = true;    this._availableLanguages.selectedItem = null;        // Reuild the available list with the added item removed...    this._buildAvailableLanguageList();         this._availableLanguages.setAttribute("label", this._availableLanguages.getAttribute("label2"));    this._availableLanguages.setAttribute("accesskey", this._availableLanguages.getAttribute("accesskey2"));  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/e440bea2f96c3da1f91a858304e36ee355f75e5f/languages.js/clean/browser/components/preferences/languages.js