function keyword_search_directory(config) {
  this.config = config;
  this.field = function() {
    this.content = document.createElement('DIV');
		this.get_text_box();    
    return this.content;
  }
  this.get_text_box = function(){
  	var tbx_container = document.createElement('DIV');
    var tbx = document.createElement('INPUT');
    tbx.setAttribute('type', 'text');
    tbx.setAttribute('maxlength', '120');
    tbx.setAttribute('id', 'keyword_search');
    tbx.field = this;

    tbx.onchange = function() {
      this.field.set(this.value);
    }
    tbx.onkeyup = function() {
      //this.field.set(this.value);
    };

    tbx_container.appendChild(tbx);
    this.content.appendChild(tbx_container);
    return;
  }
  this.set = function(keyword) {
    this.keyword = keyword;
    directory_update();
    return;
  }
  this.value = function() {
    if (this.keyword) return {'keyword': this.keyword};
  	return;
  }
  this.update = function(config) {
  	return;
    this.config = config;
    var values = [];
    for (var n in this.selects) {
      values[n] = this.selects[n].options[this.selects[n].selectedIndex].value;
    }
    this.selects[0].remove();
    this.get_first();
    for (var n in values) {
      if (this.selects[n]) this.selects[n].select(values[n]);
    }
  }
}
