<!--
function IsNumeric(sText)
{
	var ValidChars = "0123456789";
	var IsNumber=true;
	var Char;
	
	for (i = 0; i < sText.length && IsNumber == true; i++) 
	{ 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) 
		{
			IsNumber = false;
		}
	}
	return IsNumber;
}

function checkForm(prsval)
{
	if(document.bookingfrm.inname.value.length < 2)
	{
		alert("Please enter your first name");
		document.bookingfrm.inname.focus();
       	document.bookingfrm.inname.select();
		return false;
	}

	if(document.bookingfrm.insurname.value.length < 2)
	{
		alert("Please enter your surname");
		document.bookingfrm.insurname.focus();
       	document.bookingfrm.insurname.select();
		return false;
	}

	if(document.bookingfrm.incountry.value.length < 2)
	{
		alert("Please enter your country of residence");
		document.bookingfrm.incountry.focus();
		document.bookingfrm.incountry.select();       
		return false;
	}

	if(document.bookingfrm.intown.value.length < 2)
	{
		alert("Please enter your town of residence");
		document.bookingfrm.intown.focus();
       	document.bookingfrm.intown.select();
		return false;
	}

	if(document.bookingfrm.intel.value.length < 2)
	{
		alert("Please enter your telephone or mobile number");
		document.bookingfrm.intel.focus();
       	document.bookingfrm.intel.select();
		return false;
	}

   	var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;

	if(!document.bookingfrm.inemail01.value.match(re))
   	{
		alert("You have entered your email address incorrectly");
		document.bookingfrm.inemail01.focus();
		document.bookingfrm.inemail01.select();
		return false;
	}

	if(document.bookingfrm.inemail01.value != document.bookingfrm.inemail02.value)
   	{
		alert("Please make sure that you have retyped your email address correctly");
		document.bookingfrm.inemail02.focus();
		document.bookingfrm.inemail02.select();
		return false;
	}

	if(prsval == '1') //if "booking" radio is selected
	{	
		if(document.bookingfrm.inarrday.value == "None")
		{
			alert("Please select the Day of your Arrival");
			document.bookingfrm.inarrday.focus();       
			return false;
		}
	
		if(document.bookingfrm.inarrmnth.value == "None")
		{
			alert("Please select the Month of your Arrival");
			document.bookingfrm.inarrmnth.focus();       
			return false;
		}
	
		if(document.bookingfrm.inarryr.value == "None")
		{
			alert("Please select the Year of your Arrival");
			document.bookingfrm.inarryr.focus();       
			return false;
		}
	
		if(document.bookingfrm.indepday.value == "None")
		{
			alert("Please select the Day of your Departure");
			document.bookingfrm.indepday.focus();       
			return false;
		}
	
		if(document.bookingfrm.indepmnth.value == "None")
		{
			alert("Please select the Month of your Departure");
			document.bookingfrm.indepmnth.focus();       
			return false;
		}
	
		if(document.bookingfrm.indepyr.value == "None")
		{
			alert("Please select the Year of your Departure");
			document.bookingfrm.indepyr.focus();       
			return false;
		}
	
		if(!IsNumeric(document.bookingfrm.innights.value) || document.bookingfrm.innights.value.length < 1) 
		{ 
			alert("Please enter the total number of nights that you wish to stay");
			document.bookingfrm.innights.focus();
       	 	document.bookingfrm.innights.select();
			return false; 
		}
	
		if(!IsNumeric(document.bookingfrm.inrooms.value))
		{
			alert("Please only enter numeric values, else leave blank");
			document.bookingfrm.inrooms.focus();
       	 	document.bookingfrm.inrooms.select();
			return false;
		}
	
		if(!IsNumeric(document.bookingfrm.inadults.value) || document.bookingfrm.inadults.value.length < 1)
		{
			alert("Please enter the total number of adults that will be staying");
			document.bookingfrm.inadults.focus();
        	document.bookingfrm.inadults.select();
			return false;
		}
	
		if(!IsNumeric(document.bookingfrm.inteens.value))
		{
			alert("Please only enter numeric values, else leave blank");
			document.bookingfrm.inteens.focus();
        	document.bookingfrm.inteens.select();
			return false;
		}
	
		if(!IsNumeric(document.bookingfrm.inchildren.value))
		{
			alert("Please only enter numeric values, else leave blank");
			document.bookingfrm.inchildren.focus();
        	document.bookingfrm.inchildren.select();
			return false;
		}

		if(document.bookingfrm.incaptcha.value.length < 5)
		{
			alert("Please enter the complete security code");
			document.bookingfrm.incaptcha.focus();
        	document.bookingfrm.incaptcha.select();
			return false;
		}
		
		document.bookingfrm.insend.disabled = true;
							
		return true;
		
	}
	
	if(prsval == '2') //if "enquiry" radio is selected
	{	
		if(document.bookingfrm.inenquiry.value.length < 2)
		{
			alert("Please enter your enquiry for the establishment");
			document.bookingfrm.inenquiry.focus();
    	   	document.bookingfrm.inenquiry.select();
			return false;
		}
		
		if(document.bookingfrm.incaptcha.value.length < 5)
		{
			alert("Please enter the complete 5 number code");
			document.bookingfrm.incaptcha.focus();
        	document.bookingfrm.incaptcha.select();
			return false;
		}
							
		document.bookingfrm.insend.disabled = true;
		
		return true;		
		
	}

	//return true;	
}
//-->
