function formatItem(row) {
	return row[0];
}
function formatResult(row) {
	return row[0].replace(/(<.+?>)/gi, '');
}
function autocomplete(form, field, link) {	
	jQuery(field).autocomplete(link, {
		width: 131,
		multiple: false,		
		max: 7,
		minChars: 3,
		scrollHeight: 300,
		selectFirst: false,
		matchContains: true,
		formatItem: formatItem,
		formatResult: formatResult
	});
	jQuery(field).result(function(){
		$(form).submit();
	})
}
