add: if( !startDate ) startDate = gCalendarWindow.currentView.getNewEventDate();  
context: function newEvent( startDate, endDate ){   // create a new event to be edited and added   var calendarEvent = createEvent();      calendarEvent.start.setTime( startDate );      if( !endDate )   {     var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", gCalendarBundle.getString("defaultEventLength" ) );         var endDateTime = startDate.getTime() + ( 1000 * 60 * MinutesToAddOn );         calendarEvent.end.setTime( endDateTime );   }   else   {      calendarEvent.end.setTime( endDate.getTime() );   }      //get the selected calendar   var selectedCalendarItem = document.getElementById( "list-calendars-listbox" ).selectedItem;      var server = null;   if( selectedCalendarItem )   {      server = selectedCalendarItem.getAttribute( "calendarPath" );   }      editNewEvent( calendarEvent, server );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/9d872ceffea0199255da260aacfe45b4faecc0e9/calendar.js/buggy/calendar/resources/content/calendar.js