rem: var Path; if( ThisCalendarObject.getAttribute( "http: ThisCalendarObject.getAttribute( "http: { var RemotePath = ThisCalendarObject.getAttribute( "http: var Protocol; if( RemotePath.indexOf( "http: { Protocol = "http: RemotePath = RemotePath.substr( 7 ); } if( RemotePath.indexOf( "https: { Protocol = "https: RemotePath = RemotePath.substr( 8 ); } if( RemotePath.indexOf( "ftp: { Protocol = "ftp: RemotePath = RemotePath.substr( 6 ); }  Path = Protocol+ThisCalendarObject.getAttribute( "http: } else Path = ThisCalendarObject.getAttribute( "http: 
add: var Path = ThisCalendarObject.getAttribute( "http: 
context: calendarManager.prototype.retrieveAndSaveRemoteCalendar = function calMan_retrieveAndSaveRemoteCalendar( ThisCalendarObject, onResponseExtra ){   //the image doesn't always exist. If it doesn't exist, it causes problems, so check for it here   document.getElementById( ThisCalendarObject.getSubject() ).childNodes[1].childNodes[0].setAttribute( "synching", "true" );   var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);      var Path;   if( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#username" ) != "" ||       ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#password" ) != "" )   {      var RemotePath = ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" );      var Protocol;      if( RemotePath.indexOf( "http://" ) != -1 )      {         Protocol = "http://";         RemotePath = RemotePath.substr( 7 );      }      if( RemotePath.indexOf( "https://" ) != -1 )      {         Protocol = "https://";         RemotePath = RemotePath.substr( 8 );      }      if( RemotePath.indexOf( "ftp://" ) != -1 )      {         Protocol = "ftp://";         RemotePath = RemotePath.substr( 6 );      }            Path = Protocol+ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#username" )+":"+ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#password" )+"@"+RemotePath;   }   else      Path = ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" );   var Channel = ioService.newChannel( Path, null, null );   Channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;   var CalendarManager = this;      var onResponse = function( CalendarData )   {      //save the stream to a file.      //saveDataToFile( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#path" ), CalendarData, "UTF-8" );       saveDataToFile( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#path" ), CalendarData, null );            if( onResponseExtra )         onResponseExtra();            CalendarManager.removeCalendar( ThisCalendarObject );         if( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#active" ) == "true" )      {         CalendarManager.addCalendar( ThisCalendarObject );      }            refreshEventTree( getAndSetEventTable() );            refreshToDoTree( false );            CalendarManager.CalendarWindow.currentView.refreshEvents();            document.getElementById( ThisCalendarObject.getSubject() ).childNodes[1].childNodes[0].removeAttribute( "synching" );   }   var CalendarData = this.getRemoteCalendarText( Channel, onResponse, null );}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/4c45ef82548cb211397be177fd26e5a4234bc45c/calendarManager.js/buggy/calendar/resources/content/calendarManager.js