function validate()
{
	var name = document.form1.name.value ;
	var DOB = document.form1.DOB.value ;
	var Father = document.form1.Father.value ;	
	var occupation = document.form1.occupation.value ;	
	var address	= document.form1.address.value;
	var contact	= document.form1.contact.value;
	var mobile	= document.form1.mobile.value;
	var email	= document.form1.email.value;
	var qualification	= document.form1.qualification.value;
	var year= document.form1.year.value;
	var area= document.form1.area.value;
	var software	= document.form1.software.value;
	var experience = document.form1.experience.value;
	var company = document.form1.company.value;
	var designation = document.form1.designation.value;
	var comments=document.form1.comments.value;
	var mailid = form1.email.value;
    var positionat = form1.email.value.indexOf("@");
    var positiondot = form1.email.value.indexOf(".");
	if (name == "" )
	{
		alert("Please Enter the Name");
		form1.name.focus();
		return false;
	}
	else if (DOB == "" )
	{
		alert("Please Enter the Date of Birth");
		form1.DOB.focus();
		return false;
	}
	else if (Father == "" )
	{
		alert("Please Enter the Father Name");
		form1.Father.focus();
		return false;
	}
	else if (occupation == "" )
	{
		alert("Please Enter the occupation");
		form1.occupation.focus();
		return false;
	}
	else if (address == "" )
	{
		alert("Please Enter the Address");
		form1.address.focus();
		return false;
	}
	else if (contact == "" )
	{
		alert("Please Enter the Contact Number");
		form1.contact.focus();
		return false;
	}
	else if (mobile == "" )
	{
		alert("Please Enter the Mobile Number");
		form1.mobile.focus();
		return false;
	}
	else if (email == "" )
	{
		alert("Please enter the Email Id");
		form1.email.focus();
		return false;
	}
	else if (qualification == "" )
	{
		alert("Please Enter the qualification");
		form1.qualification.focus();
		return false;
	}	
	else if (year == "" )
	{
		alert("Please Enter the year");
		form1.year.focus();
		return false;
	}	
	else if (area == "" )
	{
		alert("Please Enter the area");
		form1.area.focus();
		return false;
	}	
	else if (software == "" )
	{
		alert("Please Enter the software Known");
		form1.software.focus();
		return false;
	}	
	else if (experience == "" )
	{
		alert("Please Enter the experience");
		form1.experience.focus();
		return false;
	}	
	else if (company == "" )
	{
		alert("Please Enter the company Name");
		form1.experience.focus();
		return false;
	}	
	else if (designation == "" )
	{
		alert("Please Enter the designation");
		form1.experience.focus();
		return false;
	}	
	else if (comments == "" )
	{
		alert("Please Enter the comments");
		form1.comments.focus();
		return false;
	}	
	
	 else if(mailid.indexOf("@") == -1 || mailid.indexOf(".") == -1) 
   	{
   		alert("Invalid! @ and . are not present in Email");
  		form1.email.focus();    		
		return false;
    }
    else if(mailid.indexOf("@") == "0" || mailid.indexOf(".") == "0")
    {
    	alert("Error! @ or . should not be in first position in Email");
    	form1.email.focus();		
		return false;
   	}
   else if((mailid.indexOf(".") == positionat +1)|| (mailid.indexOf("@") == positiondot +1))
   	{
   		alert("Invalid Email Pattern! @ and . are adjacent in Email");
   		form1.email.focus();
		return false;
    } 
    else if((mailid.indexOf("/") != -1 || mailid.indexOf("*") != -1)||
       (mailid.indexOf("#") != -1 || mailid.indexOf("$") != -1)||
       (mailid.indexOf("%") != -1 || mailid.indexOf("^") != -1)||
       (mailid.indexOf("+") != -1 || mailid.indexOf("=") != -1)||
       (mailid.indexOf("|") != -1)||
       (mailid.indexOf(",") != -1 || mailid.indexOf("?") != -1)||
       (mailid.indexOf("!") != -1 || mailid.indexOf(";") != -1)||
       (mailid.indexOf("'") != -1 || mailid.indexOf(":") != -1)||
       (mailid.indexOf("<") != -1 || mailid.indexOf(">") != -1)||
       (mailid.indexOf("{") != -1 || mailid.indexOf("}") != -1)||
       (mailid.indexOf("[") != -1 || mailid.indexOf("]") != -1)||
       (mailid.indexOf(" ") != -1)||
       (mailid.indexOf("~") != -1 || mailid.indexOf("`") != -1))
    {
      	alert("Special Characters are not allowed in Email");
      	form1.email.focus();	
		return false;
   	}
   	var count=0;
	for(var i=0; i < mailid.length; i++) 
	{
    	if(mailid.charAt(i) == "@")
       	{
       		count = count +1;
       		if(count > 1)
          	{
          		alert("@ occurs twice,Type in Only One Email Address");
          		form1.email.focus();			
				return false;
           		break;
           	}
         }
	}
}