rem: var ThisItem = SelectedItems.pop(); 
add: ThisItem = SelectedItems.pop(); 
context: function deleteEventCommand( DoNotConfirm ){   if( unifinderToDoHasFocus() )   {      deleteToDoCommand( DoNotConfirm );      return;   }      var SelectedItems = gCalendarWindow.EventSelection.selectedEvents;      if( SelectedItems.length == 1 )   {      var calendarEvent = SelectedItems[0];      if ( calendarEvent.title != "" ) {         if( !DoNotConfirm ) {                    if ( confirm( confirmDeleteEvent+" "+calendarEvent.title+"?" ) ) {               gICalLib.deleteEvent( calendarEvent.id );               gCalendarWindow.clearSelectedEvent( calendarEvent );            }         }         else         {            gICalLib.deleteEvent( calendarEvent.id );            gCalendarWindow.clearSelectedEvent( calendarEvent );         }      }      else      {         if( !DoNotConfirm ) {                    if ( confirm( confirmDeleteUntitledEvent ) ) {               gICalLib.deleteEvent( calendarEvent.id );               gCalendarWindow.clearSelectedEvent( calendarEvent );            }         }         else         {            gICalLib.deleteEvent( calendarEvent.id );            gCalendarWindow.clearSelectedEvent( calendarEvent );         }      }   }   else if( SelectedItems.length > 1 )   {      var NumberOfEventsToDelete = SelectedItems.length;      gICalLib.batchMode = true;            if( !DoNotConfirm )      {         if( confirm( "Are you sure you want to delete all selected events?" ) )         {            gCalendarWindow.clearSelectedEvent( calendarEvent );                        while( SelectedItems.length )            {               var ThisItem = SelectedItems.pop();                              gICalLib.deleteEvent( ThisItem.id );            }         }      }      else      {         gCalendarWindow.clearSelectedEvent( calendarEvent );                     while( SelectedItems.length )         {            var ThisItem = SelectedItems.pop();                        gICalLib.deleteEvent( ThisItem.id );         }      }      gICalLib.batchMode = false;      /*      var NumberOfTotalEvents  = gCalendarWindow.calendarEvent.getAllEvents().length;      if( NumberOfTotalEvents = NumberOfEventsToDelete )      {         //highlight today's date         gCalendarWindow.currentView.hiliteTodaysDate();      }      */   }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/76b784fca4394a565ab5193c3d63c72fbff3d57a/calendar.js/buggy/calendar/resources/content/calendar.js