function lookup(inputString) {
    if(inputString.length == 0) {
        // Hide the suggestion box.
        jQuery('#suggestions').hide();
    } else {
        jQuery.post("../rpc.php", {
            queryString: ""+inputString+""
            }, function(data){
            if(data.length >0) {
                jQuery('#suggestions').show();
                jQuery('#autoSuggestionsList').html(data);
            }
        });
    }
} // lookup

function fill(thisValue) {
    jQuery('#inputString').val(thisValue);
    setTimeout("jQuery('#suggestions').hide();", 200);
}

//Validate form

jQuery(document).ready(function() {
    jQuery("#gameSearch").validate({
        rules: {
            inputString: "required"// simple rule, converted to {required:true}
        },
        messages: {
            inputString: "It's blank..."
        }
    });
});
