function isNumberKey(evt) {

         var charCode = (evt.which) ? evt.which : event.keyCode
		//alert(charCode);
         if (charCode > 63 && charCode < 92 )
      	 {              
		 return true;
	 }
	 else if (charCode > 96 && charCode < 123 )
      	 {
		 return true;
	 }
	 else
	 {
         alert("should be alphabet");
	  	return false;
	 }
   }
   function validate() {
	   
	   if(document.form1.email.value=="") {
	alert("Enter Email ID");
	document.form1.email.focus();
	return false;
  }
  ml = document.form1.email.value;
		pos1 = ml.indexOf("@")
		pos = ml.indexOf(" ")
		pos2 = (pos1+1)
		server = ml.substring(pos2);
		server_pos = server.lastIndexOf(".")
		reqtype = server.substring(server_pos+1)
		type_end = reqtype.substring(reqtype.length-1)
		
		if(ml.length<8) {
			document.form1.email.focus();
			document.form1.email.select();
			alert("Invalid Email Address! Please try again.");
			return false;  
	  }
		 if(ml.indexOf("@")==-1) {
			document.form1.email.focus();
			document.form1.email.select();
			alert("A valid email Address must contain '@' sign");
			return false;  
		}
		 if(pos1<1) {
			document.form1.email.focus();
			document.form1.email.select();
			alert("Your email address cannot start with the '@' sign");
			return false;  
		}  
		if(ml.indexOf(".")==-1) {
			document.form1.email.focus();
			document.form1.email.select();
			alert("Your email Address must contain '.' sign");
			return false;  
		}
		if(pos!=-1) {
			document.form1.email.focus();
			document.form1.email.select();
			alert("Tour emailid Address cannot contain spaces");
			return false;  
		}
		if(server.indexOf("@")!=-1){
			document.form1.email.focus();
			document.form1.email.select();
			alert("A valid email must contain only one '@' sign and a dot");
			return false;  
		} 
		if(server.indexOf(".")==0){
			document.form1.email.focus();
			document.form1.email.select();
			alert("Some text is required between '@' and '.' sign");
			return false;  
		} 
		if(reqtype==""){  
			document.form1.email.focus();
			document.form1.email.select();
			alert("Your Email should end with a character(like .com,.net,.org)");
			return false;  
		}
		if(type_end.toUpperCase()<"A" || type_end.toUpperCase()>"Z"){
			document.form1.email.focus();
			document.form1.email.select();
			alert("Your Email should not end with a number or a symbol");
			return false;  
		}
		
if(document.form1.fname.value=="") {
	alert("Enter First Name");
	document.form1.fname.focus();
	return false;
}
  usename = document.form1.username.value;
 if(usename.length < 6){
	 alert("Username must not be less than 6 Characters.");
	document.form1.username.focus();
	return false;
 }
if(document.form1.lname.value=="") {
	alert("Enter Last Name");
	document.form1.lname.focus();
	return false;
}

		
	if(document.form1.password.value==""){
	alert("Enter Password");
	document.form1.password.focus();
	return false;
}	
if(document.form1.phone.value=="")
{
	alert("Enter Phone No");
	document.form1.phone.focus();
	return false;
}
  var phne = form1.phone.value;
  if(phne.length < 10){
	  alert("Enter A valid Phone Nember!");
	document.form1.phone.focus();
	return false;
	  
  }
if(document.form1.username.value=="") {
	alert("Enter your username!");
	document.form1.username.focus();
	return false;
}
		
   }