rem: for (var i=0; i<prefstrArray.length; i++) { var id = prefstrArray[i].id; var element = document.getElementById(id); if (gSmtpPrefBranch.prefIsLocked(prefstrArray[i].prefstring)) { if (id == "smtp.trySSL") { document.getElementById("smtp.neverSecure").setAttribute("disabled", "true"); document.getElementById("smtp.sometimesSecure").setAttribute("disabled", "true"); document.getElementById("smtp.alwaysSecure").setAttribute("disabled", "true"); document.getElementById("smtp.alwaysSmtpSSL").setAttribute("disabled", "true"); } else element.setAttribute("disabled", "true"); } } 
add: for (var prefstring in prefstrArray) if (gSmtpPrefBranch.prefIsLocked(prefstring)) prefstrArray[prefstring].disabled = true; 
context: function disableIfLocked( prefstrArray ){  for (var i=0; i<prefstrArray.length; i++) {    var id = prefstrArray[i].id;    var element = document.getElementById(id);    if (gSmtpPrefBranch.prefIsLocked(prefstrArray[i].prefstring)) {      if (id == "smtp.trySSL")      {        document.getElementById("smtp.neverSecure").setAttribute("disabled", "true");        document.getElementById("smtp.sometimesSecure").setAttribute("disabled", "true");        document.getElementById("smtp.alwaysSecure").setAttribute("disabled", "true");        document.getElementById("smtp.alwaysSmtpSSL").setAttribute("disabled", "true");      }      else        element.setAttribute("disabled", "true");    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/330c8dec6496a02c414236bb3fe78d762ab52b11/smtpEditOverlay.js/clean/mailnews/base/prefs/resources/content/smtpEditOverlay.js