function fncKeySubmit(intKey)
{
	if(intKey == 13)
	{			
		if(document.forms[0].ts_Distance)
		{
			if (!(document.forms[0].ts_Distance.value=='0'))
			{
				if ((document.forms[0].ts_ZipCode.value=='') && (document.forms[0].ts_City.value==''))
				{
					alert("To search by distance, you must select a city or enter a zip code.");
				}else{
					if (!(document.forms[0].ts_ZipCode.value==''))
					{
						if (isNaN(document.forms[0].ts_ZipCode.value))
						{
							alert("Zip code must be numeric.");
						}else{
							location.href='Search.aspx?City='+document.forms[0].ts_City.options[document.forms[0].ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_Course.value+'&SDate='+document.forms[0].ts_SDate.value+'&EDate='+document.forms[0].ts_EDate.value+'&ZipCode='+document.forms[0].ts_ZipCode.value+'&Distance='+document.forms[0].ts_Distance.value;
						}
					}else{
						location.href='Search.aspx?City='+document.forms[0].ts_City.option[document.forms[0].ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_Course.value+'&SDate='+document.forms[0].ts_SDate.value+'&EDate='+document.forms[0].ts_EDate.value+'&ZipCode='+document.forms[0].ts_ZipCode.value+'&Distance='+document.forms[0].ts_Distance.value;
					}
				}
			}else{
				location.href='Search.aspx?City='+document.forms[0].ts_City.options[document.forms[0].ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_Course.value+'&SDate='+document.forms[0].ts_SDate.value+'&EDate='+document.forms[0].ts_EDate.value+'&ZipCode='+document.forms[0].ts_ZipCode.value+'&Distance='+document.forms[0].ts_Distance.value;
			}
		}
		else
		{
			if (!(document.forms[0].ts_ts_Distance.value=='0'))
			{
				if ((document.forms[0].ts_ts_ZipCode.value=='') && (document.forms[0].ts_ts_City.value==''))
				{
					alert("To search by distance, you must select a city or enter a zip code.");
				}else{
					if (!(document.forms[0].ts_ts_ZipCode.value==''))
					{
						if (isNaN(document.forms[0].ts_ts_ZipCode.value))
						{
							alert("Zip code must be numeric.");
						}else{
							location.href='Search.aspx?City='+document.forms[0].ts_ts_City.options[document.forms[0].ts_ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_ts_Course.value+'&SDate='+document.forms[0].ts_ts_SDate.value+'&EDate='+document.forms[0].ts_ts_EDate.value+'&ZipCode='+document.forms[0].ts_ts_ZipCode.value+'&Distance='+document.forms[0].ts_ts_Distance.value;
						}
					}else{
						location.href='Search.aspx?City='+document.forms[0].ts_ts_City.option[document.forms[0].ts_ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_ts_Course.value+'&SDate='+document.forms[0].ts_ts_SDate.value+'&EDate='+document.forms[0].ts_ts_EDate.value+'&ZipCode='+document.forms[0].ts_ts_ZipCode.value+'&Distance='+document.forms[0].ts_ts_Distance.value;
					}
				}
			}else{
				location.href='Search.aspx?City='+document.forms[0].ts_ts_City.options[document.forms[0].ts_ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_ts_Course.value+'&SDate='+document.forms[0].ts_ts_SDate.value+'&EDate='+document.forms[0].ts_ts_EDate.value+'&ZipCode='+document.forms[0].ts_ts_ZipCode.value+'&Distance='+document.forms[0].ts_ts_Distance.value;
			}
		}
	}
}
		
function chkSubmit()
{
	if(document.forms[0].ts_Distance)
	{
		if (!(document.forms[0].ts_Distance.value=='0'))
		{
			if ((document.forms[0].ts_ZipCode.value=='') && (document.forms[0].ts_City.value==''))
			{
				alert("To search by distance, you must select a city or enter a zip code.");
			}else{
				if (!(document.forms[0].ts_ZipCode.value==''))
				{
					if (isNaN(document.forms[0].ts_ZipCode.value))
					{
						alert("Zip code must be numeric.");
					}else{
						location.href='Search.aspx?City='+document.forms[0].ts_City.options[document.forms[0].ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_Course.value+'&SDate='+document.forms[0].ts_SDate.value+'&EDate='+document.forms[0].ts_EDate.value+'&ZipCode='+document.forms[0].ts_ZipCode.value+'&Distance='+document.forms[0].ts_Distance.value;
					}
				}else{
					location.href='Search.aspx?City='+document.forms[0].ts_City.options[document.forms[0].ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_Course.value+'&SDate='+document.forms[0].ts_SDate.value+'&EDate='+document.forms[0].ts_EDate.value+'&ZipCode='+document.forms[0].ts_ZipCode.value+'&Distance='+document.forms[0].ts_Distance.value;
				}
			}
		}else{
			location.href='Search.aspx?City='+document.forms[0].ts_City.options[document.forms[0].ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_Course.value+'&SDate='+document.forms[0].ts_SDate.value+'&EDate='+document.forms[0].ts_EDate.value+'&ZipCode='+document.forms[0].ts_ZipCode.value+'&Distance='+document.forms[0].ts_Distance.value;
		}		
	}
	else
	{
		if (!(document.forms[0].ts_ts_Distance.value=='0'))
		{
			if ((document.forms[0].ts_ts_ZipCode.value=='') && (document.forms[0].ts_ts_City.value==''))
			{
				alert("To search by distance, you must select a city or enter a zip code.");
			}else{
				if (!(document.forms[0].ts_ts_ZipCode.value==''))
				{
					if (isNaN(document.forms[0].ts_ts_ZipCode.value))
					{
						alert("Zip code must be numeric.");
					}else{
						location.href='Search.aspx?City='+document.forms[0].ts_ts_City.options[document.forms[0].ts_ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_ts_Course.value+'&SDate='+document.forms[0].ts_ts_SDate.value+'&EDate='+document.forms[0].ts_ts_EDate.value+'&ZipCode='+document.forms[0].ts_ts_ZipCode.value+'&Distance='+document.forms[0].ts_ts_Distance.value;
					}
				}else{
					location.href='Search.aspx?City='+document.forms[0].ts_ts_City.options[document.forms[0].ts_ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_ts_Course.value+'&SDate='+document.forms[0].ts_ts_SDate.value+'&EDate='+document.forms[0].ts_ts_EDate.value+'&ZipCode='+document.forms[0].ts_ts_ZipCode.value+'&Distance='+document.forms[0].ts_ts_Distance.value;
				}
			}
		}else{
			location.href='Search.aspx?City='+document.forms[0].ts_ts_City.options[document.forms[0].ts_ts_City.selectedIndex].text+'&Course='+document.forms[0].ts_ts_Course.value+'&SDate='+document.forms[0].ts_ts_SDate.value+'&EDate='+document.forms[0].ts_ts_EDate.value+'&ZipCode='+document.forms[0].ts_ts_ZipCode.value+'&Distance='+document.forms[0].ts_ts_Distance.value;
		}		
	}
}
