function isValidEmail($email){
    return preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i', $email);
	}
	
/*Function To Validate Numeric Field*/
function AcceptDigits(objtextbox)
{
var exp = /[^\d]/g;
objtextbox.value = objtextbox.value.replace(exp,'');
}

/*Function to check empty fields*/



	function validatestep1() 
		{ 
	    if(document.seeker_reg_form.FirstName.value=="")
			{
				window.alert('Enter Your Name!');
				document.seeker_reg_form.FirstName.focus();
				return false;
			}
			if(document.seeker_reg_form.email.value=="")
			{
				window.alert('Enter Your email id!');
				document.seeker_reg_form.email.focus();
				return false;
			}
			  if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.seeker_reg_form.email.value ))
			{
		
		if(document.seeker_reg_form.pass.value=="")
			{
				window.alert('Password cannot be left blank!');
				document.seeker_reg_form.pass.focus();
				return false;
			}
			if(document.seeker_reg_form.pass.value.length < "8")
			{
				window.alert('Password length should be minimum 8 character ');
				document.seeker_reg_form.pass.focus();
				return false;
			}
			
			if(document.seeker_reg_form.nationality.value=="")
			{
				window.alert('Enter nationality!');
				document.seeker_reg_form.nationality.focus();
				return false;
			}
			
				if(document.seeker_reg_form.day.value=="Day")
			{
				window.alert('Select Day in Date of Birth !');
				document.seeker_reg_form.day.focus();
				return false;
			}
			
			
			if(document.seeker_reg_form.month.value=="Month")
			{
			 window.alert('Select Month in Date of Birth!');
				document.seeker_reg_form.month.focus();
				return false;
			}	 
			 
			
			if(document.seeker_reg_form.year.value=="Year")
			{
				window.alert('Select Year in Date of Birth!');
				document.seeker_reg_form.year.focus();
				return false;
			}
            	
				if(document.seeker_reg_form.country.value=="")
			{
				window.alert('Enter country!');
				document.seeker_reg_form.country.focus();
				return false;
			}
				if(document.seeker_reg_form.city.value=="")
			{
				window.alert('Enter city!');
				document.seeker_reg_form.city.focus();
				return false;
			}
				if(document.seeker_reg_form.m_no.value=="")
			{
				window.alert('Enter Your Mobile Number !');
				document.seeker_reg_form.m_no.focus();
				return false;
			}
           	
			 
			
			
			if(document.seeker_reg_form.s_bio.value=="")
			{
				window.alert('Enter Short Bio !');
				document.seeker_reg_form.s_bio.focus();
				return false;
			}
				if(document.seeker_reg_form.totalexp_yy.value=="")
			{
				window.alert('Select Experience !');
				document.seeker_reg_form.totalexp_yy.focus();
				return false;
			}
				 
	    
			
			if(document.seeker_reg_form.totalexp_yy.value!=="0")
			{
				if(document.seeker_reg_form.ctc.value=="")
			{
				window.alert('Enter CTC !');
				document.seeker_reg_form.ctc.focus();
				return false;
			}	 
			}
			if(document.seeker_reg_form.tc.checked == false)
			{
 
				window.alert('Please Accept Terms &amp Condition!');
				document.seeker_reg_form.tc.focus();
				return false;
			}	 
			
 	           
			return true;
			}
            
			else
			{
 			window.alert("Invalid E-mail Address! Please re-enter.");
			document.seeker_reg_form.email.focus();
			return false;
			}
			
			}
		
	function validateper() 
		{ 
	    if(document.seeker_reg_form.FirstName.value=="")
			{
				window.alert('Enter Your Name!');
				document.seeker_reg_form.FirstName.focus();
				return false;
			}
			if(document.seeker_reg_form.nationality.value=="")
			{
				window.alert('Enter nationality!');
				document.seeker_reg_form.nationality.focus();
				return false;
			}
			if(document.seeker_reg_form.theDate2.value=="")
			{
				window.alert('Enter Date Of Birth in dd-mm-yyyy formate!');
				document.seeker_reg_form.theDate2.focus();
				return false;
			}
				if(document.seeker_reg_form.country.value=="")
			{
				window.alert('Enter country!');
				document.seeker_reg_form.country.focus();
				return false;
			}
				if(document.seeker_reg_form.city.value=="")
			{
				window.alert('Enter city!');
				document.seeker_reg_form.city.focus();
				return false;
			}
				if(document.seeker_reg_form.m_no.value=="")
			{
				window.alert('Enter Your Mobile Number !');
				document.seeker_reg_form.m_no.focus();
				return false;
			}
             if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.seeker_reg_form.alt_email.value ))
			{
		
					
			return true;
			}
            
			else
			{
 			window.alert("Invalid E-mail Address! Please re-enter.");
			document.seeker_reg_form.alt_email.focus();
			return false;
			}
			
			if(document.seeker_reg_form.r_title.value=="")
			{
				window.alert('Enter Resume Title!');
				document.seeker_reg_form.r_title.focus();
				return false;
			}
			
			
			if(document.seeker_reg_form.s_bio.value=="")
			{
				window.alert('Enter Short Bio !');
				document.seeker_reg_form.s_bio.focus();
				return false;
			}
				if(document.seeker_reg_form.totalexp_yy.value=="")
			{
				window.alert('Select Exp Year !');
				document.seeker_reg_form.totalexp_yy.focus();
				return false;
			}
				if(document.seeker_reg_form.totalexp_mm.value=="0")
			{
			 window.alert('Select Exp Month !');
				document.seeker_reg_form.totalexp_mm.focus();
				return false;
			}	 
			 
			
		
				if(document.seeker_reg_form.ind.value=="")
			{
				window.alert('Select Your Industry !');
				document.seeker_reg_form.ind.focus();
				return false;
			}
            	
			
			if(document.seeker_reg_form.totalexp_yy.value!=="0")
			{
				if(document.seeker_reg_form.ctc.value=="")
			{
				window.alert('Enter CTC !');
				document.seeker_reg_form.ctc.focus();
				return false;
			}	 
			}
			
			
 	           if(document.seeker_reg_form.resume.value=="")
			{
				window.alert('Upload Your Resume!');
				document.seeker_reg_form.resume.focus();
				return false;
			}
			
			}
		
	function validatesearch() 
		{ 
	    if(document.searched.query.value=="")
			{
				window.alert('Enter Search Keyword!');
				document.searched.query.focus();
				return false;
			}
		}
		
	function validateressearch() 
		{ 
	    if(document.searched.cs.value=="")
			{
				window.alert('Enter Search Keyword!');
				document.searched.cs.focus();
				return false;
			}
		}
		
	function chklogin()
	{
				if(document.emp.email.value=="")
			{
				window.alert('Enter Your E-mail Address !');
				document.emp.email.focus();
				return false;
			}
             if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.emp.email.value ))
			{
		
					
			return true;
			}
            
			else
			{
 			window.alert("Invalid E-mail Address! Please re-enter.");
			document.emp.email.focus();
			return false;
			}
	}
	function validatesearch1() 
		{ 
	    if(document.searched.query.value=="Search Jobs" || document.searched.query.value=="")
			{
				window.alert('Enter Search Keyword!');
				document.searched.query.focus();
				return false;
			}
		}
	function validatestep2() 
		{ 
	    if(document.form1.email1.value=="")
			{
				window.alert('Enter Atleast one Email!');
				document.form1.email1.focus();
				return false;
			}
		}


	function validatestep3() 
		{ 
	    if(document.form1.email_code.value=="")
			{
				window.alert('Please Validate Email Id  to Continue Process. !');
				document.form1.email_code.focus();
				return false;
			}
		}

	function seekerphoto() 
		{ 
	    if(document.seeker_reg_form.file.value=="")
			{
				window.alert('Upload Photo!');
				document.seeker_reg_form.file.focus();
				return false;
			}
		}
