var caInformanteNombre = 'SearchInformante';
var caInformante = new complajaxInformante(caInformanteNombre, 'caInformante');
complajaxInformante.implement({
	handleSearch : function (texto,xml) {
		caInformante.setListado(xml.documentElement);
		caInformante.isAjaxWorking = false;
		caInformante.freeQueue();
	}
});

// Eventos del input
$('frm' + caInformanteNombre + 'Input').addEvent('keyup', function(){caInformante.cambioBuscador();}, false);
$('frm' + caInformanteNombre + 'Input').addEvent('focus', function(){caInformante.onInput(true);}, false);
$('frm' + caInformanteNombre + 'Input').addEvent('blur', function(){caInformante.onInput(false);}, false);

// Eventos del select
$('lyr' + caInformanteNombre + 'Table').addEvent('change', function(){caInformante.investigateIndex();}, false);
$('lyr' + caInformanteNombre + 'Table').addEvent('focus', function(){caInformante.onTable(true);caInformante.investigateIndex();}, false);
$('lyr' + caInformanteNombre + 'Table').addEvent('blur', function(){caInformante.onTable(false);}, false);
// Evento del submit
if(document.getElementById('frm' + caInformanteNombre + 'Button')) {
	$('frm' + caInformanteNombre + 'Button').addEvent('click', function(){document.getElementById('frm' + caInformanteNombre).submit();}, false);
}

