rem: if( !startDate ) startDate = gCalendarWindow.currentView.getNewEventDate();  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() ); }  if( allDay ) calendarEvent.allDay = true; 
add: if (allDay) calendarEvent.isAllDay = true; 
context: function newEvent( startDate, endDate, allDay ){   // create a new event to be edited and added   var calendarEvent = createEvent();      if( !startDate )      startDate = gCalendarWindow.currentView.getNewEventDate();   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() );   }      if( allDay )     calendarEvent.allDay = true;      var server = getSelectedCalendarPathOrNull();      editNewEvent( calendarEvent, server );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e83fac781ea3f2e95dbfffb8513f48c3d509f9d7/calendar.js/buggy/calendar/resources/content/calendar.js