function GetSuggestionProvider(idUnite, locale, idUser, hashedUserId, textBoxControlId, searchButtonId, webServiceUrl)
{
	return function()
	{
			$( '#' + textBoxControlId).autocomplete({
				minLength: 0,
				source: webServiceUrl + "?unite=" + idUnite + "&usr=" + idUser + "&hashusr=" + hashedUserId + "&lang=" + locale,
				focus: function( event, ui ) {
					$( '#' + textBoxControlId).val( ui.item.DisplayText );
					return false;
				},
				select: function( event, ui ) {
					$( '#' + searchButtonId ).click();
					return false;
				}
			})
			.data( 'autocomplete' )._renderItem = function( ul, item ) {
				return $( '<li></li>' )
					.data( 'item.autocomplete', item )
					.append( '<a>' + item.DisplayText + '<br /><span class="autocomplete-desc">' + item.MiniDescription + '</span></a>' )
					.appendTo( ul );
			};
	}
}

