function doSearch(el,event_obj) {
	if(event_obj.keyCode == 13){
            if(window.justSearchSelected){
                window.justSearchSelected = false;
                return false;
            }
		doRealSearch(el)
	}
}
function doRealSearch(el) {
	if ($(el).val().length < 4) {
		alert(searchShort);
	}
	else {
            $("#searchForm").action = searchLink + '/' + encodeURIComponent($(el).val()) + '/';
		document.location = searchLink + '/' + encodeURIComponent($(el).val()) + '/';
	}
}

function initAutoComplete( p_target, p_url, p_width ) {
	jQuery(document).ready(function () {
		jQuery( ""+p_target ).autocomplete( p_url, {
			width: p_width,
                        minChars:2,
			max: 6,
                        highlightItem: true,
                        multiple: true,
                        multipleSeparator: " ",
			matchContains: true
		});
	});
}