<!-- hide script from older browsers
function validateForm(mainform)
{

var x=document.forms["mainform"]["name"].value;
if (x==null || x=="")
  {
  alert("First name must be filled out");
  return false;
  }
  
  
var x=document.forms["mainform"]["phone"].value;

if (x==null || x=="")
  {
  alert("Please Enter Phone Number.");
  return false;
  }


if(x.length!=10)
  {
alert("Invalid phone number length! Please try again.")
      return false;
 }
var num = "0123456789";
for (var i=0; i < x.length; i++)
    {
         //put in temp variable each character, one at a time.
         temp = "" + x.substring(i, i+1);
    //check index of a phone character in the "valid" variable.
    // if temp contains a character which is not in "valid" variable,
    //then valid.indexOf(temp) will be -1, otherwise it may be 0.1.2.3.4.5.6.7.8 or 9

    if (num.indexOf(temp) == "-1")
      {
       alert("Invalid characters in your phone. Please try again.")
       return false;
      }
	}
	
	
var x=document.forms["mainform"]["city"].value;
if (x==null || x=="")
  {
  alert("Please fill the city name.");
  return false;
  }
  
  var x=document.forms["mainform"]["country"].value;
if(x==0)
 {
  alert("Please enter country name.");
  return false;
 }
 

var x=document.forms["mainform"]["email"].value;
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
  {
  alert("Not a valid e-mail address");
  return false;
  }
 
var x=document.forms["mainform"]["destination_city"].value;
if (x=="Select City" || x==null)
 {
  alert("Please choose destination city from the available city names.");
  return false;
 }
 
 var x=document.forms["mainform"]["date"].value;
if(x==null || x=="")
 {
  alert("Please Enter Date of Travel in the format dd/mm/yyyy.");
  return false;
 }
 
 var x=document.forms["mainform"]["duration"].value;
if(x==null || x=="")
 {
  alert("Please Enter Duration of Travel in numeric only");
  return false;
 }
 
 
 var x=document.forms["mainform"]["adults"].value;
if(x==0)
 {
  alert("Please Enter No of Adults");
  return false;
 }
/*
var x=document.forms["mainform"]["adults"].value;
if (x==null || x=="")
  {
  alert("Please Enter Number of Adults");
  return false;
  }
  
  var num = "0123456789";
for (var i=0; i < x.length; i++)
    {
         //put in temp variable each character, one at a time.
         temp = "" + x.substring(i, i+1);
    //check index of a phone character in the "valid" variable.
    // if temp contains a character which is not in "valid" variable,
    //then valid.indexOf(temp) will be -1, otherwise it may be 0.1.2.3.4.5.6.7.8 or 9

    if (num.indexOf(temp) == "-1")
      {
       alert("Invalid characters in Number of Adults Field. Please try again.")
       return false;
      }
	}

var x=document.forms["mainform"]["city"].value;
if (x==null || x=="")
  {
  alert("Please fill the city name.");
  return false;
  }
  
  var x=document.forms["mainform"]["country"].value;
if(x==0)
 {
  alert("Please enter country name.");
  return false;
 }
 

var x=document.forms["mainform"]["budget"].value;

if (x==null || x=="")
  {
  alert("Please Enter budget for your holiday package.");
  return false;
  }

var num = "0123456789";
for (var i=0; i < x.length; i++)
    {
         //put in temp variable each character, one at a time.
         temp = "" + x.substring(i, i+1);
    //check index of a phone character in the "valid" variable.
    // if temp contains a character which is not in "valid" variable,
    //then valid.indexOf(temp) will be -1, otherwise it may be 0.1.2.3.4.5.6.7.8 or 9

    if (num.indexOf(temp) == "-1")
      {
       alert("Invalid characters in your budget field. Please enter numeric only.")
       return false;
      }
	}

myOption = -1;
for (i=document.forms["mainform"]["nationality"].value.length-1; i > -1; i--) {
if (document.forms["mainform"]["nationality"].value[i].checked) {
myOption = i; i = -1;
}
}
if (myOption == -1) {
alert("You must select Nationality");
return false;
}
*/

}

