
//<![CDATA[
function WebForm_OnSubmit() 
{
	var gen=document.form.selgender.value;
	var name=document.form.txtname.value;
	var username=document.form.txtusername.value;
	var pass=document.form.txtpass.value;
	var confpass=document.form.txtconfpass.value;
	var email=document.form.txtemail.value;
	var country=document.form.selcountry.value;
	var month=document.form.selmonth.value;
	var day=document.form.seldate.value;
	var year=document.form.selyear.value;
	
	if(name=="")
	{
		alert("Pleaes fill your name");
		document.form.txtname.focus();
		return false;
	}
	if(username=="")
	{
		alert("Pleaes fill your user name");
		document.form.txtusername.focus();
		return false;
	}
	if(pass=="")
	{
		alert("Passowrd can not be blank");
		document.form.txtpass.focus();return false;
	}
	if(confpass=="")
	{
		alert("Confirm Passowrd can not be blank");
		document.form.txtconfpass.focus();return false;
	}
	if(pass!=confpass)
	{
		alert("Password and Confirm Passowrd must be same");
		document.form.txtconfpass.focus();return false;
	}
	
	if(email=="")
	{
		alert("Email ID can not be blank");
		document.form.txtemail.focus();return false;
	}
	
	 if(email.indexOf("@")==-1)
	 {
		alert("@ should be required");
		document.form.txtemail.focus();
		return false;
	 }
	
    var emailFilter=/^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if (!(emailFilter.test(email)))
	{ 
		alert("Please enter a valid email address.\n");
		document.form.txtemail.focus();
		return false;
	}
	
	
	
	if(country=="")
	{
		alert("Country can not be blank");
		document.form.selcountry.focus();return false;
	}
	if(month=="")
	{
		alert("Month can not be blank");
		document.form.selcountry.focus();return false;
	}
	if(day=="")
	{
		alert("Date can not be blank");
		document.form.selcountry.focus();return false;
	}
	if(year=="")
	{
		alert("Year can not be blank");
		document.form.selcountry.focus();return false;
	}


return true;


}
//]]>
