add: var i; 
context: function onOkButton( )   // "Acknowledge All Alarms" button{   // Set each alarm's last alarm ack date/time to now   for( i = 0; i < gAllEvents.length; i++ )   {      gAllEvents[i].lastAlarmAck = new Date();   }   // Modify each event to locally save the new last alarm ack date/time   for( i = 0; i < gAllEvents.length; i++ )   {      gICalLib.modifyEvent( gAllEvents[i] );   }   // Publishing time...   // Do any alarms' parent calendars have auto-publish enabled?   var autoPublishEnabled = false;   var serverInArray = false;   for( i = 0; i < gAllEvents.length; i++ )   {      var eachEvent = gAllEvents[i].event;      var calendarServer = opener.gCalendarWindow.calendarManager.getCalendarByName( eachEvent.parent.server );      if( calendarServer.getAttribute( "http://home.netscape.com/NC-rdf#publishAutomatically" ) == "true" )      {         // Yes, we're going to need to publish at least one calendar         if( !autoPublishEnabled)            autoPublishEnabled = true;         // If the calendarsToPublish array is empty, add this alarm's calendar's parent server to the array         if( calendarsToPublish.length == 0 )            serverInArray = false;         else         {            // Check if this alarm's parent calendar's server is already in the calendarsToPublish array            serverInArray = false;            for( var j = 0; j < calendarsToPublish.length; j++ )            {               if( calendarsToPublish[j].getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ) ==                   calendarServer.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ) )               {                  serverInArray = true;               }            }         }         // If this event's parent calendar's server isn't in the array, add it         if( !serverInArray )            calendarsToPublish[ calendarsToPublish.length ] = calendarServer;      }   }   // If we need to publish at least one calendar, publish to each calendarServer in the array   if( autoPublishEnabled )   {      for( i = 0; i < calendarsToPublish.length; i++ )      {         opener.gCalendarWindow.calendarManager.publishCalendar( calendarsToPublish[i] );      }   }   return( true );}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/3699fc6a01c49c56da373101cb6b2a6404229a5c/alertDialog.js/clean/calendar/resources/content/alertDialog.js