rem: var selectedItemId = null; var encryptionPolicy = gIdentity.getIntAttribute("encryptionpolicy"); switch (encryptionPolicy) { case 2: selectedItemId = 'encrypt_mail_always'; break; default: selectedItemId = 'encrypt_mail_never'; break; }  gEncryptionChoices.selectedItem = document.getElementById(selectedItemId); 
add: gEncryptionChoices.value = gIdentity.getIntAttribute("encryptionpolicy"); 
context: function onInit() {  // initialize all of our elements based on the current identity values....  gEncryptionCertName = document.getElementById(kEncryptionCertPref);  gHiddenEncryptionPolicy = document.getElementById("identity.encryptionpolicy");  gEncryptionChoices = document.getElementById("encryptionChoices");  gSignCertName       = document.getElementById(kSigningCertPref);  gSignMessages       = document.getElementById("identity.sign_mail");  gEncryptAlways      = document.getElementById("encrypt_mail_always");  gNeverEncrypt       = document.getElementById("encrypt_mail_never");  gBundle             = document.getElementById("bundle_smime");  gBrandBundle        = document.getElementById("bundle_brand");  gEncryptionChoicesLocked = false;  gSigningChoicesLocked = false;  gEncryptionCertName.value = gIdentity.getUnicharAttribute("encryption_cert_name");  var selectedItemId = null;  var encryptionPolicy = gIdentity.getIntAttribute("encryptionpolicy");  switch (encryptionPolicy)  {    case 2:      selectedItemId = 'encrypt_mail_always';      break;    default:      selectedItemId = 'encrypt_mail_never';      break;  }  gEncryptionChoices.selectedItem = document.getElementById(selectedItemId);      if (!gEncryptionCertName.value)  {    gEncryptAlways.setAttribute("disabled", true);    gNeverEncrypt.setAttribute("disabled", true);  }  else {    enableEncryptionControls(true);  }  gSignCertName.value = gIdentity.getUnicharAttribute("signing_cert_name");  gSignMessages.checked = gIdentity.getBoolAttribute("sign_mail");  if (!gSignCertName.value)  {    gSignMessages.setAttribute("disabled", true);  }  else {    enableSigningControls(true);  }  // Always start with enabling signing and encryption cert select buttons.  // This will keep the visibility of buttons in a sane state as user  // jumps from security panel of one account to another.  enableCertSelectButtons();  // Disable all locked elements on the panel  onLockPreference();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/a870550df480d6138a90786d539dd3a584cda901/am-smime.js/clean/mailnews/extensions/smime/resources/content/am-smime.js