Ajax.ScheduleUpdater = Class.create(Ajax.Updater, 
	{
  		initialize: function($super, schedule, container, url, options) {
			this.supUpdateContent = $super.updateContent;
			this.schedule = schedule;
    		$super(container, url, options);
  		},

  		updateContent: function(responseText) {
  			if (this != this.schedule.runtime.latestRequest) return;
    		var receiver = this.container[this.success() ? 'success' : 'failure'],
        	options = this.options;

    		if (!options.evalScripts) responseText = responseText.stripScripts();

    		if (receiver = $(receiver)) {
      			if (options.insertion) {
        			if (Object.isString(options.insertion)) {
          				var insertion = { }; insertion[options.insertion] = responseText;
          				receiver.insert(insertion);
        			} else options.insertion(receiver, responseText);
      			} else receiver.update(responseText);
    		}
  		}
  	}
);
