rem: createEventWithDialog(aCalendar, date, date); 
context:     createNewEvent: function (aCalendar, aStartTime, aEndTime) {        // XXX If we're adding an item from the view, let's make sure that        // XXX the calendar in question is visible!        // XXX unify these        if (!aCalendar) {            if ("ltnSelectedCalendar" in window) {                aCalendar = ltnSelectedCalendar();            } else {                aCalendar = getSelectedCalendarOrNull();            }        }        // if we're given both times, skip the dialog        if (aStartTime && aEndTime && !aStartTime.isDate && !aEndTime.isDate) {            var event = createEvent();            event.startDate = aStartTime;            event.endDate = aEndTime;            var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"]                                .getService(Components.interfaces.nsIStringBundleService);            var props = sbs.createBundle("chrome://calendar/locale/calendar.properties");            event.title = props.GetStringFromName("newEvent");            setDefaultAlarmValues(event);            doTransaction('add', event, aCalendar, null, null);        } else if (aStartTime && aStartTime.isDate) {            var event = createEvent();            event.startDate = aStartTime;            setDefaultAlarmValues(event);            doTransaction('add', event, aCalendar, null, null);        } else {            // default pop up the dialog            //XXX unify these            if ("newEvent" in window) {                // Sunbird specific code                newEvent();            } else {                // Lightning specific code                var date = document.getElementById("calendar-view-box").selectedPanel.selectedDay.clone();                date.isDate = false;                createEventWithDialog(aCalendar, date, date);            }        }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f6285b8c5a2cecf697605a1e042d726ab16dcb50/calendar-views.js/buggy/calendar/base/content/calendar-views.js