
	// form validation
		function validEmail(email) {
			invalidChars = " /:,;"

			if (email == "") {
				return false
			}
			for (i=0; i<invalidChars.length; i++) {
				badChar = invalidChars.charAt(i)
				if (email.indexOf(badChar,0) > -1) {
					return false
				}
			}
			atPos = email.indexOf("@",1)
			if (atPos == -1) {
				return false
			}
			if (email.indexOf("@",atPos+1) > -1) {
				return false
			}
			periodPos = email.indexOf(".",atPos)
			if (periodPos == -1) {
				return false
			}
			if (periodPos+3 > email.length)	{
				return false
			}
			return true
		}// end of email validation				
		
		
		function validName(name) {
		    if (name == "") {
		  return false
		 }
		 return true
		 } 

		function validVerif_box(verif_box) {
		    if (verif_box == "") {
		  return false
		 }
		 return true
		 } 
		 
		 
		 function validContact(contact) {
		    if (contact == "") {
		  return false
		 }
		 return true
		 }	 
		 
		 

        function submitIt(booking) {			
			
			if (!validName(booking.name.value)) {
			     alert("Please enter your full name")
				 booking.name.focus()
				 booking.name.select()
				 return false
			}
			
			if (!validContact(booking.contact.value)) {
			     alert("Please enter your contact number")
				 booking.contact.focus()
				 booking.contact.select()
				 return false
			}

			if (!validEmail(booking.email.value)) {
				alert("Please enter a valid email address")
				booking.email.focus()
				booking.email.select()
				return false
			}			
			
			if (!validVerif_box(booking.verif_box.value)) {
			     alert("Please enter the verification code")
				 booking.verif_box.focus()
				 booking.verif_box.select()
				 return false
			}	

			return true
		}
//End of form validation-->
              
