// JavaScript Document




var currentTime = new Date()
var month = currentTime.getMonth() 
var day = currentTime.getDate()
var year = currentTime.getFullYear()

	
var date1 = new Date(year, month, day);

function validate(form) {
	
	var numericExpression = /^[0-9]+$/;
	var alphaExp = /^[a-zA-Z\.\s\(\)\-]+$/;
	

	var dt1   = parseInt(document.AppForm.rd.value);
  	var mon1  = document.AppForm.rm.value-1;
   	var yr1   = parseInt(document.AppForm.ry.value);
	
	var date2 = new Date(yr1, mon1, dt1);
	//alert(date1);
	var s=dt1 + "/" + mon1 + "/" + yr1;
			
	if(date2<date1){
		//alert(dt1);
		alert('Joining date can not be smaller than the current date');
		//alert(s);
		alert('Your Date '+date2);
		alert('Current Date '+date1);	
		//alert(document.AppForm.rm.value);
		form.rd.focus();
		return false;
	}
	if(form.dobdd.value=="")	
		{       
		alert('day cannot be empty!');
        	form.dobdd.focus();
			return false;
		}	
		//alert(form.pass.value);
	
		
		if(form.pass.value=="")	
		{       
		alert('Password cannot be blank!');
        	form.pass.focus();
			return false;
		}
		if(form.rpass.value=="")	
		{       
		alert('Please re-type password');
        	form.rpass.focus();
			return false;
		}
	
	if(form.pass.value!=form.rpass.value){
			alert('Passwords dont match');
			form.rpass.focus();
			return false;
		}
		if(form.appname.value=="")	
		{       
		alert('Applicant Name cannot be blank!');
        	form.appname.focus();
			return false;
		}
		if(!document.AppForm.appname.value.match(alphaExp)){
			document.AppForm.appname.focus();
			alert("Name cannot contain numbers");
			return false;
		}
		if(form.mobileno.value.length==0)	
		{       
		alert('Mobile cannot be blank!');
        	form.mobileno.focus();
			return false;
		}
		if(!document.AppForm.mobileno.value.match(numericExpression)){
			document.AppForm.mobileno.focus();
			alert("Mobile number has to be only numbers");
			return false;
		}
		
		
		if(document.AppForm.institute1.value.length==0 || document.AppForm.ey1.value=="" ||  document.AppForm.qualification1.value=="" || document.AppForm.areaofstudy1.value=="" ||  document.AppForm.subject1.value=="" || document.AppForm.division1.value=="" || document.AppForm.res1.value.length==0){
				alert("Please fill all the fields in education");
				document.AppForm.institute1.focus();
				return false;
			}
			
		
		if(document.AppForm.institute2.value.length!=0 || document.AppForm.ey2.value!="" ||  document.AppForm.qualification2.value!="" || document.AppForm.areaofstudy2.value!="" ||  document.AppForm.subject2.value!="" || document.AppForm.division2.value!="" || document.AppForm.res2.value.length!=0){
			if(document.AppForm.institute2.value.length==0 || document.AppForm.ey2.value=="" ||  document.AppForm.qualification2.value=="" || document.AppForm.areaofstudy2.value=="" ||  document.AppForm.subject2.value=="" || document.AppForm.division2.value=="" || document.AppForm.res2.value.length==0){
				alert("Please fill all the fields in education2");
				return false;
			}
			
		}
		if(document.AppForm.institute3.value.length!=0 || document.AppForm.ey3.value!="" ||  document.AppForm.qualification3.value!="" || document.AppForm.areaofstudy3.value!="" ||  document.AppForm.subject3.value!="" || document.AppForm.division3.value!="" || document.AppForm.res3.value.length!=0){
			if(document.AppForm.institute3.value.length==0 || document.AppForm.ey3.value=="" ||  document.AppForm.qualification3.value=="" || document.AppForm.areaofstudy3.value=="" ||  document.AppForm.subject3.value=="" || document.AppForm.division3.value=="" || document.AppForm.res3.value.length==0){
				alert("Please fill all the fields in education3");
				return false;
			}
			
		}
		if(document.AppForm.institute4.value.length!=0 || document.AppForm.ey4.value!="" ||  document.AppForm.qualification4.value!="" || document.AppForm.areaofstudy4.value!="" ||  document.AppForm.subject4.value!="" || document.AppForm.division4.value!="" || document.AppForm.res4.value.length!=0){
			if(document.AppForm.institute4.value.length==0 || document.AppForm.ey4.value=="" ||  document.AppForm.qualification4.value=="" || document.AppForm.areaofstudy4.value=="" ||  document.AppForm.subject4.value=="" || document.AppForm.division4.value=="" || document.AppForm.res4.value.length==0){
				alert("fill education4");
				return false;
			}
			
		}
		if(document.AppForm.institute5.value.length!=0 || document.AppForm.ey5.value!="" ||  document.AppForm.qualification5.value!="" || document.AppForm.areaofstudy5.value!="" ||  document.AppForm.subject5.value!="" || document.AppForm.division5.value!="" || document.AppForm.res5.value.length!=0){
			if(document.AppForm.institute5.value.length==0 || document.AppForm.ey5.value=="" ||  document.AppForm.qualification5.value=="" || document.AppForm.areaofstudy5.value=="" ||  document.AppForm.subject5.value=="" || document.AppForm.division5.value=="" || document.AppForm.res5.value.length==0){
				alert("Please fill all the fields in education5");
				return false;
			}
			
		}
		if(document.AppForm.institute6.value.length!=0 || document.AppForm.ey6.value!="" ||  document.AppForm.qualification6.value!="" || document.AppForm.areaofstudy6.value!="" ||  document.AppForm.subject6.value!="" || document.AppForm.division6.value!="" || document.AppForm.res6.value.length!=0){
			if(document.AppForm.institute6.value.length==0 || document.AppForm.ey6.value=="" ||  document.AppForm.qualification6.value=="" || document.AppForm.areaofstudy6.value=="" ||  document.AppForm.subject6.value=="" || document.AppForm.division6.value=="" || document.AppForm.res6.value.length==0){
				alert("Please fill all the fields in education 6");
				return false;
			}
			
		}
		if(document.AppForm.institute7.value.length!=0 || document.AppForm.ey7.value!="" ||  document.AppForm.qualification7.value!="" || document.AppForm.areaofstudy7.value!="" ||  document.AppForm.subject7.value!="" || document.AppForm.division7.value!="" || document.AppForm.res7.value.length!=0){
			if(document.AppForm.institute7.value.length==0 || document.AppForm.ey7.value=="" ||  document.AppForm.qualification7.value=="" || document.AppForm.areaofstudy7.value=="" ||  document.AppForm.subject7.value=="" || document.AppForm.division7.value=="" || document.AppForm.res7.value.length==0){
				alert("Please fill all the fields in education 7");
				return false;
			}
			
		}
		if(document.AppForm.institute8.value.length!=0 || document.AppForm.ey8.value!="" ||  document.AppForm.qualification8.value!="" || document.AppForm.areaofstudy8.value!="" ||  document.AppForm.subject8.value!="" || document.AppForm.division8.value!="" || document.AppForm.res8.value.length!=0){
			if(document.AppForm.institute8.value.length==0 || document.AppForm.ey8.value=="" ||  document.AppForm.qualification8.value=="" || document.AppForm.areaofstudy8.value=="" ||  document.AppForm.subject8.value=="" || document.AppForm.division8.value=="" || document.AppForm.res8.value.length==0){
				alert("Please fill all the fields in education 8");
				return false;
			}
			
		}
		
		if(form.dobmm.value=="")	
		{       
		alert('month cannot be empty!');
        	//form.pob.focus();
			return false;
		}	
		if(form.dobyy.value=="")	
		{       
		alert('year cannot be empty!');
        	//form.pob.focus();
			return false;
		}	
		if(form.email.value=="")	
		{       
		alert('Emailcannot be blank!');
        	form.email.focus();
			return false;
		}	
		
		
		
		
				
		if(form.appfhname.value=="")	
		{       
		alert('Applicant Father`s/Husband Name cannot be blank!');
        	form.appfhname.focus();
			return false;
		}
		
		
		if(!document.AppForm.appfhname.value.match(alphaExp)){
			document.AppForm.appfhname.focus();
			alert("Father's Name cannot contain numbers");
			return false;
		}
		
		if(document.AppForm.appmname.value!=""){
			if(!document.AppForm.appmname.value.match(alphaExp)){
				document.AppForm.appmname.focus();
				alert("Mother's Name cannot contain numbers");
				return false;
			}
		}
		
		
		if(document.AppForm.pretelno.value!=""){
			if(!document.AppForm.pretelno.value.match(numericExpressionTel)){
			document.AppForm.pretelno.focus();
			alert("Please check your Tel number");
			return false;
			}	
		}
		if(document.AppForm.pertelno.value!=""){
			if(!document.AppForm.pertelno.value.match(numericExpressionTel)){
			document.AppForm.pertelno.focus();
			alert("Please check your Tel number");
			return false;
			}	
		}
		if(form.preaddress.value=="")	
		{       
		alert('Present address cannot be blank!');
        	form.preaddress.focus();
			return false;
		}
		
		
		if(form.peraddress.value=="")	
		{       

		alert('Permanent address cannot be blank!');
        	form.peraddress.focus();
			return false;
		}		
		
		if(form.nationality.value=="")	
		{       
		alert('Nationality cannot be blank!');
        	form.nationality.focus();
			return false;
		}
	
	
		if(!document.AppForm.nationality.value.match(alphaExp)){
			document.AppForm.nationality.focus();
			alert("Unwanted characters in Nationality");
			return false;
		}
		
		
		if(form.religion.value=="")	
		{       
		alert('Religion cannot be blank!');
        	form.religion.focus();
			return false;
		}
		
		if(!document.AppForm.religion.value.match(alphaExp)){
			document.AppForm.religion.focus();
			alert("Religion cannot contain numbers");
			return false;
		}
		
		if(form.blgroup.value=="")	
		{       
		alert('Blood Group cannot be blank!');
        	form.blgroup.focus();
			return false;
		}
		
		
		
		if(form.pob.value=="")	
		{       
		alert('Place of birth cannot be blank!');
        	form.pob.focus();
			return false;
		}

		
		
		/*if(form.objective.value=="")	
		{       
		alert('Objective cannot be blank!');
        	form.objective.focus();
			return false;
		}*/
		if(form.rd.value=="")	
		{       

		alert('Joining day cannot be empty!');
        	form.rd.focus();
			return false;
		}	
		if(form.rm.value=="")	
		{       
		alert('Joining month cannot be empty!');
        	form.rm.focus();
			return false;
		}	
		if(form.ry.value=="")	
		{       
		alert('Joining year cannot be empty!');
        	//form.pob.focus();
			return false;
		}	
		/*if(form.careerplans.value=="")	
		{       
		alert('Please give career summary!');
        	form.careerplans.focus();
			return false;
		}	*/
		
			if(document.AppForm.employer3.value.length!=0 || document.AppForm.jobtitle3.value!="" ||  document.AppForm.empd3.value!="" || document.AppForm.empm3.value!="" ||  document.AppForm.empy3.value!="" || document.AppForm.emptd3.value!="" || document.AppForm.emptm3.value.length!=0 || document.AppForm.empt3.value!=""){
			if(document.AppForm.employer3.value.length==0 || document.AppForm.jobtitle3.value=="" ||  document.AppForm.empd3.value=="" || document.AppForm.empm3.value=="" ||  document.AppForm.empy3.value=="" ){
				document.AppForm.employer3.focus();
				alert("fill employer name/position held/from/to for employer 3");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd3.value);
					var m  = parseInt(document.AppForm.empm3.value);
					var y  = parseInt(document.AppForm.empy3.value);
					
					var f = new Date(y, m, d);
					
					
					var d3  = parseInt(document.AppForm.emptd3.value);
					var m3  = parseInt(document.AppForm.emptm3.value);
					var y3  = parseInt(document.AppForm.empt3.value);
					
					var t = new Date(y3, m3, d3);
					
					if(document.AppForm.till3.checked==false){
						if(document.AppForm.emptd3.value=="" || document.AppForm.emptm3.value=="" || document.AppForm.empt3.value==""){
							alert('Please fill up to date of employer three');
							document.AppForm.emptd3.focus();
							return false;
						}
					
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd3.focus();
							return false;
						}
					}
					
					if(document.AppForm.lastsalary3.value.length>0){
							if(!document.AppForm.lastsalary3.value.match(numericExpression)){
								document.AppForm.lastsalary3.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
					
			}
			
			
		}
		
		
		if(document.AppForm.employer2.value.length!=0 || document.AppForm.jobtitle2.value!="" ||  document.AppForm.empd2.value!="" || document.AppForm.empm2.value!="" ||  document.AppForm.empy2.value!="" || document.AppForm.emptd2.value!="" || document.AppForm.emptm2.value.length!=0 || document.AppForm.empt2.value!=""){
			if(document.AppForm.employer2.value.length==0 || document.AppForm.jobtitle2.value=="" ||  document.AppForm.empd2.value=="" || document.AppForm.empm2.value=="" ||  document.AppForm.empy2.value=="" ){
				document.AppForm.employer2.focus();
				alert("fill employer name/position held/from/to for employer 2");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd2.value);
					var m  = parseInt(document.AppForm.empm2.value);
					var y  = parseInt(document.AppForm.empy2.value);
					
					var f = new Date(y, m, d);
					
					
					var d2  = parseInt(document.AppForm.emptd2.value);
					var m2  = parseInt(document.AppForm.emptm2.value);
					var y2  = parseInt(document.AppForm.empt2.value);
					
					var t = new Date(y2, m2, d2);
					//alert(t);
					if(document.AppForm.till2.checked==false){
						if(document.AppForm.emptd2.value=="" || document.AppForm.emptm2.value=="" || document.AppForm.empt2.value==""){
							alert('Please fill up to date of employer two');
							document.AppForm.emptd2.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd2.focus();
							return false;
						}
					}
					if(document.AppForm.lastsalary2.value.length>0){
						//alert(document.AppForm.lastsalary2.value.length);
							if(!document.AppForm.lastsalary2.value.match(numericExpression)){
								document.AppForm.lastsalary2.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
			}
			
			
		}
		
		
		
	
	if(document.AppForm.employer1.value.length!=0 || document.AppForm.jobtitle1.value!="" ||  document.AppForm.empd1.value!="" || document.AppForm.empm1.value!="" ||  document.AppForm.empy1.value!="" || document.AppForm.emptd1.value!="" || document.AppForm.emptm1.value.length!=0 || document.AppForm.empt1.value!=""){
			if(document.AppForm.employer1.value.length==0 || document.AppForm.jobtitle1.value=="" ||  document.AppForm.empd1.value=="" || document.AppForm.empm1.value=="" ||  document.AppForm.empy1.value=="" ){
				alert("fill employer name/position held/from/to for employer 1");
				document.AppForm.employer1.focus();
				return false;
			}
			else{
					var d  = parseInt(document.AppForm.empd1.value);
					var m  = parseInt(document.AppForm.empm1.value);
					var y  = parseInt(document.AppForm.empy1.value);
					
					var f = new Date(y, m, d);
					
					
					var d1  = parseInt(document.AppForm.emptd1.value);
					var m1  = parseInt(document.AppForm.emptm1.value);
					var y1  = parseInt(document.AppForm.empt1.value);
					
					var t = new Date(y1, m1, d1);
					if(t<f){
						alert("to date can not be smaller than the from date");
						document.AppForm.emptd1.focus();
						return false;
					}
					else if(document.AppForm.lastsalary1.value!=""){
							if(!document.AppForm.lastsalary1.value.match(numericExpression)){
								document.AppForm.lastsalary1.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
			}
			
		}
		
		if(document.AppForm.employer4.value.length!=0 || document.AppForm.jobtitle4.value!="" ||  document.AppForm.empd4.value!="" || document.AppForm.empm4.value!="" ||  document.AppForm.empy4.value!="" || document.AppForm.emptd4.value!="" || document.AppForm.emptm4.value.length!=0 || document.AppForm.empt4.value!=""){
			if(document.AppForm.employer4.value.length==0 || document.AppForm.jobtitle4.value=="" ||  document.AppForm.empd4.value=="" || document.AppForm.empm4.value=="" ||  document.AppForm.empy4.value=="" ){
				document.AppForm.employer4.focus();
				alert("fill employer name/position held/from/to for employer 4");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd4.value);
					var m  = parseInt(document.AppForm.empm4.value);
					var y  = parseInt(document.AppForm.empy4.value);
					
					var f = new Date(y, m, d);
					
					
					var d4  = parseInt(document.AppForm.emptd4.value);
					var m4  = parseInt(document.AppForm.emptm4.value);
					var y4  = parseInt(document.AppForm.empt4.value);
					
					var t = new Date(y4, m4, d4);
					
					if(document.AppForm.till4.checked==false){
						if(document.AppForm.emptd4.value=="" || document.AppForm.emptm4.value=="" || document.AppForm.empt4.value==""){
							alert('Please fill up to date of employer four');
							document.AppForm.emptd4.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd4.focus();
							return false;
						}
					}
					
					if(document.AppForm.lastsalary4.value.length>0){
							if(!document.AppForm.lastsalary4.value.match(numericExpression)){
								document.AppForm.lastsalary4.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
					
			}
			
			
			
		}
		if(document.AppForm.employer5.value.length!=0 || document.AppForm.jobtitle5.value!="" ||  document.AppForm.empd5.value!="" || document.AppForm.empm5.value!="" ||  document.AppForm.empy5.value!="" || document.AppForm.emptd5.value!="" || document.AppForm.emptm5.value.length!=0 || document.AppForm.empt5.value!=""){
			if(document.AppForm.employer5.value.length==0 || document.AppForm.jobtitle5.value=="" ||  document.AppForm.empd5.value=="" || document.AppForm.empm5.value=="" ||  document.AppForm.empy5.value==""){
				document.AppForm.employer5.focus();
				alert("fill employer name/position held/from/to for employer 5");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd5.value);
					var m  = parseInt(document.AppForm.empm5.value);
					var y  = parseInt(document.AppForm.empy5.value);
					
					var f = new Date(y, m, d);
					
					
					var d5  = parseInt(document.AppForm.emptd5.value);
					var m5  = parseInt(document.AppForm.emptm5.value);
					var y5  = parseInt(document.AppForm.empt5.value);
					
					var t = new Date(y5, m5, d5);
					if(document.AppForm.till5.checked==false){
						if(document.AppForm.emptd5.value=="" || document.AppForm.emptm5.value=="" || document.AppForm.empt5.value==""){
							alert('Please fill up to date of employer five');
							document.AppForm.emptd5.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd5.focus();
							return false;
						}
					}
					
					if(document.AppForm.lastsalary5.value.length>0){
							if(!document.AppForm.lastsalary5.value.match(numericExpression)){
								document.AppForm.lastsalary5.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
					
			}
			
			
		}
		if(document.AppForm.employer6.value.length!=0 || document.AppForm.jobtitle6.value!="" ||  document.AppForm.empd6.value!="" || document.AppForm.empm6.value!="" ||  document.AppForm.empy6.value!="" || document.AppForm.emptd6.value!="" || document.AppForm.emptm6.value.length!=0 || document.AppForm.empt6.value!=""){
			if(document.AppForm.employer6.value.length==0 || document.AppForm.jobtitle6.value=="" ||  document.AppForm.empd6.value=="" || document.AppForm.empm6.value=="" ||  document.AppForm.empy6.value=="" ){
				document.AppForm.employer6.focus();
				alert("fill employer name/position held/from/to for employer 6");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd6.value);
					var m  = parseInt(document.AppForm.empm6.value);
					var y  = parseInt(document.AppForm.empy6.value);
					
					var f = new Date(y, m, d);
					
					
					var d6  = parseInt(document.AppForm.emptd6.value);
					var m6  = parseInt(document.AppForm.emptm6.value);
					var y6  = parseInt(document.AppForm.empt6.value);
					
					var t = new Date(y6, m6, d6);
					
					if(document.AppForm.till6.checked==false){
						if(document.AppForm.emptd6.value=="" || document.AppForm.emptm6.value=="" || document.AppForm.empt6.value==""){
							alert('Please fill up to date of employer six');
							document.AppForm.emptd6.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd6.focus();
							return false;
						}
					}
					
					if(document.AppForm.lastsalary6.value.length>0){
							if(!document.AppForm.lastsalary6.value.match(numericExpression)){
								document.AppForm.lastsalary6.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
					
			}
			
			
		}
		if(document.AppForm.employer7.value.length!=0 || document.AppForm.jobtitle7.value!="" ||  document.AppForm.empd7.value!="" || document.AppForm.empm7.value!="" ||  document.AppForm.empy7.value!="" || document.AppForm.emptd7.value!="" || document.AppForm.emptm7.value.length!=0 || document.AppForm.empt7.value!=""){
			if(document.AppForm.employer7.value.length==0 || document.AppForm.jobtitle7.value=="" ||  document.AppForm.empd7.value=="" || document.AppForm.empm7.value=="" ||  document.AppForm.empy7.value==""){
				document.AppForm.employer7.focus();
				alert("fill employer name/position held/from/to for employer 7");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd7.value);
					var m  = parseInt(document.AppForm.empm7.value);
					var y  = parseInt(document.AppForm.empy7.value);
					
					var f = new Date(y, m, d);
					
					
					var d7  = parseInt(document.AppForm.emptd7.value);
					var m7  = parseInt(document.AppForm.emptm7.value);
					var y7  = parseInt(document.AppForm.empt7.value);
					
					var t = new Date(y7, m7, d7);
					
					if(document.AppForm.till7.checked==false){
						if(document.AppForm.emptd7.value=="" || document.AppForm.emptm7.value=="" || document.AppForm.empt7.value==""){
							alert('Please fill up to date of employer seven');
							document.AppForm.emptd7.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd7.focus();
							return false;
						}
					}
						
					if(document.AppForm.lastsalary7.value.length>0){
							if(!document.AppForm.lastsalary7.value.match(numericExpression)){
								document.AppForm.lastsalary7.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
					
			}
			
			
		}
		if(document.AppForm.employer8.value.length!=0 || document.AppForm.jobtitle8.value!="" ||  document.AppForm.empd8.value!="" || document.AppForm.empm8.value!="" ||  document.AppForm.empy8.value!="" || document.AppForm.emptd8.value!="" || document.AppForm.emptm8.value.length!=0 || document.AppForm.empt8.value!=""){
			if(document.AppForm.employer8.value.length==0 || document.AppForm.jobtitle8.value=="" ||  document.AppForm.empd8.value=="" || document.AppForm.empm8.value=="" ||  document.AppForm.empy8.value=="" ){
				document.AppForm.employer8.focus();
				alert("fill employer name/position held/from/to for employer 8");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd8.value);
					var m  = parseInt(document.AppForm.empm8.value);
					var y  = parseInt(document.AppForm.empy8.value);
					
					var f = new Date(y, m, d);
					
					
					var d8  = parseInt(document.AppForm.emptd8.value);
					var m8  = parseInt(document.AppForm.emptm8.value);
					var y8  = parseInt(document.AppForm.empt8.value);
					
					var t = new Date(y8, m8, d8);
					
					if(document.AppForm.till8.checked==false){
						if(document.AppForm.emptd8.value=="" || document.AppForm.emptm8.value=="" || document.AppForm.empt8.value==""){
							alert('Please fill up to date of employer eight');
							document.AppForm.emptd8.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd8.focus();
							return false;
						}
					}
					
					
					if(document.AppForm.lastsalary8.value.length>0){
							if(!document.AppForm.lastsalary8.value.match(numericExpression)){
								document.AppForm.lastsalary8.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
			}
			
			
		}
		
		if(document.AppForm.employer9.value.length!=0 || document.AppForm.jobtitle9.value!="" ||  document.AppForm.empd9.value!="" || document.AppForm.empm9.value!="" ||  document.AppForm.empy9.value!="" || document.AppForm.emptd9.value!="" || document.AppForm.emptm9.value.length!=0 || document.AppForm.empt9.value!=""){
			if(document.AppForm.employer9.value.length==0 || document.AppForm.jobtitle9.value=="" ||  document.AppForm.empd9.value=="" || document.AppForm.empm9.value=="" ||  document.AppForm.empy9.value==""){
				document.AppForm.employer9.focus();
				alert("fill employer name/position held/from/to for employer 9");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd9.value);
					var m  = parseInt(document.AppForm.empm9.value);
					var y  = parseInt(document.AppForm.empy9.value);
					
					var f = new Date(y, m, d);
					
					
					var d9  = parseInt(document.AppForm.emptd9.value);
					var m9  = parseInt(document.AppForm.emptm9.value);
					var y9  = parseInt(document.AppForm.empt9.value);
					
					var t = new Date(y9, m9, d9);
					
					if(document.AppForm.till9.checked==false){
						if(document.AppForm.emptd9.value=="" || document.AppForm.emptm9.value=="" || document.AppForm.empt9.value==""){
							alert('Please fill up to date of employer nine');
							document.AppForm.emptd9.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd9.focus();
							return false;
						}
					}
					
					if(document.AppForm.lastsalary9.value.length>0){
							if(!document.AppForm.lastsalary9.value.match(numericExpression)){
								document.AppForm.lastsalary9.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
					
			}
			
			
		}
		if(document.AppForm.employer10.value.length!=0 || document.AppForm.jobtitle10.value!="" ||  document.AppForm.empd10.value!="" || document.AppForm.empm10.value!="" ||  document.AppForm.empy10.value!="" || document.AppForm.emptd10.value!="" || document.AppForm.emptm10.value.length!=0 || document.AppForm.empt10.value!=""){
			if(document.AppForm.employer10.value.length==0 || document.AppForm.jobtitle10.value=="" ||  document.AppForm.empd10.value=="" || document.AppForm.empm10.value=="" ||  document.AppForm.empy10.value=="" ){
				document.AppForm.employer10.focus();
				alert("fill employer name/position held/from/to for employer 10");
				return false;
			}
			
			else{
					var d  = parseInt(document.AppForm.empd10.value);
					var m  = parseInt(document.AppForm.empm10.value);
					var y  = parseInt(document.AppForm.empy10.value);
					
					var f = new Date(y, m, d);
					
					
					var d10  = parseInt(document.AppForm.emptd10.value);
					var m10  = parseInt(document.AppForm.emptm10.value);
					var y10  = parseInt(document.AppForm.empt10.value);
					
					var t = new Date(y10, m10, d10);
					
					if(document.AppForm.till10.checked==false){
						if(document.AppForm.emptd10.value=="" || document.AppForm.emptm10.value=="" || document.AppForm.empt10.value==""){
							alert('Please fill up to date of employer ten');
							document.AppForm.emptd10.focus();
							return false;
						}
						if(t<f){
							alert("to date can not be smaller than the from date");
							document.AppForm.emptd10.focus();
							return false;
						}
					}
					
					
					if(document.AppForm.lastsalary10.value.length>0){
							if(!document.AppForm.lastsalary10.value.match(numericExpression)){
								document.AppForm.lastsalary10.focus();
								alert("Salary number has to be only numbers");
								return false;
							}
					}
			}
			
			
		}
		
		
		
		
}//END OF VALIDATE	

