function userLookup(userStr) 
{
	if(userStr.length == 0) {
		// Hide the suggestion box.
		$('#userBox').hide();
	} else {
		$.post("include/searchAjax.php", {userString: ""+userStr+""}, function(data){
			if(data.length >0) {
				$('#userBox').show();
				$('#userList').html(data);
			}
		});
	}
} // lookup

function fillUser(thisValue) 
{
	$('#userStr').val(thisValue);
	setTimeout("$('#userBox').hide();", 200);
}


function gameLookup(gameStr) 
{
	if(gameStr.length == 0) {
		// Hide the suggestion box.
		$('#gameBox').hide();
	} else {
		$.post("include/searchAjax.php", {gameString: ""+gameStr+""}, function(data){
			if(data.length >0) {
				$('#gameBox').show();
				$('#gameList').html(data);
			}
		});
	}
} // lookup

function fillGame(thisValue) 
{
	$('#gameStr').val(thisValue);
	$.post("include/searchAjax.php", {gameId: ""+thisValue+""}, function(data){
		$('#gameIdStr').val(data);
	});
	setTimeout("$('#gameBox').hide();", 200);
}
