﻿
$(document).ready(function() {

	jQuery(function() {
		var a = $('#strS').autocomplete({
			serviceUrl: strPath + 'includes/scripts/autocomplete.ashx',
			minChars: 2,
			delimiter: /(,|;)\s*/, // regex or character
			maxHeight: 400,
			width: 280,
			zIndex: 9999,
			deferRequestBy: 0, //miliseconds
			params: { country: 'Yes' }, //aditional parameters
			noCache: false, //default is false, set to true to disable caching
			// callback function:
			onSelect: function(value, data) { traitement_selection(value, data); }
		});

	});

});

function traitement_selection(value, data) {
	document.getElementById("searchForm").submit();
}
