rem: var ServerName = gCalendarWindow.calendarManager.getDefaultServer(); 
add: 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 )         {            //see if there's a server selected in the calendar window first            //get the selected calendar            if( document.getElementById( "list-calendars-listbox" ) )            {               var selectedCalendarItem = document.getElementById( "list-calendars-listbox" ).selectedItem;                           if( selectedCalendarItem )               {                  ServerName = selectedCalendarItem.getAttribute( "calendarPath" );               }               else               {                  //otherwise use the default                  var ServerName = gCalendarWindow.calendarManager.getDefaultServer();               }            }            else            {               //otherwise use the default               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/326e43aa5b319aee95222c6a55dbb70cf1739c85/importExport.js/buggy/calendar/resources/content/importExport.js