<!--
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;
}

}

	function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}
		var reEmail=/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/;
		if(!reEmail.test(str)) 
		{
		alert("Invalid E-mail ID")
			return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.frmNewsletter.email
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }
//--> 