rem: if (lastNameField.value && firstNameField.value) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]); } else {  displayName = firstNameField.value + lastNameField.value; } 
add: var firstNameValue = document.getElementById("FirstName").value; var lastNameValue = document.getElementById("LastName").value; if (lastNameValue && firstNameValue) { displayName = (gEditCard.displayLastNameFirst) ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameValue, firstNameValue]) : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameValue, lastNameValue]); } else {  displayName = firstNameValue + lastNameValue; } 
context: function GenerateDisplayName(){  if (gEditCard.generateDisplayName)  {    var displayName;    var firstNameField = document.getElementById('FirstName');    var lastNameField = document.getElementById('LastName');    var displayNameField = document.getElementById('DisplayName');    if (lastNameField.value && firstNameField.value) {      displayName = (gEditCard.displayLastNameFirst)        ? gAddressBookBundle.getFormattedString("lastFirstFormat", [lastNameField.value, firstNameField.value])        : gAddressBookBundle.getFormattedString("firstLastFormat", [firstNameField.value, lastNameField.value]);    }    else {      // one (or both) of these is empty, so this works.      displayName = firstNameField.value + lastNameField.value;    }    displayNameField.value = displayName;    SetCardDialogTitle(displayName);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d8f33fc83af8eee4cc30d61e6aeb836a5aa41ada/abCardOverlay.js/clean/mailnews/addrbook/resources/content/abCardOverlay.js