context: function CheckCardRequiredDataPresence(doc){  // Bug 314995 We require at least one of the following fields to be  // filled in: email address, first name, last name, display name,  //            organisation (company name).  var primaryEmail = doc.getElementById("PrimaryEmail");  if (primaryEmail.textLength == 0 &&      doc.getElementById("FirstName").textLength == 0 &&      doc.getElementById("LastName").textLength == 0 &&      doc.getElementById("DisplayName").textLength == 0 &&      doc.getElementById("Company").textLength == 0)  {    Components      .classes["@mozilla.org/embedcomp/prompt-service;1"]      .getService(Components.interfaces.nsIPromptService)      .alert(        window,        gAddressBookBundle.getString("cardRequiredDataMissingTitle"),        gAddressBookBundle.getString("cardRequiredDataMissingMessage"));    return false;  }  // Simple checks that the primary email should be of the form |user@host|.  // Note: if the length of the primary email is 0 then we skip the check  // as some other field must have something as per the check above.  if (primaryEmail.textLength != 0 && !/.@./.test(primaryEmail.value))  {    Components      .classes["@mozilla.org/embedcomp/prompt-service;1"]      .getService(Components.interfaces.nsIPromptService)      .alert(        window,        gAddressBookBundle.getString("incorrectEmailAddressFormatTitle"),        gAddressBookBundle.getString("incorrectEmailAddressFormatMessage"));    // Focus the dialog field, to help the user.    document.getElementById("abTabs").selectedIndex = 0;    primaryEmail.focus();    return false;  }  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/57af89b3b605b3ba5604939e412b036e33877aef/abCardOverlay.js/buggy/mail/components/addrbook/content/abCardOverlay.js