rem: var menuItem = document.getElementById('menu-options-timezone'); 
add: var menuItem = document.getElementById('options-timezone-menuitem'); 
context: function dateTimeControls2State(aKeepDuration) {    if (gIgnoreUpdate) {        return;    }    var startWidgetId;    var endWidgetId;    if (isEvent(window.calendarItem)) {        startWidgetId = "event-starttime";        endWidgetId = "event-endtime";    } else {        if (!getElementValue("todo-has-entrydate", "checked")) {            gItemDuration = null;        }        if (!getElementValue("todo-has-duedate", "checked")) {            gItemDuration = null;        }        startWidgetId = "todo-entrydate";        endWidgetId = "todo-duedate";    }    var saveStartTime = gStartTime;    var saveEndTime = gEndTime;    var kDefaultTimezone = calendarDefaultTimezone();    if (gStartTime) {        // jsDate is always in OS timezone, thus we create a calIDateTime        // object from the jsDate representation and simply set the new        // timezone instead of converting.        var menuItem = document.getElementById('menu-options-timezone');        gStartTime = jsDateToDateTime(            getElementValue(startWidgetId),            (menuItem.getAttribute('checked') == 'true') ? gStartTimezone : kDefaultTimezone);    }        if (gEndTime) {        if (aKeepDuration) {            gEndTime = gStartTime.clone();            if (gItemDuration) {                gEndTime.addDuration(gItemDuration);                gEndTime = gEndTime.getInTimezone(gEndTimezone);            }        } else {            var timezone = gEndTimezone;            if (timezone == "UTC") {                if (gStartTime && gStartTimezone != gEndTimezone) {                    timezone = gStartTimezone;                }            }            gEndTime = jsDateToDateTime(                getElementValue(endWidgetId),                (menuItem.getAttribute('checked') == 'true') ? timezone : kDefaultTimezone);        }    }    if (getElementValue("event-all-day", "checked")) {        gStartTime.isDate = true;    }    // calculate the new duration of start/end-time.    // don't allow for negative durations.    var warning = false;    if (!aKeepDuration && gStartTime && gEndTime) {        if (gEndTime.compare(gStartTime) >= 0) {            gItemDuration = gEndTime.subtractDate(gStartTime);        } else {            gStartTime = saveStartTime;            gEndTime = saveEndTime;            warning = true;        }    }    updateDateTime();    updateTimezone();    if (warning) {        var callback = function func() {            var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                                .getService(Components.interfaces.nsIPromptService);            promptService.alert(                null,                document.title,                calGetString("calendar", "warningNegativeDuration"));        }        setTimeout(callback, 1);    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/4460dd354b16dd97a7194df73ce288b0c71ba919/sun-calendar-event-dialog.js/clean/calendar/prototypes/wcap/sun-calendar-event-dialog.js