
function check()
{
   if(form1.name.value=="")
  {
   alert("please enter the your name");
   form1.name.focus();
   return false;
   }  
   
    if(form1.email.value=="")
	{
	  alert("Please enter email id");
	  form1.email.focus();
	  return false;
	}else
	{
		 var emailStr=form1.email.value;
		 // checks if the e-mail address is valid
		  var emailPat = /^(\".*\"|[A-Za-z]\w*|[A-Za-z]\w*(\.?\w*))@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
		   var matchArray = emailStr.match(emailPat);
		   if (matchArray == null)
		{
		      alert("Your email address seems incorrect.  Please try again (check the '@' and '.'s in the email address)");
			  form1.email.focus();
               return false;   
		     }				
    }
	
	  if(form1.phone_no.value=="")
  {
   alert("please enter your phone number");
   form1.phone_no.focus();
   return false;
   } 
    
    if(form1.adults.value=="")
  {
   alert("please enter number of Adults");
   form1.adults.focus();
   return false;
   }  
    var choice=false;
	          for (counter = 0; counter < form1.bed_rooms.length; counter++)
			  {
				  if (form1.bed_rooms[counter].checked)
				  choice=true;
			  }
			  if (!choice)
			  {
				alert("please select a button for no. of bedrooms required")  
				return false;
			  }
  
    if(form1.arrival.value=="")
  {
   alert("please enter the arrival date");
   form1.arrival.focus();
   return false;
   }  
       
    if(form1.departure.value=="")
  {
   alert("please enter the departure date");
   form1.departure.focus();
   return false;
   }  
  
     
if(!document.getElementById("verify").value){
alert('Please enter the verification code given below');
document.getElementById("verify").focus();
return false;
}
if(document.getElementById("verify").value!=document.getElementById("vp").value){
alert('Verification code does not match');
document.getElementById("verify").value='';
document.getElementById("verify").focus();
return false;
}	

if(document.form1.checkbox.checked==false)
{
	alert("please choose the checkbox to proceed");
	return false;
}
}

function check_form()
{
	if(enq.name.value=="")
					{
					alert("Your Name is a compulsory field");
					enq.name.focus();
					return false;
					}
						
				 if(enq.email.value=="")
	{
	  alert("Please enter email id");
	  enq.email.focus();
	  return false;
	}else
	{
		 var emailStr=enq.email.value;
		 // checks if the e-mail address is valid
		  var emailPat = /^(\".*\"|[A-Za-z]\w*|[A-Za-z]\w*(\.?\w*))@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
		   var matchArray = emailStr.match(emailPat);
		   if (matchArray == null)
		{
		      alert("Your email address seems incorrect.  Please try again (check the '@' and '.'s in the email address)");
			  enq.email.focus();
               return false;   
		     }				
    }
	
				
				if(enq.phone_number.value=="")
					{
					alert("Phone is a compulsory field");
					enq.phone_number.focus();
					return false;
					}
			
				if(enq.arrival_date.value=="")
					{
					alert("Arrival Date is a compulsory field");
					enq.arrival_date.focus();
					return false;
					}
				
				if(enq.departure_date.value=="")
					{
					alert("Departure Date is a compulsory field");
					enq.departure_date.focus();
					return false;
					}
					
				if(enq.number_of_nights.value=="")
					{
					alert("Number of Nights is a compulsory field");
					enq.number_of_nights.focus();
					return false;
					}
				
				if(enq.no_of_adults.value=="")
					{
					alert("No of Adults is a compulsory field");
					enq.no_of_adults.focus();
					return false;
					}
	
	
if(!document.getElementById("verify").value){
alert('Please enter the verification code given below');
document.getElementById("verify").focus();
return false;
}
if(document.getElementById("verify").value!=document.getElementById("vp").value){
alert('Verification code does not match');
document.getElementById("verify").value='';
document.getElementById("verify").focus();
return false;
}	
}


function chk_tariff()
{
	 if(form_tariff.email.value=="")
	{
	  alert("Please enter email id");
	  form_tariff.email.focus();
	  return false;
	}else
	{
		 var emailStr=form_tariff.email.value;
		 // checks if the e-mail address is valid
		  var emailPat = /^(\".*\"|[A-Za-z]\w*|[A-Za-z]\w*(\.?\w*))@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
		   var matchArray = emailStr.match(emailPat);
		   if (matchArray == null)
		{
		      alert("Your email address seems incorrect.  Please try again (check the '@' and '.'s in the email address)");
			  form_tariff.email.focus();
               return false;   
		     }				
    }
	if(form_tariff.approximate_date.value=="")
					{
					alert("Approximate Dates is a compulsory field");
					form_tariff.approximate_date.focus();
					return false;
					}
				
				if(form_tariff.approximate_nights.value=="")
					{
					alert("Approximate Nights is a compulsory field");
					form_tariff.approximate_nights.focus();
					return false;
					}
					
					if(form_tariff.no_of_guests.value=="")
					{
					alert("Please enter the no. of guests");
					form_tariff.no_of_guests.focus();
					return false;
					}
	          var choice=false;
	          for (counter = 0; counter < form_tariff.bed_rooms.length; counter++)
			  {
				  if (form_tariff.bed_rooms[counter].checked)
				  choice=true;
			  }
			  if (!choice)
			  {
				alert("please select a button for no. of bedrooms required")  
				return false;
			  }
if(!document.getElementById("verify").value){
alert('Please enter the verification code given below');
document.getElementById("verify").focus();
return false;
}
if(document.getElementById("verify").value!=document.getElementById("vp").value){
alert('Verification code does not match');
document.getElementById("verify").value='';
document.getElementById("verify").focus();
return false;
}	

}
