/*commnet*/

function check_comment()
{
	 cname=document.frm.cname.value;
  comment=document.frm.comment.value;
  if(cname=="")
  {
	alert("Enter Name");
	document.frm.cname.focus();
    return false;
  }
  
   if(document.frm.email.value=="")
   {
     alert("Enter Email");
     return false;
   }
   
   email=document.frm.email.value;
   
   if (email!= "")
    {

            var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
            if (filter.test(email))
            {

                //return true;

            }

            else
            {
        		alert("Please input a valid email address");
        		return false;
            }
   }
   
  if(comment=="")
  {
    alert("Enter your Comment");
	document.frm.comment.focus();
    return false;
  }
  
  if(document.frm.security.value=="")
  {
    alert("Enter Security code");
	document.frm.security.focus();
    return false;
  }

}

/*booking*/

function check_booking_dates()
{
  
  arrival_date=document.booking_dates.arrival_date.value;
  departure_date=document.booking_dates.departure_date.value;
  
  
  
  if(arrival_date=="")
  {
    alert("Arrival Date is Compulsory");
    return false;
  }

if(departure_date=="")
  {
   alert("Departure Date is Compulsory");
   return false;
  }



}


function check_registration_form()
{
  email=document.registration_form.email.value;
  first_name=document.registration_form.first_name.value;
  last_name=document.registration_form.last_name.value;
  street=document.registration_form.street.value;
  city=document.registration_form.city.value;
  zipcode=document.registration_form.zipcode.value;
  country=document.registration_form.country.selectedIndex;
  telephone=document.registration_form.telephone.value;
  describe_pets=document.registration_form.describe_pets.value;
  

  if(first_name=="")
  {
    alert("Please enter your first name !!");
    return false;
  }
  
  if(last_name=="")
  {
    alert("Please enter your last name !!");
    return false;
  }
  if(street=="")
  {
    alert("Please enter your street !!");
    return false;
  }
  
  if(city=="")
  {
    alert("Please enter your city !!");
    return false;
  }
  
  if(zipcode=="")
  {
    alert("Please enter your postcode !!");
    return false;
  }
  
  if(country==0)
  {
    alert("Please select your country !!");
    return false;
  }
  
  if(telephone=="")
  {
    alert("Please enter your phone number !!");
    return false;
  }
  
  if(email=="")
  {
    alert("Please enter your email address !!");
    return false;
  }

  if (email != "")
    {

            var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
            if (filter.test(email))
            {

                //return true;

            }

            else
            {
        		alert("Please input a valid email address!");
        		return false;
            }
   }
   
   if(document.registration_form.pets.checked==true)
   {
     if(describe_pets=="")
     {
     alert("Please describe your pets");
     return false;
    }
  }
  
  if(document.registration_form.tc.checked==false)
  {
   alert ("Please check the terms and conditions");
     return false;
  }
  if(document.registration_form.tc1.checked==false)
  {
   alert ("Please check the 2nd terms and conditions");
     return false;
  }


}


function check_balance_form()
{
  regid=document.balance_form.regid.value;
  amount=document.balance_form.amount.value;
  

  if(regid=="")
  {
    alert("Please enter your registration id sent to you by email");
    return false;
  }
  
    if(amount=="")
  {
    alert("Please enter the amount");
    return false;
  }
  
  
	
}



function show_descr()
{
  if(document.registration_form.pets.checked==true)
   document.getElementById('ds_pet').style.visibility ='visible';
  else
   document.getElementById('ds_pet').style.visibility ='hidden';
   
    /*if(document.registration_form.pets.checked==true)
   document.getElementById('ds_pet').style.display ='block';
  else
   document.getElementById('ds_pet').style.display ='none';*/
}



/*end*/




