<!-- Hide this script from old browsers --
/*
   
   
   Author: Aimee Chow
*/



function validate(bookform){	
	

	
	if (bookform.TourName.value == "List of Tours")
	{
		alert ("Please select the tour in this field");
		bookform.TourName.focus();
		return (false);
	}

	if (bookform.PersonalFullName.value == "")
	{
		alert ("Please enter your full name as per passport in this field");
		bookform.PersonalFullName.focus();
		return (false);
	}


	if (bookform.PersonalAddress.value == "")
	{
		alert ("Please enter your personal address in this field");
		bookform.PersonalAddress.focus();
		return (false);
	}

	
	
	if (bookform.PersonalSuburb.value == "")
	{
		alert ("Please enter suburb in this field");
		bookform.PersonalSuburb.focus();
		return (false);
	}

	if (bookform.PersonalState.value == "STATE")
	{
		alert ("Please enter state in this field");
		bookform.PersonalState.focus();
		return (false);
	}
	
	if (bookform.PersonalState.value == "OTHER")
	{
		if (bookform.StateInfo.value == "")
		{
			alert ("Please specify state in this field");
			bookform.StateInfo.focus();
			return (false);
		}
	}	

	if (bookform.PersonalPostCode.value == "")
	{
		alert ("Please enter postcode in this field");
		bookform.PersonalPostCode.focus();
		return (false);
	}

	if (bookform.PersonalPhone.value == "")
	{
		alert ("Please enter your phone number in this field");
		bookform.PersonalPhone.focus();
		return (false);
	}
	
	
	
	
	if (bookform.SeatingPref.value == "Other") 
	{
		if (bookform.AdditionalSeatingInfo.value == "")

		{
			alert ("Please Specify your seat preference in this field");
			bookform.AdditionalSeatingInfo.focus();
			return (false);
		}

	}	
	 
	if (bookform.SeatingPref.value != "Other") 
	{	 
		if (bookform.AdditionalSeatingInfo.value != "")
		
		{
		alert ("You do not need to specify the seat preference in this field");
		bookform.AdditionalSeatingInfo.focus();
		return (false);
		}

	}	
		
	
	
	if (bookform.MealPref.value == "Other") 
	{
		if (bookform.AdditionalMealInfo.value == "")
		{
			alert ("Please Specify your meal preference in this field");
			bookform.AdditionalMealInfo.focus();
			return (false);
		}
	}

	
	
	if (bookform.MealPref.value != "Other") 
	{
		if (bookform.AdditionalMealInfo.value != "")
		{
			alert ("Yo do not need to Specify your meal preference in this field");
			bookform.AdditionalMealInfo.focus();
			return (false);
		}
	}

	
	if (bookform.InsuranceFlag.value == "No") 
	{

		if (bookform.InsuranceInfo.value == "")
		{
			alert ("Please provide your insurance detail in this field");
			bookform.InsuranceInfo.focus();
			return (false);
		}
	}

	if (bookform.DepPaymtd.value == "SELECT METHOD") 
	{

		alert ("Please advise your payment method in this field");
		bookform.DepPaymtd.focus();
		return (false);
		
	}
	if (bookform.DepPaymtd.value == "By Credit Card online") 
	{
		if (bookingform.CreditCardType1.value == "CARD TYPE")
		{
			alert ("Please enter your card type in this field");
			bookingform.CreditCardType1.focus();
			return (false);
		}
		
		
	}
	if (bookform.DepPaymtd.value == "By Credit Card online") 
	{
		if (bookingform.CreditCardNo1.value == "")
		{
			alert ("Please enter your card no in this field");
			bookingform.CreditCardNo1.focus();
			return (false);
		}
	}

	if (bookform.DepPaymtd.value == "By Credit Card online") 
	{
		if (bookingform.CardExpiryMonth1.value == "MM")
		{
			alert ("Please enter your card expiry month in this field");
			bookingform.CardExpiryMonth1.focus();
			return (false);
		}
	}

	if (bookform.DepPaymtd.value == "By Credit Card online") 
	{
		if (bookingform.CardExpiryYear1.value == "YY")
		{
		alert ("Please enter your card expiry year in this field");
		bookingform.CardExpiryYear1.focus();
		return (false);
		}

	}
	
	if (bookform.DepPaymtd.value == "By Credit Card online") 
	{
		if (bookingform.CreditCardName1.value == "")
		{
		alert ("Please enter your card name in this field");
		bookingform.CreditCardName1.focus();
		return (false);
		}
	}
	if (bookform.DepPaymtd.value == "By Credit Card online") 
	{
			
		if (bookingform.ccvID1.value == "")
		{
		alert ("Please enter Card ID in this field");
		bookingform.ccvID1.focus();
		return (false);
		}
	}

	if (bookform.DepPaymtd.value != "By Credit Card online") 
	{
		bookingform.ccvID1.value == ""
		bookingform.CreditCardType1.value == "CARD TYPE"
		bookingform.CreditCardNo1.value == ""
		bookingform.CardExpiryMonth1.value == "MM"
		bookingform.CardExpiryYear1.value == "YY"
		bookingform.CreditCardName1.value == ""
		
	}
	
	if (bookform.AcceptFlag.checked) 
	{ 	bookform.submit();
	}
	else 
	
	{
		alert ("To make a booking with us, please accept the book condition of the tours");
		bookform.AcceptFlag.focus();
		return (false);
	}

	
} 




// -- End Hiding Here -->
