function check_user()
{
		  var my_car=document.form1.firstname.value;
		  var fn = my_car.replace(/^\s+|\s+$/, '');
		  if(fn=='')
		  {
			alert('Please Enter First Name !');
			document.form1.firstname.focus();
			return false;
		  }	
		  var my_car=document.form1.lastname.value;
		  var fn = my_car.replace(/^\s+|\s+$/, '');
		  if(fn=='')
		  {
			alert('Please Enter Last Name !');
			document.form1.lastname.focus();
			return false;
		  }	
		   if(document.form1.pass_year.value=='')
		  {
			alert('Select Year of Passing!');
			document.form1.pass_year.focus();
			return false;
		  }	
		   if(document.form1.dob_day.value=='')
		  {
			alert('Select Day of Birth!');
			document.form1.dob_day.focus();
			return false;
		  }	
		  if(document.form1.dob_month.value=='')
		  {
			alert('Select Month of Birth!');
			document.form1.dob_month.focus();
			return false;
		  }	
		  if(document.form1.dob_year.value=='')
		  {
			alert('Select Year of Birth!');
			document.form1.dob_year.focus();
			return false;
		  }	
		  var my_car=document.form1.phone_no.value;
		  var fn = my_car.replace(/^\s+|\s+$/, '');
		  if(fn=="")
		 {
				alert("Please Enter Phone Number !");
				document.form1.phone_no.focus();
				return false;
			}
			if(!is_number(document.form1.phone_no.value))
			{
				alert('Please Enter Numeric Phone Number !');
				document.form1.phone_no.value=="";
				document.form1.phone_no.focus();
				//document.form1.txtCustZip.select();
				return false;
			}
			if(document.form1.alter_email.value=="")
			{
				alert("Please Enter Alternate Email Id(Other than @dusu.in) !");
				document.form1.alter_email.focus();
				return false;
			}
			if(!is_email(document.form1.alter_email.value))
			{
				alert('Please Enter the Correct Alternate Email Id(Other than @dusu.in) !');
				document.form1.alter_email.focus();
				return false;
			}
		if(document.form1.country.value=="India")
		{
			var my_car=document.form1.state.value;
		  	var fn = my_car.replace(/^\s+|\s+$/, '');
	  		if(fn=='')
	  		{
				alert('Please Enter State Name !');
				document.form1.state.focus();
				return false;
	  		}	
			var my_car=document.form1.userid.value;
		  	var fn = my_car.replace(/^\s+|\s+$/, '');
	  		if(fn=='')
	  		{
				alert('Please Enter Desired Login Name !');
				document.form1.userid.focus();
				return false;
	  		}	
	  		var my_car=document.form1.password.value;
	  		var fn = my_car.replace(/^\s+|\s+$/, '');
	 		if(fn=='')
	 		{
				alert('Please Enter Password(Blank Space is not allowed) !');
				document.form1.password.focus();
				return false;
	 			}	
			if(parseInt(document.form1.password.value.length)<6)
			 {
      			alert("Password length must be 6 or greater than 6 characters.");
	  			document.form1.password.focus();

	 			return false;
    		 }
	 		var my_car=document.form1.chk_password.value;
	  		var fn = my_car.replace(/^\s+|\s+$/, '');
	 		if(fn=='')
			{
				alert('Please Enter Conformation  Password !');
				document.form1.chk_password.focus();
				return false;
			 }	
	  		var pass=document.form1.password.value;
			var repass=document.form1.chk_password.value;
			if(pass!=repass)
			{	
			alert("Password not match reenter your password");
			document.form1.password.value="";
			document.form1.chk_password.value="";
			document.form1.password.focus();
			return false;	
			}
			var my_car=document.form1.captcha_input.value;
  			var fn = my_car.replace(/^\s+|\s+$/, '');
  			if(fn=='')
 			{
				alert('Please Enter Verification Code !');
				document.form1.captcha_input.focus();
				return false;
 			 }
		}
		if(document.form1.country.value!="India")
		{
			var my_car=document.form1.state.value;
		  	var fn = my_car.replace(/^\s+|\s+$/, '');
	  		if(fn=='')
	  		{
				alert('Please Enter State Name !');
				document.form1.state.focus();
				return false;
	  		}	
	  		var my_car=document.form1.password.value;
	  		var fn = my_car.replace(/^\s+|\s+$/, '');
	 		if(fn=='')
	 		{
				alert('Please Enter Password(Blank Space is not allowed) !');
				document.form1.password.focus();
				return false;
	 			}	
			if(parseInt(document.form1.password.value.length)<6)
			 {
      			alert("Password length must be 6 or greater than 6 characters.");
	  			document.form1.password.focus();

	 			return false;
    		 }
	 		var my_car=document.form1.chk_password.value;
	  		var fn = my_car.replace(/^\s+|\s+$/, '');
	 		if(fn=='')
			{
				alert('Please Enter Conformation  Password !');
				document.form1.chk_password.focus();
				return false;
			 }	
	  		var pass=document.form1.password.value;
			var repass=document.form1.chk_password.value;
			if(pass!=repass)
			{	
			alert("Password not match reenter your password");
			document.form1.password.value="";
			document.form1.chk_password.value="";
			document.form1.password.focus();
			return false;	
			}
			var my_car=document.form1.captcha_input.value;
  		var fn = my_car.replace(/^\s+|\s+$/, '');
  	if(fn=='')
 	 {
	alert('Please Enter Verification Code !');
	document.form1.captcha_input.focus();
	return false;
  }
		}
		
}//Close main breces

function is_email(email)
	{
		if(!email.match(/^[A-Za-z0-9\._\-+]+@[A-Za-z0-9_\-+]+(\.[A-Za-z0-9_\-+]+)+$/))
			return false;
		return true;
	}
// End of is_email Function

//  this function checks the given number is signed/unsigned number
//  and return true or false accordingly.
	function is_number(number)
	{
		if(!number.match(/^[\-\+0-9e1-9]+$/))
			return false;
		return true;
	}