function check2()
{
 var f=document.form2;
 
 if(f.studentname.value==0){
 	alert ("Please enter the Students Name");
	f.studentname.focus();
	return false;
 }
 
  if(f.class1.value=="select"){
 	alert ("Please enter the class of the student");
	f.class1.focus();
	return false;
 }
  if(f.birthd.value=="0"){
 	alert ("Please enter the Birth Date of Student");
	f.birthd.focus();
	return false;
 }
  if(f.birthm.value=="0")
	{
 alert ("Please enter the Birth month of Student");
	f.birthm.focus();
	return false;
 }
  if(f.birthy.value=="0")
	{
 alert ("Please enter Birth year of Student");
	f.birthy.focus();
	return false;
 }
   if(f.yrs.value=="0")
	{
		alert("Please enter the Age of student");
		f.yrs.focus();
		return false;
	}
    
	if(f.studentemail.value == "" || f.studentemail.value == " ") {
		alert ("Please enter a valid E-mail address.\n" +"Example: name@gmail.com");
		f.studentemail.focus()
		f.studentemail.select()
		return false;
	} else if(f.studentemail.value.indexOf("@")<1 ||
    	f.studentemail.value.indexOf(".")==-1 ||
    	f.studentemail.value.indexOf(",")!=-1 ||
    	f.studentemail.value.indexOf(" ")!=-1 ||
    	f.studentemail.value.length<6)
  {
    alert("Please enter a valid E-mail address.\n" +
    "Example: name@gmail.com");
     f.studentemail.focus();
     return false;
  }
  if(f.fathername.value==0){
 	alert ("Please enter the Father's name");
	f.fathername.focus();
	return false;
 }
 
 if(f.mothername.value==0){
 	alert ("Please select Mother's Name");
	f.mothername.focus();
	return false;
 }  
 if(f.occupation.value==0){
 	alert ("Please select the Occupation");
	f.occupation.focus();
	return false;
 } 
 
 if(f.contactno.value == "") {
		alert ("Please enter your Contact number!");
		f.contactno.focus()
		f.contactno.select()
		return false;
	} else if(isNaN(f.contactno.value)) {
		alert ("Please enter only Digits!!!");
		f.contactno.focus()
		f.contactno.select()
		return false;
	}	 
  if(f.address.value==0){
 	alert ("Please enter the Address of Student");
	f.address.focus();
	return false;
 }
  
 if(f.email.value == "" || f.email.value == " ") {
		alert ("Please enter a valid E-mail address.\n" +"Example: name@gmail.com");
		f.email.focus()
		f.email.select()
		return false;
	} else if(f.email.value.indexOf("@")<1 ||
    	f.email.value.indexOf(".")==-1 ||
    	f.email.value.indexOf(",")!=-1 ||
    	f.email.value.indexOf(" ")!=-1 ||
    	f.email.value.length<6)
  {
    alert("Please enter a valid E-mail address.\n" +
    "Example: name@gmail.com");
     f.email.focus();
     return false;
 
   }
  return true;
}
// JavaScript Document// JavaScript Document
