// /scripts/autoFillScript.js

function lookup(inputString, fieldName) {
    if(inputString.length == 0) {
        // Hide the suggestion box.
        $('#suggestions_'+fieldName).hide();
    } else {
        $.post("rpc/rpc.php", {queryString: ""+inputString+"", field: ""+fieldName+""}, function(data){
            if(data.length >0) {
                $('#suggestions_'+fieldName).show();
                $('#autoSuggestionsList_'+fieldName).html(data);
            }
        });
    }
} // lookup

function fillSearch(thisValue, field) {
    $('#'+field).val(thisValue);
    setTimeout("$('#suggestions_"+field+"').hide();", 50);
}

 
