rem: var ServerName = gCalendarWindow.calendarManager.getDefaultServer();  
add: {   if( document.getElementById( "list-calendars-listbox" ) ) { var selectedCalendarItem = document.getElementById( "list-calendars-listbox" ).selectedItem;  if( selectedCalendarItem ) { ServerName = selectedCalendarItem.getAttribute( "calendarPath" ); } else {  var ServerName = gCalendarWindow.calendarManager.getDefaultServer(); } } else {  var ServerName = gCalendarWindow.calendarManager.getDefaultServer(); } } 
context: function addEventsToCalendar( calendarEventArray, silent, ServerName ){   gICalLib.batchMode = true;   for(var i = 0; i < calendarEventArray.length; i++)   {      calendarEvent = calendarEventArray[i];	             // Check if event with same ID already in Calendar. If so, import event with new ID.      if( gICalLib.fetchEvent( calendarEvent.id ) != null ) {         calendarEvent.id = createUniqueID( );      }      // the start time is in zulu time, need to convert to current time      if(calendarEvent.allDay != true)      convertZuluToLocal( calendarEvent );      // open the event dialog with the event to add      if( silent )      {         if( ServerName == null || ServerName == "" || ServerName == false )            var ServerName = gCalendarWindow.calendarManager.getDefaultServer();                  gICalLib.addEvent( calendarEvent, ServerName );      }      else         editNewEvent( calendarEvent );   }   gICalLib.batchMode = false;   }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2bcf746a2a590f1bac1fb52e56c2b7269fd92037/importExport.js/clean/calendar/resources/content/importExport.js