﻿// JScript File

function validate_required(field,alerttxt)
{
with (field)
  {
  if (value==null||value=="")
    {
    alert(alerttxt);return false;
    }
  else
    {
    return true;
    }
  }
}

function validate_form(thisform)
{
with (thisform)
  {
  if (validate_required(name,"* Please Enter your name!")==false)
  {EmailFrom.focus();return false;}
  }
  with (thisform)
  {
  if (validate_required(country,"* Please Enter your country name!")==false)
  {EmailFrom.focus();return false;}
  }
  
  with (thisform)
  {
  if (validate_required(date,"* Please Enter the Date!")==false)
  {EmailFrom.focus();return false;}
  }

  with (thisform)
  {
  if (validate_required(nights,"* Please select no of nights!")==false)
  {EmailFrom.focus();return false;}
  }
  
  
   with (thisform)
  {
  if (validate_required(contactnumber,"*Please Enter Your Contact number!")==false)
  {EmailFrom.focus();return false;}
  }
  
     
     
     
     
      with (thisform)
  {
  if (validate_required(NoOfAdults,"*Please select no of Adults!")==false)
  {EmailFrom.focus();return false;}
  }
     
     
  
   with (thisform)
  {
  if (validate_required(NoOfChildren,"*Please select no of child!")==false)
  {EmailFrom.focus();return false;}
  }
  
  
  
   with (thisform)
  {
  if (validate_required(EmailFrom,"*Please Enter Your Email Id!")==false)
  {EmailFrom.focus();return false;}
  }

  
}
