
function validate()
{
if(document.frmcustomer.tourname.value=="")
{
alert("Please Select Tour Name");
document.frmcustomer.tourname.focus();
return false;
}
if(document.frmcustomer.txtname.value=="")
{
alert("Please Select Your Name");
document.frmcustomer.txtname.focus();
return false;
}
if(document.frmcustomer.txtemail.value=="")
{
alert("Please Select Your  Email AddRess");
document.frmcustomer.txtemail.focus();
return false;
}
strEmail = document.frmcustomer.txtemail.value;

if (strEmail!=="")
	{
	if(strEmail.indexOf("@") < 0 || strEmail.indexOf(".") < 0 || strEmail.charAt(document.frmcustomer.txtemail.value.length - 1) == "." || strEmail.charAt(0) == "." || strEmail.indexOf("@.") >= 0)
	{
		alert("Your Email address does not appear valid");
		document.frmcustomer.txtemail.focus();
		return false;
	}
	
	if (document.frmcustomer.txtemail.length < 5) 
	{
		alert("Your Email address does not appear valid.Please enter more than 5 letters ");
		document.frmcustomer.txtemail.focus();
		return false;
	}

	
	if (document.frmcustomer.txtemail.value.charAt(0) == "@") 
	{
		alert("Your Email address does not appear valid");
		document.frmcustomer.txtemail.focus();
		return false;
	}

	
	if (document.frmcustomer.txtemail.value.charAt(document.frmcustomer.txtemail.value.length - 1) == "@") 
	{
		alert("Your Email address does not appear valid");
		document.frmcustomer.txtemail.focus();
		return false;
	}
	}

	
if(document.frmcustomer.txtcountry.value=="")
{
alert("Please Enter Country Name");
document.frmcustomer.txtcountry.focus();
return false;
}
if(document.frmcustomer.txtadult.value=="")
{
alert("Please Enter No. of Adults");
document.frmcustomer.txtadult.focus();
return false;
}

if(document.frmcustomer.txtdatearrival.value=="")
{
alert("Please Enter Date of Tour");
document.frmcustomer.txtdatearrival.focus();
return false;
}
}


