<!-- Hide from incompatible browsers

	

	//Check if user wants to clear all fields.

	function confirmReset() {

		var resetForm = confirm("This will clear all fields. Are you sure you want to reset the form?");

		if (resetForm == true) 

			return true;

		return false;

	}

	

	

	//Validation

	

	function validForm(){

		if(isSalutation()==false){

			return false;

		}

		if(isName()==false){

			return false;

		}

		if(isLastName()==false){

			return false;

		}

		if(isEmail()==false){

			return false;

		}

		if(isStreet()==false){

			return false;

		}

		if(isCity()==false){

			return false;

		}

		if(isState()==false){

			return false;

		}

		if(isPet()==false){

			return false;

		}

		if(isNewsletter()==false){

			return false;

		}

		if(isTelContact()==false){

			return false;

		}

		if(isTelNum()==false){

			return false;

		}

		if(isComments()==false){

			return false;

		}

		

	}

	

	function isSalutation(){

		if(contactForm.salute.value==""){

			alert("Please choose an option for Salutation.");

			

			return false;

			}

			else {return true;}

	

	}

	function isName(){

		if(contactForm.firstname.value==""){

			alert("Please enter your first name.");

			contactForm.firstname.focus();

			contactForm.firstname.select();

			return false;

			}

			else {return true;}

	}

	

	function isLastName(){

		if(contactForm.surname.value==""){

			alert("Please enter your last name.");

			contactForm.surname.focus();

			contactForm.surname.select();

			return false;

			}

			else {return true;}

	}

	function isEmail(){

		if(contactForm.email.value==""){

			alert("Please enter your e-mail.");

			contactForm.email.focus();

			contactForm.email.select();

			return false;

			}

		if(contactForm.email.value != "" && contactForm.email.value.indexOf("@")== "-1" && contactForm.email.value.indexOf(".")=="-1"){

			alert("Please enter a valid e-mail address.");

			contactForm.email.focus();

			contactForm.email.select();

			return false;

			}

		else {return true;}

	}

	function isStreet(){

		if(contactForm.street.value==""){

			alert("Please enter your street address.");

			contactForm.street.focus();

			contactForm.street.select();

			return false;

			}

			else {return true;}

	}

	

	function isCity(){

		if(contactForm.city.value==""){

			alert("Please enter your city.");

			contactForm.city.focus();

			contactForm.city.select();

			return false;

			}

			else {return true;}

	}

	

	function isState(){

		if(contactForm.state.value==""){

			alert("Please enter your province or state.");

			contactForm.state.focus();

			contactForm.state.select();

			return false;

			}

			else {return true;}

	}

	

	function isPet(){

		if(contactForm.pet.value=="" ){

			

			alert("Please choose the type of pet that you have.");

			return false;

			}

			else {return true;}

	}

	

	function isNewsletter(){

		if(contactForm.newsletter.value=="" ){

			

			alert("Please indicate if you want to receive future e-mails and special promotions from us.");

			return false;

			}

			else {return true;}

	}

	

	

	function isTelContact(){

	if(contactForm.phone.value ==""){

		

		alert("Please indicate if you prefer we contact you by phone.");

		return false;

		}

		else if(contactForm.phone.value =="no")

		{return true;}

		else if(contactForm.phone.value =="yes")

		{return isTelNum();}

		

		else {return true;}

	}

	

	

	

	function isTelNum(){

	 	

		//Check if the phone number have the standard 12 characters (this including the 2 dashes)

		if (contactForm.tel.value.length != 12 && contactForm.phone.value == "yes")

			 {

			 	alert("Please enter a valid telephone number in this format: ###-###-####");

				contactForm.tel.focus();

				contactForm.tel.select();

				return false;

			 }

		//Check if the characters of the phone number only contains numbers and the 2 dashes

		for(var i=0; i < contactForm.tel.value.length; i++){

				//Checking for numbers only string.

				if ((i > -1 && i < 3) || (i > 3 && i < 7) || (i > 7 && i < 12)){

					if(contactForm.tel.value.charAt(i) < "0" || contactForm.tel.value.charAt(i) > "9" && contactForm.phone.value == "yes"){

						alert("Please enter a valid telephone number.");

						contactForm.tel.focus();

						contactForm.tel.select();

						return false;

					}	

				}

				//Check if the phone number doesn't contain the 2 dashes.  This becomes an invalid format.

				else if (contactForm.tel.value.charAt(i) != "-"){

						alert("Please enter your telephone number in this format: ###-###-####");

						contactForm.tel.focus();

						contactForm.tel.select();

						return false;

				}

				

		}

		return true;	

	}		

	



	

	

	function isComments(){

		if(contactForm.comments.value=="" ){

			

			alert("Please tell us your comments and any inquiries.");

			contactForm.comments.focus();

			contactForm.comments.select();

			return false;

			}

			else {return true;}

	}

// Stop hiding from incompatible browsers-->