function seekerres() 
		{ 
	    if(document.seeker_reg_form.resume.value=="")
			{
				window.alert('Upload resume!');
				document.seeker_reg_form.resume.focus();
				return false;
			}
		}
   	
	function validateskills() 
		{ 
	    if(document.skills.skill.value=="")
			{
				window.alert('Enter Skill!');
				document.skills.skill.focus();
				return false;
			}
			  if(document.skills.description.value=="")
			{
				window.alert('Enter Description!');
				document.skills.description.focus();
				return false;
			}
		}
		
			
	function validatefam() 
		{ 
	    if(document.fam.name.value=="")
			{
				window.alert('Enter name!');
				document.fam.name.focus();
				return false;
			}
			  if(document.fam.relation.value=="")
			{
				window.alert('Enter relation!');
				document.fam.relation.focus();
				return false;
			}
			  if(document.fam.occupation.value=="")
			{
				window.alert('Enter occupation!');
				document.fam.occupation.focus();
				return false;
			}
		}
		
		function validatecat() 
		{ 
	    if(document.cat.category.value=="")
			{
				window.alert('Select category!');
				document.cat.category.focus();
				return false;
			}
			
		}
		
	function validateedu() 
		{ 
		
		   if(document.edu.examination.value=="")
			{
				window.alert('Enter Examination!');
				document.edu.examination.focus();
				return false;
			}
			  if(document.edu.institution.value=="")
			{
				window.alert('Enter Institution!');
				document.edu.institution.focus();
				return false;
			}
			  if(document.edu.year_pass.value=="")
			{
				window.alert('Enter Passing Year!');
				document.edu.year_pass.focus();
				return false;
			}
			  if(document.edu.class.value=="")
			{
				window.alert('Enter class!');
				document.edu.class.focus();
				return false;
			}
			  if(document.edu.score.value=="")
			{
				window.alert('Enter score!');
				document.edu.score.focus();
				return false;
			}
			  if(document.edu.max_score.value=="")
			{
				window.alert('Enter score!');
				document.edu.max_score.focus();
				return false;
			}
		}

		
	function checkMentor() 
		{ 
		
		 
		
		    if(document.Mentor.nm.value=="")
			{
				window.alert('Enter  Name!');
				document.Mentor.nm.focus();
				return false;
			}
			
			if(document.Mentor.email.value=="")
			{
				window.alert('Enter Email Id!');
				document.Mentor.email.focus();
				return false;
			}
			
			 if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.Mentor.email.value ))
			{
		    
			if(document.Mentor.pass.value=="")
			{
				window.alert('Enter Password!');
				document.Mentor.pass.focus();
				return false;
			}
		 
			
				if(document.Mentor.day.value=="")
			{
				window.alert('Select Day !');
				document.Mentor.day.focus();
				return false;
			}
			
			
			if(document.Mentor.month.value=="")
			{
			 window.alert('Select Month !');
				document.Mentor.month.focus();
				return false;
			}	 
			 
			
			if(document.Mentor.year.value=="")
			{
				window.alert('Select Year !');
				document.Mentor.year.focus();
				return false;
			}
            	
			if(document.Mentor.country.value=="")
			{
				window.alert('Enter Country !');
				document.Mentor.country.focus();
				return false;
			}
            	
		
 	           if(document.Mentor.city.value=="")
			{
				window.alert('Enter City!');
				document.Mentor.city.focus();
				return false;
			}
			
			
		       if(document.Mentor.telephone.value=="")
			{
				window.alert('Enter Telephone Number!');
				document.Mentor.telephone.focus();
				return false;
			}
			      if(document.Mentor.mobile.value=="")
			{
				window.alert('Enter Mobile no!');
				document.Mentor.mobile.focus();
				return false;
			}
			
			return true;
			}
            
			else
			{
 			window.alert("Invalid E-mail Address! Please re-enter.");
			document.Mentor.email.focus();
			return false;
			}
		
		
		}
			
	function validateref() 
		{ 
		
		 
		
		    if(document.ref.name.value=="")
			{
				window.alert('Enter  Name!');
				document.ref.name.focus();
				return false;
			}
			if(document.ref.designation.value=="")
			{
				window.alert('Enter designation!');
				document.ref.designation.focus();
				return false;
			}
				if(document.ref.city.value=="")
			{
				window.alert('Select city !');
				document.ref.city.focus();
				return false;
			}
			     if(document.ref.telephone.value=="")
			{
				window.alert('Enter Telephone Number!');
				document.ref.telephone.focus();
				return false;
			}
			if(document.ref.email.value=="")
			{
				window.alert('Enter Email Id!');
				document.ref.email.focus();
				return false;
			}
			
			 if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.ref.email.value ))
			{
		
					
			return true;
			}
            
			else
			{
 			window.alert("Invalid E-mail Address! Please re-enter.");
			document.ref.email.focus();
			return false;
			}
		
		
		}
		
		function validateemp() 
		{ 
		
		 
		
		       if(document.emp.organisation.value=="")
			{
				window.alert('Enter organisation!');
				document.emp.organisation.focus();
				return false;
			}
			
				if(document.emp.day.value=="")
			{
				window.alert('Select Start day !');
				document.emp.day.focus();
				return false;
			}
			 	
			if(document.emp.month.value=="")
			{
			 window.alert('Select Start Month !');
				document.emp.month.focus();
				return false;
			}	 
			 
			
			if(document.emp.year.value=="")
			{
				window.alert('Select Start Year !');
				document.emp.year.focus();
				return false;
			} 
		if(document.emp.day1.value=="")
			{
				window.alert('Select End day !');
				document.emp.day1.focus();
				return false;
			}
			 	
			if(document.emp.month1.value=="")
			{
			 window.alert('Select End Month !');
				document.emp.month1.focus();
				return false;
			}	 
			 
			
			if(document.emp.year1.value=="")
			{
				window.alert('Select End Year !');
				document.emp.year1.focus();
				return false;
			}
			
			if(document.emp.designation.value=="")
			{
				window.alert('Enter designation!');
				document.emp.designation.focus();
				return false;
			}
			
			if(document.emp.annual_salary.value=="")
			{
				window.alert('Enter Salary !');
				document.emp.annual_salary.focus();
				return false;
			}
			
			if(document.emp.industry.value=="")
			{
				window.alert('Select industry !');
				document.emp.industry.focus();
				return false;
			}
			
		 
		}
		
		
		function jobpost() 
		{ 
	
		       if(document.job_post.job_title.value=="")
			{
				window.alert('Enter Job Title!');
				document.job_post.job_title.focus();
				return false;
			}
			
				if(document.job_post.exp.value=="")
			{
				window.alert('Select Experience !');
				document.job_post.exp.focus();
				return false;
			}
	 
			 
			
			if(document.job_post.location.value=="")
			{
				window.alert('Enter location !');
				document.job_post.location.focus();
				return false;
			} 
		if(document.job_post.education.value=="")
			{
				window.alert('Enter education !');
				document.job_post.education.focus();
				return false;
			}
			 	
			if(document.job_post.role.value=="")
			{
			 window.alert('Enter Role!');
				document.job_post.role.focus();
				return false;
			}	 
			 
			
			if(document.job_post.industry.value=="")
			{
				window.alert('Select industry !');
				document.job_post.industry.focus();
				return false;
			}
			
			if(document.job_post.description.value=="")
			{
				window.alert('Enter description!');
				document.job_post.description.focus();
				return false;
			}
			
			 
		}
		
		
			function validatevalid() 
		{ 
		
		       if(document.validate.validity.value=="")
			{
				window.alert('Enter Validity Date!');
				document.validate.validity.focus();
				return false;
			}
			
				if(document.validate.listing.value=="")
			{
				window.alert('Enter Listing !');
				document.validate.listing.focus();
				return false;
			}
			 	
			if(document.validate.credit.value=="")
			{
			 window.alert('Enter Credit For Resume !');
				document.validate.credit.focus();
				return false;
			}	 
			 
			
			if(document.validate.ammount.value=="")
			{
				window.alert('Enter Ammount !');
				document.validate.ammount.focus();
				return false;
			} 
			
		}
		
	 
			function validatecats() 
		{ 
		
		       if(document.cat.category_name.value=="")
			{
				window.alert('Enter Category Name!');
				document.cat.category_name.focus();
				return false;
			}
			
				if(document.cat.employee_charge.value=="")
			{
				window.alert('Enter Employee Charge !');
				document.cat.employee_charge.focus();
				return false;
			}
			 	
			if(document.cat.Mentor_comission.value=="")
			{
			 window.alert('Enter Mentor Comission !');
				document.cat.Mentor_comission.focus();
				return false;
			}	 
			 
		 
			
		}
		
		
			function validatepack() 
		{ 
		
		       if(document.pack.pack_name.value=="")
			{
				window.alert('Enter Package Name!');
				document.pack.pack_name.focus();
				return false;
			}
			
				if(document.pack.listing.value=="")
			{
				window.alert('Enter Listing !');
				document.pack.listing.focus();
				return false;
			}
			 	
			if(document.pack.charges.value=="")
			{
			 window.alert('Enter  Charges !');
				document.pack.charges.focus();
				return false;
			}	 
			 
		 
			
		}
		
			function validateactive() 
		{ 
		
		       if(document.act.bank.value=="")
			{
				window.alert('Enter bank detail!');
				document.act.pack_name.focus();
				return false;
			}
			
				if(document.act.cheque_no.value=="")
			{
				window.alert('Enter Cheque No !');
				document.act.cheque_no.focus();
				return false;
			}
			 	
				if(document.act.amount.value=="")
			{
				window.alert('Enter Amount !');
				document.act.amount.focus();
				return false;
			}
				if(document.act.payment_date.value=="")
			{
				window.alert('Enter Payment Date !');
				document.act.payment_date.focus();
				return false;
			}
			
			if(document.act.payment_type.checked=false)
			{
			 window.alert('Select Payment Type !');
 				return false;
			}	 
			 
		 
			
		}
		
		
	function employerregform() 
		{ 
				
		    if(document.employer_reg_form.company_name.value=="")
			{
				window.alert('Enter Company Name!');
				document.employer_reg_form.company_name.focus();
				return false;
			}
			
			if(document.employer_reg_form.email.value=="")
			{
				window.alert('Enter Email Id!');
				document.employer_reg_form.email.focus();
				return false;
			}
			
			 if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.employer_reg_form.email.value ))
			{
		    
			if(document.employer_reg_form.pass.value=="")
			{
				window.alert('Enter Password!');
				document.employer_reg_form.pass.focus();
				return false;
			}
		 
			
				if(document.employer_reg_form.person_name.value=="")
			{
				window.alert('Enter Person Name !');
				document.employer_reg_form.person_name.focus();
				return false;
			}
			
			
			if(document.employer_reg_form.industry.value=="")
			{
			 window.alert('Select your Industry !');
				document.employer_reg_form.abt_comp.focus();
				return false;
			}	 
			 
			
			if(document.employer_reg_form.address.value=="")
			{
				window.alert('Enter address !');
				document.employer_reg_form.address.focus();
				return false;
			}
            	
			if(document.employer_reg_form.mobile_no.value=="")
			{
				window.alert('Enter Mobile No !');
				document.employer_reg_form.mobile_no.focus();
				return false;
			}
			
					
			return true;
			}
            
			else
			{
 			window.alert("Invalid E-mail Address! Please re-enter.");
			document.employer_reg_form.email.focus();
			return false;
			}
		
		
		}
		
						
	
