<!--

function CheckForm () {



	//Intialise variables

	var errorMsg = "";

	var errorMsgLong = "";



	//Check for a first name

	if (document.frm_contact_us.txt_firstname.value == ""){

		errorMsg += "\n\tFirst Name \t- Enter your First Name";

	}

	

	//Check for a last name

	if (document.frm_contact_us.txt_lastname.value == ""){

		errorMsg += "\n\tLastname \t- Enter your lastname Name";

	}



	if (document.frm_contact_us.txt_country.value == ""){

		errorMsg += "\n\tCountry \t\t- Enter your Country";

	}



	if (document.frm_contact_us.txt_telephonenumber.value == ""){

		errorMsg += "\n\tTelephone Number\t- Enter your Telephone Number";

	}



	if (document.frm_contact_us.txt_emailaddress.value.length >=0 && (document.frm_contact_us.txt_emailaddress.value.indexOf("@",0) == -1||document.frm_contact_us.txt_emailaddress.value.indexOf(".",0) == -1)) { 

		errorMsg +="\n\tE-mail \t\t- Enter your valid e-mail address";

	}



	//If there is aproblem with the form then display an error

	if ((errorMsg != "") || (errorMsgLong != "")){

		msg = "___________________________________________________________________\n\n";

		msg += "Please correct the problem(s) and re-submit the form.\n";

		msg += "___________________________________________________________________\n\n";

		msg += "The following field(s) need to be corrected: \n";

		

		errorMsg += alert(msg + errorMsg + "\n" + errorMsgLong);

		return false;

	}

	return true;

}



function other_option() {

	str_tour = document.frm_booking.sel_tourcode.value;

	if (str_tour == "other") {

		document.frm_booking.txt_othertourcode.disabled = false;

		document.frm_booking.txt_othertourcode.value = "";

		document.frm_booking.txt_othertourcode.focus();

	} else {

		document.frm_booking.txt_othertourcode.value = "Disabled";

		document.frm_booking.txt_othertourcode.disabled = true;

	}

} 



function Check_Booking_Form () {



	//Intialise variables

	var errorMsg = "";

	var errorMsgLong = "";



	//Check for a first name

	if (document.frm_booking.txt_firstname.value == ""){

		errorMsg += "\n\tFirst Name \t- Enter your First Name.";

	}

	

	//Check for a last name

	if (document.frm_booking.txt_lastname.value == ""){

		errorMsg += "\n\tLast Name \t- Enter your Last Name.";

	}

	

	//Check for date of birth (mm/dd/yyyy)

	if ((document.frm_booking.txt_dateofbirth.value == "") || (document.frm_booking.txt_dateofbirth.value.length < 10 )){

		errorMsg += "\n\tDate of Birth \t- Enter your Date of Birth (mm/dd/yyyy).";

	}



	if (document.frm_booking.txt_address.value == ""){

		errorMsg += "\n\tAddress \t\t- Enter your Address.";

	}



	if (document.frm_booking.txt_city.value == ""){

		errorMsg += "\n\tCity \t\t- Enter your City.";

	}



	if (document.frm_booking.txt_country.value == ""){

		errorMsg += "\n\tCountry \t\t- Enter your Country.";

	}



	if (document.frm_booking.txt_phonenumber.value == ""){

		errorMsg += "\n\tPhone Number\t- Enter your Phone Number.";

	}



	if (document.frm_booking.txt_emailaddress.value.length >=0 && (document.frm_booking.txt_emailaddress.value.indexOf("@",0) == -1||document.frm_booking.txt_emailaddress.value.indexOf(".",0) == -1)) { 

		errorMsg +="\n\tE-mail \t\t- Enter your valid e-mail address.";

	}



	if (document.frm_booking.sel_tourcode.value == ""){

		errorMsg += "\n\tTour Code\t- Select the Tour Code.";

	}



	if (document.frm_booking.sel_tourcode.value == "other" && document.frm_booking.txt_othertourcode.value == ""){

		errorMsg += "\n\tTour Code\t- Other is slected. Please type its description.";

	}



	if (document.frm_booking.txt_numberofadults.value == ""){

		errorMsg += "\n\tNumber of Adults\t- Enter the number of adults.";

	}



	if (document.frm_booking.txt_numberofchildren.value == ""){

		errorMsg += "\n\tNumber of Children\t- Enter the number of children.";

	}



	if (document.frm_booking.txt_hotelcategories.value == ""){

		errorMsg += "\n\tHotel Categories\t- Enter the hotel categories.";

	}



	if (document.frm_booking.txt_numberofrooms.value == ""){

		errorMsg += "\n\tNumber of Rooms\t- Enter the number of required room(s).";

	}



	if (document.frm_booking.chk_single.checked == false && document.frm_booking.chk_double.checked == false && document.frm_booking.chk_twin.checked == false && document.frm_booking.txt_otherroom.value == "" ){

		errorMsg += "\n\tRoom Type\t- Select the room type(s).";		

	}

	

	if (document.frm_booking.chk_englishspeaking.checked == false && document.frm_booking.chk_japanesespeaking.checked == false && document.frm_booking.chk_frenchspeaking.checked == false && document.frm_booking.chk_spanishspeaking.checked == false && document.frm_booking.txt_otherspeaking.value == "" ){

		errorMsg += "\n\tGuides\t\t- Select the guide(s).";		

	}



	//If there is aproblem with the form then display an error

	if ((errorMsg != "") || (errorMsgLong != "")){

		msg = "___________________________________________________________________\n\n";

		msg += "Please correct the problem(s) and re-submit the form.\n";

		msg += "___________________________________________________________________\n\n";

		msg += "The following field(s) need to be corrected: \n";

		

		errorMsg += alert(msg + errorMsg + "\n" + errorMsgLong);

		return false;

	}

	return true;

}

-->