<!--
function checkForm()
{
	error="";
	if (document.f1.firstname.value == ""){
		alert("Enter First Name");
		document.f1.firstname.focus();
		return false;
	}
	if (document.f1.lastname.value == ""){
		alert("Enter Last Name");
		document.f1.lastname.focus();
		return false;
	}
	if (document.f1.email.value == ""){
		alert("Enter Email ID");
		document.f1.email.focus();
		return false;
	}else if(!echeck(document.f1.email.value)){
		error += "Invalid Email";
		alert(error);
		document.f1.email.focus();
		return false;
	}
	
	/*if (document.f1.phone_1.value == ""){
		error += "Enter Phone Country Code";
		alert(error);
		document.f1.phone_1.focus();
		return false;
	}else if(isNotaNumber(document.f1.phone_1.value)){
		error += "Invalid Phone Country Code";
		alert(error);
		document.f1.phone_1.focus();
		return false;
	}
	
	if (document.f1.phone_2.value == ""){
		error += "Enter Phone Area Code";
		alert(error);
		document.f1.phone_2.focus();
		return false;
	}else if(isNotaNumber(document.f1.phone_2.value)){
		error += "Invalid Phone Area Code";
		alert(error);
		document.f1.phone_2.focus();
		return false;
	}
	
	if (document.f1.phone_3.value == ""){
		error += "Enter Phone No";
		alert(error);
		document.f1.phone_3.focus();
		return false;
	}else if(isNotaNumber(document.f1.phone_3.value)){
		error += "Invalid Phone No";
		alert(error);
		document.f1.phone_3.focus();
		return false;
	}*/
	
	
	if (document.f1.tour.value == ""){
		error += "Select the Tour";
		alert(error);
		document.f1.tour.focus();
		return false;
	}
	
	if (document.f1.tour_date.value == ""){
		error += "Select the Tour Date";
		alert(error);
		document.f1.tour_date.focus();
		return false;
	}
	
	/*if (document.f1.verification.value == ""){
		error += "Please enter the what is 2 plus 2";
		alert(error);
		document.f1.verification.focus();
		return false;
	}else if (document.f1.verification.value != "3"){
		error += "Please enter the what is 2 plus 2, in case you dont know it is 4";
		alert(error);
		document.f1.verification.focus();
		return false;
	}
	
	if (!document.f1.tos_1.checked){
		error += "Please agree to the Terms and Conditions";
		alert(error);
		document.f1.tos_1.focus();
		return false;
	}*/
	
	return true;

}
function isNotaNumber (inputString)
{
  return isNaN(inputString);
}
function onlyNumbers(inputString)
{
  var searchForNumbers = /\D+\_+\W+\s+\S+/;
  return (searchForNumbers.test(inputString)) ? false : true;
}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    return false
		 }

 		 return true					
	}

-->
