

function submitIt(myForm) {

	re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/

	

if (myForm.email.value != "") {
	if (!re.test(myForm.email.value)) {
		alert("Invalid email address")
		myForm.email.focus()
		myForm.email.select()
		return false
	}
}
			
		

			if(myForm.first_name.value == ""){
				alert("must enter first name")
				myForm.first_name.focus()
				return false
			}
			if(myForm.last_name.value == ""){
				alert("must enter last name")
				myForm.last_name.focus()
				return false
			}
			if(myForm.street.value == ""){
				alert("must enter street name")
				myForm.street.focus()
				return false
			}
			if(myForm.suburb.value == ""){
				alert("must enter a suburb")
				myForm.suburb.focus()
				return false
			}
			if(myForm.post_code.value == ""){
				alert("must enter a post code")
				myForm.post_code.focus()
				return false
			}
			if(myForm.post_code.value.length <4){
				alert("post code must have 4 numbers")
				myForm.post_code.focus()
				myForm.post_code.select()
				return false
			}
			if(myForm.transport.value == "please_choose"){
				alert("must select mode of transport")
				myForm.transport.focus()
				return false
			}
			if(myForm.year.value == ""){
				alert("must enter what year your in")
				myForm.year.focus()
				return false
			}
			if(myForm.dd.value == ""){
				alert("must enter day of birth")
				myForm.dd.focus()
				return false
			}
			if(myForm.dd.value.length <2){
				alert("day of birth must have 2 numbers")
				myForm.dd.focus()
				myForm.mm.select()
				return false
			}
			if(myForm.mm.value == ""){
				alert("must enter month of birth")
				myForm.mm.focus()
				return false
			}
			if(myForm.mm.value.length <2){
				alert("month of birth must have 2 numbers")
				myForm.mm.focus()
				myForm.mm.select()
				return false
			}
			if(myForm.yyyy.value == ""){
				alert("must enter year of birth")
				myForm.yyyy.focus()
				return false
			}
			if(myForm.yyyy.value.length <4){
				alert("year of birth must have 4 numbers")
				myForm.yyyy.focus()
				myForm.yyyy.select()
				return false
			}
			if(myForm.contact_number1.value == ""){
				alert("must enter a contact number1")
				myForm.contact_number1.focus()
				return false
			}
			if(myForm.contact_number1.value.length <8){
				alert("contact number1 must consist of at least 8 digits")
				myForm.contact_number1.focus()
				myForm.contact_number1.select()
				return false
			}	
			if(myForm.contact_number2.value == ""){
				return true
			}	
			if(myForm.contact_number2.value.length <8){
				alert("contact number2 must consist of at least 8 digits")
				myForm.contact_number2.focus()
				myForm.contact_number2.select()
				return false
			}
			if(myForm.contact_number.value.length <8){
				alert("contact number must consist of at least 8 digits")
				myForm.contact_number.focus()
				myForm.contact_number.select()
				return false
			}






	return true
}