function TextSearch()
{
	if (document.getElementById('txtSearchFor').value.length > 0)
	{
		window.location = 'search.aspx?Text=' + document.getElementById('txtSearchFor').value;
	}
}

function KeyDown(e)
{
	if (!e) var e = window.event;
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
	if (code==13)
	{
		//Stop the postback caused by the carriage
		//return as we're about to redirect
		postback = false;
		TextSearch();
	}
	else
	{
		postback = true;
	}
	return postback;
}