    function performSearch()
    {
    	var invalid = true;
    	var searchBox = document.getElementById('scoresQueryText');
    	var url = "";
    	if (searchBox.value != '')
    	{
			if (searchBox.value.indexOf("/") >= 0)
			{
		    	var d = Date.parse(searchBox.value, "m/d/Y");
		    	if (!isNaN(d))
		    	{
		    		d = new Date(d);
			    	invalid = false;
			    	
			    	url = "/pocketfives/scores.php?year=" + d.getFullYear() + "&month=" + (d.getMonth() + 1) + "&day=" + d.getDate();
		    	}
			}
			else
			{
		    	invalid = false; 
		    	url = "/pocketfives/scores.php?username=" + searchBox.value;
			}
    	}
    	
    	if (invalid)
    	{
	    	alert('Invalid entry');
	    	searchBox.value = "";
	    	searchBox.focus();
	    }
	    else
	    {
	    	top.location = url;
	    }
    }
