//jQuery.noConflict();
var g_iSearchCount = 0;
function xlookup(event,search,city)
{
	var keynum = (event == null ? window.event.keyCode : event.keyCode);
	var $jquery = jQuery.noConflict();
	if( keynum == 13 )
	{
		$jquery('#suggestions').hide();
	}
	else
	{
		if(search.length <= 1)
		{
			// Hide the suggestion box.
			$jquery('#suggestions').hide();
		}
		else
		{
			g_iSearchCount++;
			$jquery.post("jquery.php", {search: ""+search+"",city: ""+city+"", searchId: ""+g_iSearchCount+"" }, function(data){
				if(data.length > 0 && $('search').value.length > 1 ) {
					var iIdDel = data.indexOf( ":" );
					if( data.substr( 0, iIdDel ) == g_iSearchCount ) {
						if( data.length > iIdDel ) {
							$jquery('#suggestions').show();
							$jquery('#autoSuggestionsList').html(data.substr( iIdDel + 1 ));
						} else {
							$jquery('#suggestions').hide();
						}
					}
				} else {
					$jquery('#suggestions').hide();
				}
				});
			}
		}
	} // lookup

function xfill(thisValue)
{
	var $jquery = jQuery.noConflict();
	
	$jquery('#search').val(thisValue);
	$jquery('#suggestions').hide();
	Search( encodeURIComponent( thisValue ), 'search_ajax.php', $('city').value );
}

function xclose()
{
	var $jquery = jQuery.noConflict();
	
	$jquery('#suggestions').hide();
}