<!--
function validatePax(loForm) {

var bValid = true;
var llAdu = 0;
var llChi = 0;
var llInf = 0;
var llTotalPax = 0;

//Validate pax
with(loForm)
{
	if (NumPaxAD[NumPaxAD.selectedIndex].value == "")
	{
		alert("Please select the number of Adults in your party");
		NumPaxAD.focus();
		return false;
	}
	if (NumPaxCH[NumPaxCH.selectedIndex].value == "")
	{
		alert("Please select the number of children in your party");
		NumPaxCH.focus();
		return false;
	}
	if (NumPaxIN[NumPaxIN.selectedIndex].value == "")
	{
		alert("Please select the number of infants in your party");
		NumPaxIN.focus();
		return false;
	}

	llAdu = Number(NumPaxAD[NumPaxAD.selectedIndex].value);
	llChi = eval(NumPaxCH[NumPaxCH.selectedIndex].value);
	llInf = eval(NumPaxIN[NumPaxIN.selectedIndex].value);
	
	llTotalPax = llAdu + llChi + llInf;
				
	if (llTotalPax > 8)
	{
		bValid = false;
		alert("You have chosen a party with " + llTotalPax + " members.\nParties of 9 or more must be booked by telephone.");
	}
	
	// next bit is to validate child ages entered
	var liChildNo;
		var lsChildMessage = "";
	
		if (bValid) {
			for (var li = 0; li < loForm.elements.length; li++) {
			
				if ((loForm.elements[li].type == 'text') && (loForm.elements[li].name.substring(0, 8) == "ChildAge")) { 
				
					liChildNo = loForm.elements[li].name.substring(8, 11) - 0;	

					if(document.getElementById("pax_span" + liChildNo )) {
						if (document.getElementById("pax_span" + liChildNo ).style.display == "inline") {
						
							if(lsChildMessage.length == 0) 
								loForm.elements[li].focus();

							if ((loForm.elements[li].value == "") ||  isNaN(loForm.elements[li].value)) {
								lsChildMessage += "Child " + liChildNo + " age is not valid!\n";
	
							} else if ((loForm.elements[li].value <  2) ||  (loForm.elements[li].value >  12)) {
								lsChildMessage += "Child " + liChildNo + " age must be between 2 and 12!\n";
							}
						
						} else {
							loForm.elements[li].value = "";

						}				
					}
				}
			}
        	}

		if (lsChildMessage != "") {
			bValid = false;
			alert (lsChildMessage);
		}
	
	
	return bValid;
}

}
//--> 
