// JavaScript Document
function mailcheck()
{
	var x = document.signup.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x))
	{
		alert('Incorrect email address');
		document.signup.email.focus();
		return false;
	}	
}
function van1()
		{
			if(document.signup.dob1.value="dd")
				document.signup.dob1.value="";
		}	
		function van2()
		{
		if(document.signup.dob2.value="mm")
		document.signup.dob2.value="";
		}	
		function van3()
		{
			if(document.signup.dob3.value="yyyy")
			document.signup.dob3.value="";
		}	
function validation()
{

	if(document.signup.title.value=="")
	{
	  alert("Please select a title!");
	  document.signup.title.focus();
	  return false;   
	}
	if(document.signup.firstname.value=="")
	{
	  alert("First Name Field is empty!");
	  document.signup.firstname.focus();
	  return false;   
	}
	if(document.signup.surname.value=="")
	{
	  alert(" Last name  Field is empty!");
	   document.signup.surname.focus();
	   return false;   
	}
	if((document.signup.dob1.value=="dd") || (document.signup.dob1.value==""))
	{
	  alert("Date of birth cannot be empty!");
	   document.signup.dob1.focus();
	   return false;   
	}
	if((document.signup.dob2.value=="mm") || (document.signup.dob2.value==""))
	{
	  alert("Date of birth cannot be empty!");
	   document.signup.dob2.focus();
	   return false;   
	} 
	if((document.signup.dob3.value=="yyyy") || (document.signup.dob3.value==""))
	{
	  alert("Date of birth cannot be empty!");
	   document.signup.dob3.focus();
	   return false;   
	}
	if(document.signup.Gender.value=="")
	{
	  alert("Please select a title!");
	  document.signup.Gender.focus();
	  return false;   
	}
	if(document.signup.country.value=="None")
	{
	  alert("Country  Field is empty!");
	   document.signup.country.focus();
	   return false;   
	}
	if(document.signup.street.value=="")
	{
	  alert("Street cannot be empty!");
	   document.signup.street.focus();
	   return false;   
	} 
	if(document.signup.city.value=="")
	{
	  alert("City cannot be empty!");
	   document.signup.city.focus();
	   return false;   
	} 
	if(document.signup.addr1.value=="")
	{
	  alert("Address cannot be empty!");
	   document.signup.addr1.focus();
	   return false;   
	} 
		
	if(document.signup.zip.value=="")
	{
	  alert("ZIP code Field is empty!");
	   document.signup.zip.focus();
	   return false;   
	} 
	
	
	if(document.signup.mobileno.value=="")
	{
	  alert("Mobile Number  Field is empty!");
	   document.signup.mobileno.focus();
	   return false;   
	} 
	
	if(document.signup.emailid.value=="")
	{
	  alert("Email cannot be empty!");
	   document.signup.emailid.focus();
	   return false;   
	} 
		
	/*if(document.signup.urid.value=="")
	{
	  alert("User Name  Field is empty!");
	   document.signup.urid.focus();
	   return false;   
	} */
	if(document.signup.cpas.value=="")
	{ 
	alert("Please Enter password"); 
	 document.signup.cpas.focus();
	return false; 
	} 
	if(document.signup.pas.value=="")
	{ 
	alert("Please Enter confirm password"); 
	 document.signup.pas.focus();
	return false; 
	}
	if(document.signup.cpas.value!=document.signup.pas.value)
	{ 
	alert("Password  does not match"); 
	 document.signup.cpas.focus();
	return false; 
	}
	if(document.signup.memorable.value=="")
	{ 
	alert("Please Enter a memorable word"); 
	 document.signup.memorable.focus();
	return false; 
	}
	if(document.signup.hint.value=="")
	{ 
	alert("Please Enter a hint of your answer"); 
	 document.signup.hint.focus();
	return false;
	}
	if((document.signup.hint.value==document.signup.memorable.value) || (document.signup.hint.value==document.signup.password.value))
	{ 
	alert("Please Enter a different word from memorable word/password"); 
	 document.signup.hint.focus();
	return false;
	}
	if(document.signup.about.value=="")
	{
	  alert("about us  Field is Select!");
	   document.signup.about.focus();
	   return false;   
	}
	if(document.signup.agree.checked=="")
	{ 
	alert("Please Check tick this box."); 
	 document.signup.agree.focus();
	return false;
	}
return mailcheck();
return true;
}
