
<!-- JAVASCRIPT INCLUDE for CA DEALER LOCATOR-->


		//ZIP CODE LOCATOR
		function submitZipCode(dealerlocator) {
			if (dealerlocator.zipcode.value == "") {
				alert("You must enter a Canadian Postal Code")
				dealerlocator.zipcode.focus()
				dealerlocator.zipcode.select()
				return false;
			}
			
			return true;
		}
			
		//DEALER LOCATOR BY DEALER NAME
		function submitDealerName(dealerfind) {
			if (dealerfind.dealername.value == "") {
				alert("You must enter a Canadian Dealer Name")
				dealerfind.dealername.focus()
				//dealerfind.dealername.select()
				return false;
			}
	
			if (dealerfind.state.selectedIndex == "") {
				alert("You must select a Province")
				dealerfind.state.focus()
				//dealerfind.state.select()
				return false;
			}
	
			return true;
		}	
		
		
		//DEALER LOCATOR BY CITY
		function submitCity(dealerfind) {
			if (dealerfind.state.selectedIndex == 0) {
				alert("You must select a Province")
				dealerfind.state.focus();
				//dealerfind.state.select()
				return false;
			}
			if (dealerfind.city.selectedIndex == "") {
				alert("You must select a City")
				dealerfind.city.focus()
				//dealerfind.city.select()
				return false;
			}			
	
			return true;
		}	

		//DEALER LOCATOR BY CITY - Check to make sure user does not select another province while cities are currently populated			
		function checkState() {
		var s = document.dealerfind.state.selectedIndex;
		var c = document.dealerfind.city.selectedIndex;

			//check the form only if a state is already selected
			if (c != 0) {

				//so since a state is already selected, then reset the city to default <Select City> value
				if (s != 0) {
					document.dealerfind.city.options[0].selected = true;
					dealerfind.submit();
				}
			}
		} 			

<!-- JAVASCRIPT INCLUDE for CA DEALER LOCATOR-->
