function kisi_liste(selectobj) {

  // VARIABLES

  // HTML SELECT object
  this.selectobj = selectobj;

  // Flags for regexp matching.
  // "i" = ignore case; "" = do not ignore case
  this.flags = "i";

  // Make a copy of the options array
  this.optionscopy = new Array();
  for (var i=0; i < selectobj.options.length; i++) {
    this.optionscopy[i] = new Option();
    this.optionscopy[i].text = selectobj.options[i].text;
    this.optionscopy[i].value = selectobj.options[i].value;
  }

  //==================================================
  // METHODS
  //==================================================

  //--------------------------------------------------
  this.reset = function() {
  // This method resets the select list to the original state.
  // It also unselects all of the options.

    this.set("");
  }

  //--------------------------------------------------
  this.set = function(pattern) {
  // This method removes all of the options from the select list,
  // then adds only the options that match the pattern regexp.
  // It also unselects all of the options.
  // In case of a regexp error, returns false

    var loop=0, index=0, regexp, e;

    // Clear the select list so nothing is displayed
    this.selectobj.options.length = 0;

    // Set up the regular expression
    try {
      regexp = new RegExp(pattern, this.flags);
    } catch(e) {
      return;
    }

    // Loop through the entire select list
    for (loop=0; loop < this.optionscopy.length; loop++) {

      // Check if we have a match
      if (regexp.test(this.optionscopy[loop].text)) {

        // We have a match, so add this option to the select list
        this.selectobj.options.length = index + 1;
        this.selectobj.options[index].text = this.optionscopy[loop].text;
        this.selectobj.options[index].value = this.optionscopy[loop].value;
        this.selectobj.options[index].selected = false;

        // Increment the index
        index++;
      }
    }
  }

  //--------------------------------------------------
  this.set_ignore_case = function(value) {
  // This method sets the regexp flags.
  // If value is true, sets the flags to "i".
  // If value is false, sets the flags to "".

    if (value) {
      this.flags = "i";
    } else {
      this.flags = "";
    }
  }

}