function FullSearchSelector (data, input, select, frame, field_name, button,module){
	this.prototype = new AutoComplete(data, input, select,button,field_name);
	this.prototype.frame = frame;
	var onselect = this.prototype.onselect;
	this.prototype.onselect = function(){
		onselect.apply(this);
		if(this.select.visible){
			this.setValueToHidden();
		}
	}
	this.Remove = function()
	{
		//EventFactory.remove('keyup', this.input);
		alert(this.button);
		/*EventFactory.remove('click', this.button);
		EventFactory.remove('blur', this.input);
		EventFactory.remove('blur', this.select.object);
		EventFactory.remove('blur', this.button); */
		this.select.innerHTML='';
	}

	var moveUp = this.prototype.moveUp;
	this.prototype.moveUp = function(){
		moveUp.apply(this);
		this.onselect();
	};
	var moveDown = this.prototype.moveDown;
	this.prototype.moveDown = function(){
		moveDown.apply(this);
		this.onselect();
	};
	var doSelect = this.prototype.doSelect;
	this.prototype.doSelect = function(e){
		if(e && e.keyCode == 13 && !this.select.visible){
    		//boundLists[field_name] = ['city'];
    		//listOptions[field_name+'_fixed'] = 0;
    		//handleListChange(field_name+'code',field_name);
    		document.location='http://www.sibvaleo.com/'+module+'.phtml?id='+ge(field_name+'code').value;
		}else{
			doSelect.apply(this);
			//alert(this.select.getSelectedValue());
			//handleListChange(field_name+'code',field_name);
    		document.location='http://www.sibvaleo.com/'+module+'.phtml?id='+ge(field_name+'code').value;
		}
	};
	var show = this.prototype.show;
	this.prototype.show = function(e){
		show.apply(this);
		this.frame.style.display = 'block';
	};
	var hide = this.prototype.hide;
	this.prototype.hide = function(e){
		if (this.isResult() == 'null'){
			document.getElementsByName(field_name+'code').item(0).value = '';
		}else if (this.isResult() == 'point'){
			document.getElementsByName(field_name+'code').item(0).value = '';
		}else{
		}
		hide.apply(this);
		this.frame.style.display = 'none';
	};
	var onaction = this.prototype.onaction;
	this.prototype.onaction = function(e){
		if (this.select.visible){
			this.setValueToHidden();
		}
		onaction.apply(this);
	}
	this.prototype.setValueToHidden = function(){
		if (this.isResult() == 'result' && this.input.value){
			document.getElementsByName(field_name+'code').item(0).value = this.select.getSelectedValue();
			//document.location='http://www.sibvaleo.com/katalog.phtml?id='+this.select.getSelectedValue();
		}else{
			document.getElementsByName(field_name+'code').item(0).value = '';
		}
	},
	this.prototype.showLabel = function (label){
		label.style.display = 'block';
	}
	this.prototype.isResult = function(){
		if (this.input.value == ''){
			return 'result';
		}
		var html = this.data.match(new RegExp('<o [^>]*>' + this.input.value + '[^<]*</o>', 'ig'));
		if (!html){
			return 'null';
		}
		for (var i = 0, l = html.length; i < l; i++){
			if (html[i].match(new RegExp('<o [^>]*>' + this.input.value + '</o>', 'ig'))){
				return 'result';
			}
			if (html[i].match(new RegExp('<o [^>]*>' + this.input.value + ' \([^>]*)</o>', 'ig'))){
				return 'result';
			}
		}
		return 'point';
	};
}

