add: reminderPopup.setAttribute("last-value", reminderPopup.value);        if (isToDo(window.calendarItem)) {     var menuitem = reminderPopup.selectedItem; if (menuitem.value == 'none') { enableElementWithLock("todo-has-entrydate", "reminder-lock"); enableElementWithLock("todo-has-duedate", "reminder-lock"); } else { var reminder = menuitem.reminder; if (!reminder) { reminder = {}; reminder.length = menuitem.getAttribute('length'); reminder.unit = menuitem.getAttribute('unit'); reminder.relation = menuitem.getAttribute('relation'); reminder.origin = menuitem.getAttribute('origin'); }   if (Number(reminder.origin) > 0) {   if (!getElementValue("todo-has-entrydate", "checked")) { setElementValue("todo-has-entrydate", "true", "checked");   updateEntryDate(); }     disableElementWithLock("todo-has-entrydate", "reminder-lock"); enableElementWithLock("todo-has-duedate", "reminder-lock"); }   if (Number(reminder.origin) < 0) {   if (!getElementValue("todo-has-duedate", "checked")) { setElementValue("todo-has-duedate", "true", "checked");   updateDueDate(); }     disableElementWithLock("todo-has-duedate", "reminder-lock"); enableElementWithLock("todo-has-entrydate", "reminder-lock"); } } } 
context: function commonUpdateReminder() {    // find relevant elements in the document    var reminderPopup = document.getElementById("item-alarm");    var reminderDetails = document.getElementById("reminder-details");    // if a custom reminder was selected, we show the appropriate    // dialog in order to allow the user to specify the details.    // the result will be placed in the 'reminder-custom-menuitem' tag.    if (reminderPopup.value == 'custom') {        // show the dialog.        editReminder();        // Now check if the resulting custom reminder is valid.        // possibly we receive an invalid reminder if the user cancels the        // dialog. In that case we revert to the previous selection of the        // reminder drop down.        if (!document.getElementById("reminder-custom-menuitem").reminder) {            reminderPopup.selectedIndex = gLastAlarmSelection;        }    }    // remember the current reminder drop down selection index.    gLastAlarmSelection = reminderPopup.selectedIndex;    updateReminderDetails();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/9d1428d8c69f934660c4623c06f109ff3d558f8b/calendar-dialog-utils.js/clean/calendar/base/content/calendar-dialog-utils.js