<!--
	//filename: defaultGetMarket.js
	//description:
	//for directing the user to find a market by city, state or zip code, or by selecting a market from the dropdown
	
	function SearchByLocation()
	{
		var strMktLocation = document.getElementById( 'txtMktLocation' ).value;
		if ( strMktLocation == '' || strMktLocation == 'Enter Zip Code or City, State' )
		{
			alert( 'Please enter your zip code or city, state.' );
			return;
		}
		else
		{
			if ( isNaN( strMktLocation ) )
			{
				//try city, state
				var arrMktCityState = strMktLocation.split( ',' );
				if ( arrMktCityState.length != 2 )
				{
					//try city [space] state
					arrMktCityState = strMktLocation.split( ' ' );
					if ( arrMktCityState.length != 2 )
					{
						alert( 'Please enter your City and State.' );
						return;
					}
				}
			}
			window.location = 'defaultGoLocation.asp?location=' + strMktLocation;
		}
	}
	
	function SearchByMarket()
	{
		var lngMktID = parseInt( document.getElementById( 'selMktID' ).value );
		if ( lngMktID == 0 )
		{
			alert( 'Please select a market.' );
			return;
		}
		else
		{
			window.location = 'defaultGoMarket.asp?ID=' + lngMktID;
		}
	}
//-->