	Event.observe(window, 'load', init, false);
	function init() {
		var ac1 = new Ajax.CachedAutocompleter('keyword1', 'suggestionbox1', 'ajax.suggest.php', {callback: geturl});
		var ac2 = new Ajax.CachedAutocompleter('keyword2', 'suggestionbox2', 'ajax.suggest.php', {callback: geturl});
		var ac3 = new Ajax.CachedAutocompleter('keyword3', 'suggestionbox3', 'ajax.suggest.php', {callback: geturl});
		var ac4 = new Ajax.CachedAutocompleter('keyword4', 'suggestionbox4', 'ajax.suggest.php', {callback: geturl});
		var ac5 = new Ajax.CachedAutocompleter('keyword5', 'suggestionbox5', 'ajax.suggest.php', {callback: geturl});
	}
	function geturl() {
		return 'url='+$('query_url').value;	
	}
	
	Ajax.CachedAutocompleter = Class.create();
    Object.extend(Object.extend(Ajax.CachedAutocompleter.prototype, Autocompleter.Base.prototype), {
      initialize: function(element, update, url, options) {
        this.baseInitialize(element, update, options);
        this.options.asynchronous  = true;
        this.options.onComplete    = this.onComplete.bind(this);
        this.options.defaultParams = this.options.parameters || null;
        this.url                   = url;
        this.cache                 = {};
      },
   
      getUpdatedChoices: function() {
        //var t = this.getToken();
		var t = $('query_url').value;
        if(this.cache[t]) {
            this.updateChoices(this.cache[t]);
        } else {
            entry = encodeURIComponent(this.options.paramName) + '=' + 
              encodeURIComponent(t);
  
            this.options.parameters = this.options.callback ?
              this.options.callback(this.element, entry) : entry;
  
            if(this.options.defaultParams) 
              this.options.parameters += '&' + this.options.defaultParams;
  
            new Ajax.Request(this.url, this.options);
        }
      },
      onComplete: function(request) {
        this.updateChoices(this.cache[$('query_url').value] = request.responseText);
      }
    }); 
