function valFoxSelectSearch(form) {
  numPax = new FormField(form.numPax);
  agePax1 = new FormField(form.agePax1);
  agePax2 = new FormField(form.agePax2);
  agePax3 = new FormField(form.agePax3);
  agePax4 = new FormField(form.agePax4);
  if(numPax.fieldValue == 1){
    if(!agePax1.valNum("Please select the age of passenger #1.")) return false;
  }
  if(numPax.fieldValue == 2){
    if(!agePax1.valNum("Please select the age of passenger #1.")) return false;
	if(!agePax2.valNum("Please select the age of passenger #2.")) return false;
  }
  if(numPax.fieldValue == 3){
    if(!agePax1.valNum("Please select the age of passenger #1.")) return false;
	if(!agePax2.valNum("Please select the age of passenger #2.")) return false;
	if(!agePax3.valNum("Please select the age of passenger #3.")) return false;
  }
  if(numPax.fieldValue == 4){
    if(!agePax1.valNum("Please select the age of passenger #1.")) return false;
	if(!agePax2.valNum("Please select the age of passenger #2.")) return false;
	if(!agePax3.valNum("Please select the age of passenger #3.")) return false;
	if(!agePax4.valNum("Please select the age of passenger #4.")) return false;
  }
  numPax = null;
  agePax1 = null;
  agePax2 = null;
  agePax3 = null;
  agePax4 = null;
  return true;
}


function changeAges(numPax){
  if(numPax == 1){
    Page.agePaxBox1.showBlock();
    Page.agePaxBox2.collapse();
    Page.agePaxBox3.collapse();
    Page.agePaxBox4.collapse();
  }
  if(numPax == 2){
    Page.agePaxBox1.showBlock();
    Page.agePaxBox2.showBlock();
    Page.agePaxBox3.collapse();
    Page.agePaxBox4.collapse();
  }
  if(numPax == 3){
    Page.agePaxBox1.showBlock();
    Page.agePaxBox2.showBlock();
    Page.agePaxBox3.showBlock();
    Page.agePaxBox4.collapse();
  }
  if(numPax == 4){
    Page.agePaxBox1.showBlock();
    Page.agePaxBox2.showBlock();
    Page.agePaxBox3.showBlock();
    Page.agePaxBox4.showBlock();
  }
}


function valFoxSelectCheckout(i) {
	var tripName = new FormField(document.getElementById("tripName"));
	if(!tripName.valNotEmpty("Please enter a valid trip name.")) return false;
	if(!tripName.valMaxLength(125,"The trip name you entered is longer than the 125 characters allowed.")) return false;

	var Email = new FormField(document.getElementById("email"));
	if(!Email.valEmail("Please enter a valid email address.")) return false;
	if(!Email.valMaxLength(80,"The email address you entered is longer than the 80 characters allowed")) return false;

	if(!valName(i)) return false;
	if(!valUSPhone(i)) return false;
	if(!valCard(i)) return false;
	if(!valBillAddress(i)) return false;
	if(document.getElementById("shipAddressLink").checked == true){
		if(!valShipAddress(i)) return false;
	}
	if(!valAgree()) return false;
    return true;
}