function lookupQuery(inputStringQuery) {
    if(inputStringQuery.length < 3) {
        // Hide the suggestion box.
        $('#suggestionsQuery').hide();
    } else {
        $.post("ajaxsearchquery.php", {queryString: ""+inputStringQuery+""}, function(data){
            if(data.length >0) {
                $('#suggestionsQuery').show();
                $('#autoSuggestionsListQuery').html(data);
            }
        });
    }
} // lookup

function fillQuery(thisValue,a) {
$('#inputStringQuery').val(thisValue);
setTimeout("$('#suggestionsQuery').hide();", 200);
document.supersearch.search_type.value=a;

if (a == parseInt(a))
	window.location = "http://www.fullpint.com/showpub.php?pubid=" + a;
if (a == "postcode")
	window.location = "http://www.fullpint.com/search.php?postcode=" + escape(thisValue);
if (a == "area")
{
	var split_area = thisValue.split(",");
	window.location = "http://www.fullpint.com/search.php?area=" + escape(split_area[0]);
}
if (a == "station")
	window.location = "http://www.fullpint.com/search.php?tube=" + escape(thisValue);
if (a == "general_pub")
{
	window.location = "http://www.fullpint.com/search.php?name=" + escape(thisValue);
}
}


