/*-------------------------------------------
A SIMPLE FORM VALIDATION SCRIPT
  (3nd minor revision - lejohn)

  This simple form validation script is
	made freely	available for use or modification
	to anyone who finds it useful.

	It is provided as is without any warranty
	or implied suitability to any purpose.

	Thank you for your interest. You may contact us
	for feedbacks, comments and suggestions at
	lad21ph@yahoo.com

	Support OpenSource!
-------------------------------------------*/
function validate() {

	if (document.onlineform.Passenger.value=="") {
			alert("Please provide Passenger Full Name and Age.");
		document.onlineform.Passenger.focus();
		return false;
	}

	if (document.onlineform.Nationality.value=="") {
		alert("Please indicate your NATIONALITY.");
		document.onlineform.Nationality.focus();
		return false;
	}

	if (document.onlineform.Email.value=="") {
		alert("Please provide your E-mail Address.");
		document.onlineform.Email.focus();
		return false;
	}
var mail=onlineform.Email.value
if (mail.indexOf("@")== -1)

 {

    alert("Please enter a valid Email Address");

    document.onlineform.Email.focus();

	return false;
	
		 }
var mail=onlineform.Email.value
if (mail.indexOf(".")== -1)

 {

    alert("Please enter a valid Email Address");

    document.onlineform.Email.focus();

	return false;
	
		 }
		 	
	if (document.onlineform.Phone.value=="") {
		alert("Please provide your PHONE NUMBER.");
		document.onlineform.Phone.focus();
		return false;
	}
	else if (isNaN(document.onlineform.Phone.value)==true) {
		alert("Please enter a NUMERIC value for PHONE NUMBER field.");
		document.onlineform.Phone.focus();
		return false;
	}

	if (document.onlineform.Address.value=="") {
		alert("Please indicate your address or Address to deliver ticket.");
		document.onlineform.Address.focus();
		return false;
	}

	if (document.onlineform.Fax_No.value=="") {
		alert("Please provide your FAX NUMBER.");
		document.onlineform.Fax_No.focus();
		return false;
	}
	else if (isNaN(document.onlineform.Fax_No.value)==true) {
		alert("Please enter a NUMERIC value for FAX NUMBER field.");
		document.onlineform.Fax_No.focus();
		return false;
	}

	if (document.onlineform.Ticket_Type.value=="") {
		alert("Please Select ticket type.");
		document.onlineform.Ticket_Type.focus();
		return false;
		
	}
	if (document.onlineform.Preferred_Airlines.value=="") {
		alert("Please Indicate Preferred Airlines.");
		document.onlineform.Preferred_Airlines.focus();
		return false;
		
	}
	if (document.onlineform.Flight_Origin.value=="") {
		alert("Please Indicate Flight Origin.");
		document.onlineform.Flight_Origin.focus();
		return false;
		
	}
		if (document.onlineform.Flight_Destination.value=="") {
		alert("Please Indicate Flight Destination.");
		document.onlineform.Flight_Destination.focus();
		return false;
		
	}
		if (document.onlineform.ETD_day.value=="") {
		alert("Please Indicate your preferred Departure Date.");
		document.onlineform.ETD_day.focus();
		return false;
		
	}
		if (document.onlineform.ETD_month.value=="") {
		alert("Please Indicate your preferred Departure Month.");
		document.onlineform.ETD_month.focus();
		return false;
		
	}
		if (document.onlineform.ETD_year.value=="") {
		alert("Please Indicate your preferred Departure Year.");
		document.onlineform.ETD_year.focus();
		return false;
		
	}
		if (document.onlineform.ETD_time.value=="") {
		alert("Please Indicate your preferred Departure Time.");
		document.onlineform.ETD_time.focus();
		return false;
		
	}
	
}
