var alertTimerId = 0;
//added due to the prototype jquery conflict with $
var j = jQuery.noConflict();

 function lookup(inputString)
				{
				  //clearTimeout (alertTimerId);
                  /*document.getElementById("txt1").style.color = "#FF0000";*/
                if(inputString.length > 1)
                {
                    var t=setTimeout("lookup_run('"+inputString+"')",1000);
                }
                else
                {
                   LiveSearch_Hide();
                }
                 //var alertTimerId = setTimeout (test(inputString), 1000 );

				}

 //gets the string for the live search
    function lookup_run(inputString) {

		if(inputString.length < 1) {
			// Hide the suggestion box.
			//j('#suggestions').hide();
            LiveSearch_Hide();
		} else {
			j.post("search2.php", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					j('#suggestions').show();
					j('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup

	function fill(thisValue) {
		j('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}


 function LiveSearch_Hide()
        {
            document.getElementById('suggestions').style.display = 'none';
        }
