  var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService);  var promptTitle = "Save Event"; var promptMessage = "Do you want to save changes?"; var buttonLabel1 = "Yes"; var buttonLabel2 = "No";  var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 + promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1 + promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2;  var choice = promptService.confirmEx(null, promptTitle, promptMessage, flags, buttonLabel1,null , buttonLabel2, null, {});  switch(choice) { case 0: onCommandSave(); return true; case 2: return true; default: return false; } 
return result; 
function onCancel(){  // assume that new items need to be asked whether or  // not the newly created item wants to be saved.  var isNew = window.calendarItem.isMutable;  if (!isNew) {      var newItem = saveItem();    var oldItem = window.calendarItem.clone();    newItem.deleteProperty("DTSTAMP");    oldItem.deleteProperty("DTSTAMP");    // we need to guide the description text through the text-field since    // newlines are getting converted which would indicate changes to the text.    setElementValue("item-description", oldItem.getProperty("DESCRIPTION"));    setItemProperty(oldItem, "DESCRIPTION", getElementValue("item-description"));        var a = newItem.icalString;    var b = oldItem.icalString;        if(newItem.icalString == oldItem.icalString)      return true;  }    // TODO: retrieve strings from dtd', etc.  var promptService =            Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                     .getService(Components.interfaces.nsIPromptService);  var promptTitle = "Save Event";  var promptMessage = "Do you want to save changes?";  var buttonLabel1 = "Yes";  var buttonLabel2 = "No";    var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +              promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1 +              promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2;    var choice = promptService.confirmEx(null, promptTitle, promptMessage, flags,                                       buttonLabel1,null , buttonLabel2, null, {});  switch(choice) {      case 0:        onCommandSave();        return true;      case 2:        return true;      default:        return false;  }}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/8a8fb1e50f1a74dbb1713b031761c84e92fa5b69/sun-calendar-event-dialog.js/clean/calendar/prototypes/wcap/sun-calendar-event-dialog.js