﻿	function validateCbForm()
	{
		var firstname = document.Callback.FirstName;
		var lastname = document.Callback.LastName;
		var address = document.Callback.Address;
		var city = document.Callback.City;
		var state = document.Callback.State;
		var postcode = document.Callback.PostCode;
		var phonenumber = document.Callback.PhoneNumber;
		var email = document.Callback.Email;
		var productsofinterest = document.Callback.ProductsOfInterest;
		var enquiryisfor = document.Callback.EnquiryIsFor;
		var otherenquiry = document.Callback.OtherEnquiry;
		
		if (firstname.value == "")
		{
			window.alert("You haven't told us what your first name is. Please try again.");
			firstname.focus();
			return false;
		}
		
		if (lastname.value == "")
		{
			window.alert("You haven't told us what your last name (Surname) is. Please try again.");
			lastname.focus();
			return false;
		}

		if (address.value == "")
		{
			window.alert("You haven't told us your postal address. Please try again.");
			address.focus();
			return false;
		}

		if (city.value == "")
		{
			window.alert("You haven't told us your city or suburb. Please try again.");
			city.focus();
			return false;
		}

		if (state.value == "--Please Select--")
		{
			window.alert("You haven't selected your state. Please try again.");
			state.focus();
			return false;
		}

		if (postcode.value == "")
		{
			window.alert("As you haven't told us your postcode. Please try again.");
			postcode.focus();
			return false;
		}

		if (phonenumber.value == "")
		{
			window.alert("You haven't told us your preferred telephone number. Please try again.");
			phonenumber.focus();
			return false;
		}

		if (email.value == "")
		{
			window.alert("You haven't told us your email address. Please try again.");
			email.focus();
			return false;
		}

		if (email.value.indexOf("@", 0) < 0)
		{
			window.alert("You haven't entered a valid email address. Please try again with a valid email address.");
			email.focus();
			return false;
		}

		if (email.value.indexOf(".", 0) < 0)
		{
			window.alert("You haven't entered a valid email address. Please try again with a valid email address.");
			email.focus();
			return false;
		}

		if (productsofinterest.value == "")
		{
			window.alert("You haven't told us what product(s) you are interested in. Please try again.");
			productsofinterest.focus();
			return false;
		}

		if (enquiryisfor.value == "--Please Select--")
		{
			window.alert("Please tell us who you are enquiry for. Please try again.");
			enquiryisfor.focus();
			return false;
		}
		
		if ((enquiryisfor.value =="Other") && (otherenquiry.value ==""))
		{
			window.alert ("You have select that you are making an other enquiry type. Please tell us what type of other enquiry.");
			otherenquiry.focus();
			return false;
		}
		
		
		
		return true;
	}
