// Script written by:Narasinha joshi 09742934611

// JavaScript Document
function validation(application)
{
/*  if(application.name.value=="")
	{
	alert("Enter the Name");
	application.name.focus;
	return false;
	}
	if(application.dates.value=="")
	{
	alert("select the date");
	application.dates.focus;
	return false;
	}
	if(application.address.value=="")
	{
	alert("Enter the address");
	application.address.focus;
	return false;
	}
	
   if(application.phone.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
      return false;
   }
   if(application.city.value=="")
	{
	alert("Enter the city");
	application.city.focus;
	return false;
	}
   if(application.state.value=="")
	{
	alert("Please select the state");
	application.state.focus;
	return false;
	}
		if(application.zip.value.search(/\d{5}/)==-1)
   		{
      		alert("Please enter valid Zip Code");
      		return false;
   		}
   if(application.ssn.value.search(/\d{3}\-\d{2}\-\d{4}/)==-1)
   {
      alert("The SSN number you entered is not valid.\r\nPlease enter a SSN number with the format xxx-xx-xxxx.");
      return false;
   }
var indexdot;
var indexat;
var email=application.email.value;
indexat=email.indexOf("@");
indexdot=email.indexOf(".");
if(indexat==-1)
	{
		alert("Enter the Valid email Id Ex:yourname@yourmail.com");
		application.email.focus;
		return false;
	}
	
  if(indexdot==-1)
	{
	alert("Enter the Valid email Id Ex:yourname@yourmail.com");
	application.email.focus;
	return false;
	}  
var i=0;
var chkcount;
chkcount=0;
for (i=0;i<application.citizen.length;i++)
  {
	if ( application.citizen [i].type=="radio" && application.citizen[i].name=="citizen" && application.citizen[i].					    checked==true)
     {
       chkcount=chkcount+1
     } 
  }
   
   if (chkcount==0) 
		{
			alert(" Are you a citizen of the United States of America?Please select Yes or No");
		    return false;
		}
var k=0;
var countk=0;
 for (k=0;k<application.here.length;k++)
  	{
	  if(application.here [k].type=="radio" && application.here[k].name=="here" && application.here[k].checked==true)
     	{
       		countk=countk+1
     	} 
  	}
    if (countk==0) 
		{
			alert(" Have you applied here before?Please select Yes or No");
		    return false;
		} 
		
		var j=0;
		var checkj=0;
		
	for (j=0;j<application.applied.length;j++)
  		{
	  	if(application.applied [j].type=="radio" && application.applied[j].name=="applied" && application.applied[j].checked==true)
     		{
       		checkj=checkj+1
     		} 
  		}	
    	if (checkj==0) 
			{
			alert(" select part time or Full time or Temporary");
		    return false;
			} 
			
	if(application.appliedfor.value=="")
	{
	alert("Please Enter position applied for?");
	application.appliedfor.focus;
	return false;
	}
	if(application.startwhen.value=="")
	{
	alert("Please Enter start when");
	application.startwhen.focus;
	return false;
	}
	if(application.other.value=="")
	{
	alert("Please Enter other");
	application.other.focus;
	return false;
	}

		
	// Employee 1 validation
	
	if(application.employer1.value=="")
	{
	alert("Please Enter Employee1");
	application.employer1.focus;
	return false;
	}
	if(application.addressemp1.value=="")
	{
	alert("Please Enter Address of Employee 1");
	application.addressemp1.focus;
	return false;
	}
	if(application.cityemp1.value=="")
	{
	alert("Please Enter City");
	application.cityemp1.focus;
	return false;
	}
	if(application.stateemp1.value=="")
	{
	alert("Please select the State");
	application.stateemp1.focus;
	return false;
	}
	  if(application.zipemp1.value.search(/\d{5}/)==-1)
   		{
      		alert("Please enter valid Zip Code");
      		return false;
   		}
   if(application.phoneemp1.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
      return false;
   }
   if(application.supervisorsemp1.value=="")
	{
	alert("Please Enter Supervisors’ Name");
	application.supervisorsemp1.focus;
	return false;
	}
	if(application.jobtitleemp1.value=="")
	{
	alert("Please Enter Job Title");
	application.jobtitleemp1.focus;
	return false;
	}
	if(application.reasonemp1.value=="")
	{
	alert("Please Enter Reason for leaving");
	application.reasonemp1.focus;
	return false;
	}
	if(application.datesofemployementfrom1.value=="")
	{
	alert("Please Enter Dates of Employement: Form ");
	application.datesofemployementfrom1.focus;
	return false;
	}
	if(application.datesofemployementto1.value=="")
	{
	alert("Please Enter Dates of Employement: To ");
	application.datesofemployementto1.focus;
	return false;
	}
	if(application.salaryhourlyrateemp1.value=="")
	{
	alert("Please Enter Salary or Hourly rate");
	application.salaryhourlyrateemp1.focus;
	return false;
	}
	// Employee 2 validation
		if(application.employer2.value=="")
	/*{
	alert("Please Enter employer2");
	application.employer2.focus;
	return false;
	}
	if(application.addressemp2.value=="")
	{
	alert("Please Enter Address of Employee 2");
	application.addressemp2.focus;
	return false;
	}
	if(application.cityemp2.value=="")
	{
	alert("Please Enter City");
	application.cityemp2.focus;
	return false;
	}
	if(application.stateemp2.value=="")
	{
	alert("Please select the State");
	application.stateemp2.focus;
	return false;
	}
	  if(application.zipemp2.value.search(/\d{5}/)==-1)
   		{
      		alert("Please enter valid Zip Code");
      		return false;
   		}
   if(application.phoneemp2.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
      return false;
   }
   if(application.supervisorsemp2.value=="")
	{
	alert("Please Enter Supervisors’ Name");
	application.supervisorsemp2.focus;
	return false;
	}
	if(application.jobtitleemp2.value=="")
	{
	alert("Please Enter Job Title");
	application.jobtitleemp2.focus;
	return false;
	}
	if(application.reasonemp2.value=="")
	{
	alert("Please Enter Reason for leaving");
	application.reasonemp2.focus;
	return false;
	}
	if(application.datesofemployementfrom2.value=="")
	{
	alert("Please Enter Dates of Employement: Form ");
	application.datesofemployementfrom2.focus;
	return false;
	}
	if(application.datesofemployementto2.value=="")
	{
	alert("Please Enter Dates of Employement: To ");
	application.datesofemployementto2.focus;
	return false;
	}
	if(application.salaryhourlyrateemp2.value=="")
	{
	alert("Please Enter Salary or Hourly rate");
	application.salaryhourlyrateemp2.focus;
	return false;
	}
	if(application.employer3.value=="")
	{
	alert("Please Enter employer3");
	application.employer3.focus;
	return false;
	}
	if(application.addressemp3.value=="")
	{
	alert("Please Enter Address of Employer3");
	application.addressemp3.focus;
	return false;
	}
	if(application.cityemp3.value=="")
	{
	alert("Please Enter City");
	application.cityemp3.focus;
	return false;
	}
	if(application.stateemp3.value=="")
	{
	alert("Please Enter State");
	application.stateemp3.focus;
	return false;
	}
	  if(application.zipemp3.value.search(/\d{5}/)==-1)
   		{
      		alert("Please enter valid Zip Code");
      		return false;
   		}
   if(application.phoneemp3.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
   {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
      return false;
   }
   if(application.supervisorsemp3.value=="")
	{
	alert("Please Enter Supervisors’ Name");
	application.supervisorsemp3.focus;
	return false;
	}
	if(application.jobtitleemp3.value=="")
	{
	alert("Please Enter Job Title");
	application.jobtitleemp3.focus;
	return false;
	}
	if(application.reasonemp3.value=="")
	{
	alert("Please Enter Reason for leaving");
	application.reasonemp3.focus;
	return false;
	}
	if(application.datesofemployementfrom3.value=="")
	{
	alert("Please Enter Dates of Employement: Form ");
	application.datesofemployementfrom3.focus;
	return false;
	}
	if(application.datesofemployementto3.value=="")
	{
	alert("Please Enter Dates of Employement: To ");
	application.datesofemployementto3.focus;
	return false;
	}
	if(application.salaryhourlyrateemp3.value=="")
	{
	alert("Please Enter Salary or Hourly rate");
	application.salaryhourlyrateemp3.focus;
	return false;
	}
	
	
	// EMPLOYMENT APPLICATION PART 2 validation

	if(application.colleges1.value=="")
	 	{
	 		alert("Please Enter college/school attended");
			application.colleges1.focus;
			return false;
	 	}	
		if(application.year1.value==-1)
		{
		alert("Please select the years");
		application.year1.focus;
		return false;
		}
		if(application.grad1.value==-1)
		{
		alert("Please select the year of graduation");
		application.grad1.focus;
		return false;
		}
		if(application.degree1.value=="")
		{
		alert("Please Enter the Degree");
		application.degree1.focus;
		return false;
		}
		/*if(application.colleges2.value=="")
	 	{
	 		alert("Please Enter schools/colleges attended");
			application.colleges2.focus;
			return false;
	 	}
		if(application.year2.value==-1)
		{
		alert("Please select the years");
		application.year2.focus;
		return false;
		}
		if(application.grad2.value==-1)
		{
		alert("Please select the year of graduation");
		application.grad2.focus;
		return false;
		}
		if(application.degree2.value=="")
		{
		alert("Please Enter the Degree");
		application.degree2.focus;
		return false;
		}
		if(application.specialqual.value=="")
		{
		alert("Please Enter the special Qualification");
		application.specialqual.focus;
		return false;
		}
		if(application.license.value.search(/\d{9}/)==-1)
   		{
      		alert("Please enter the Valid License Number");
      		return false;
   		}			
		if(application.driverstate.value=="")
				{
			 	alert("Please Enter the State");
			 	application.driverstate.focus;
			 	return false;
				}
		    if(application.Expiration.value=="")
			{
				alert("Please Enter the Expiration Date");
				application.Expiration.focus;
				return false
			}
		/*var x=0;
		var checkx=0;
		
	for (x=0;x<application.milatary.length;x++)
  		{
	  	if(application.milatary[x].type=="radio" && application.milatary[x].name=="milatary" && application.milatary[x].checked==true)
     		{
       		checkx=checkx+1
     		} 
  		}	
    	if (checkx==0) 
			{
			alert("Are you a veteran of the U.S. Military service?Please select Yes or No");
		    return false;
			}
		var y=0;
		var checky=0;
		
	for(y=0;y<application.felony.length;y++)
  		{
	  	if(application.felony[y].type=="radio" && application.felony[y].name=="felony" && application.felony[y].checked==true)
     		{
       		checky=checky+1
     		} 
  		}	
    	if (checky==0) 
			{
			alert("Have you ever been convicted of a felony?Please select Yes or No");
		    return false;
			} */
			if(application.signature.value=="")
				{
			 	alert("Please Enter the signature");
			 	application.signature.focus;
			 	return false;
				}
			/*	if(application.signdate.value=="")
				{
			 	alert("Please select the date");
			 	application.signdate.focus;
			 	return false;
				}
				
				if(application.remarks.value=="")
				{
			 	alert("Please enter the Remark");
			 	application.remarks.focus;
			 	return false;
				}
				if(application.remarks.value=="")
				{
			 	alert("Please enter the Remark");
			 	application.remarks.focus;
			 	return false;
				}
				if(application.intrviewreportby.value=="")
				{
			 	alert("Please enter the intrview reported by");
			 	application.intrviewreportby.focus;
			 	return false;
				}
		}	*/
	
	//auth relese form validation
	/*function authvalidate(authrelese)
	{
	if(authrelese.appname.value=="")
		{
			alert("Enter the Applicant Name");
			authreles.appname.focus;
			return false;
	
		}
		if(authrelese.name.value=="")
		{
			alert("Enter the print Name");
			authreles.name.focus;
			return false;
	
		}
		if(authrelese.caddress.value=="")
		{
			alert("Enter the current address");
			authreles.caddress.focus;
			return false;
	
		}
			if(authrelese.citystate1.value=="")
			{
			alert("Enter the city,state & zip code");
			authreles.citystate1.focus;
			return false;
			}
					if(authrelese.paddress.value=="")
					{
					alert("Enter the previous address");
					authreles.paddress.focus;
					return false;
	
					}
					if(authrelese.citystate2.value=="")
					{
					alert("Enter the city,state & zip code");
					authreles.citystate2.focus;
					return false;	
					}
					if(authrelese.country.value=="")
					{
					alert("Enter the country");
					authreles.country.focus;
					return false;	
					}
					if(authrelese.ssn.value.search(/\d{3}\-\d{2}\-\d{4}/)==-1)
   						{
      				alert("The SSN number you entered is not valid.\r\nPlease enter a SSN number with the format xxx-xx-xxxx.");
      				return false;
   						}
					if(authrelese.dateof.value=="")
					{
					alert("Please select the date of birth");
					authreles.dateof.focus;
					return false;	
					}
					if(authrelese.license.value.search(/\d{9}/)==-1)
   						{
      					alert("Please enter the Valid License Number");
      					return false;
   						}
						
						if(authrelese.state.value=="")
						{
						alert("Please Enter the State");
						authreles.state.focus;
						return false;	
						}
						if(authrelese.signature.value=="")
						{
						alert("Please Enter signature");
						authreles.signature.focus;
						return false;	
						}
						if(authrelese.date.value=="")
						{
						alert("Please select the date");
						authreles.date.focus;
						return false;	
						}
						if(authrelese.hsgname.value=="")
						{
						alert("please submit HSG witness Name (Please Print)");
						authreles.hsgname.focus;
						return false;	
						} */
						if(authrelese.hsgsignature.value=="")
						{
						alert("please submit HSG witness signature");
						authreles.hsgsignature.focus;
						return false;	
						}
	}
	
	//ethis form validation
	function ethisvalidate(ethis)
	{
		if(ethis.signature.value=="")
		{
			alert("please enter the signature");
			ethis.signature.focus;
			return false;
		}
	  /* if(ethis.name.value=="")
	   {
		   alert("Please enter the Full Name");
		   ethis.signature.focus;
		   return false;
	   }
	   	   if(ethis.title.value=="")
	   {
		   alert("Please enter the Title");
		   ethis.title.focus;
		   return false;
	   }
	   	   if(ethis.branch.value=="")
	   {
		   alert("Please enter the Department or Branch: ");
		   ethis.branch.focus;
		   return false;
	   }
	   if(ethis.sdate.value=="")
	   {
		   alert("Please select the date ");
		   ethis.sdate.focus;
		   return false;
	   } */
	
	}
	//hippa form validation
  function validatehippa(hippa)
  {
  /*	if(hippa.name.value=="")
  		{
  		alert("Enter the Name");
  		hippa.name.focus;
  		return false;
  		} */

	if(hippa.signature.value=="")
  		{
  		alert("Enter the signature");
  		hippa.signature.focus;
  		return false;
  		}
   ?/* if(hippa.date.value=="")
	 {
	 alert("Please select the date");
	 hippa.signature.focus;
	 return false;
	 }*/
  }
  //lpnskills form validation
  
  function validateskills(skills)
  {
  /*if(skills.date.value=="")
  {
  alert("Please select the Date");
  skills.date.focus;
  return false;
  }*/
  }
  function validateskills(skills)
  {
  	/*if(skills.fname.value=="")
  	{
  		alert("Please Enter the First Name");
  		skills.fname.focus;
  		return false;
  	}
  		if(skills.mname.value=="")
  			{
  				alert("Please Enter the Middle Name");
  				skills.mname.focus;
  				return false;
  			}
  	if(skills.lname.value=="")
  	{
  		alert("Please Enter the Last Name");
  		skills.lname.focus;
  		return false;
  	}
	if(skills.lname.value=="")
  	{
  		alert("Please Enter the Last Name");
  		skills.lname.focus;
  		return false;
  	} */
	if(skills.siganture.value=="")
  	{
  		alert("Please Enter the signature");
  		skills.siganture.focus;
  		return false;
  	}
  	/*if(skills.sdate.value=="")
  	{
  		alert("Please Enter the signature");
  		skills.sdate.focus;
  		return false;
  	} */
	
  }
  //mandated form validation
    function validatemanndated(mandated)
		{
			/*if(mandated.infection.value=="")
  			{
  				alert("Please Enter the Infection Control/Bloodborne Pathogens");
  				mandated.infection.focus;
  				return false;
  			}
			
			if(mandated.age.value=="")
  			{
  				alert("Please Enter the Age Specific");
  				mandated.age.focus;
  				return false;
  			}
			if(mandated.esafety.value=="")
  			{
  				alert("Please Enter the Environmental Safety");
  				mandated.esafety.focus;
  				return false;
  			}
			if(mandated.fsafety.value=="")
  			{
  				alert("Please Enter the Fire Safety");
  				mandated.fsafety.focus;
  				return false;
  			}
			if(mandated.hmaterials.value=="")
  			{
  				alert("Please Enter the Hazardous Materials");
  				mandated.hmaterials.focus;
  				return false;
  			}
			if(mandated.hippa.value=="")
  			{
  				alert("Please Enter the Hippa");
  				mandated.hippa.focus;
  				return false;
  			}
			if(mandated.pname.value=="")
  			{
  				alert("Please Enter the Name");
  				mandated.pname.focus;
  				return false;
  			}
			if(mandated.specialty.value=="")
  			{
  				alert("Please Enter the specialty");
  				mandated.specialty.focus;
  				return false;
  			} */
			if(mandated.signature.value=="")
  			{
  				alert("Please Enter the siganture");
  				mandated.signature.focus;
  				return false;
  			}
			/*if(mandated.date.value=="")
  			{
  				alert("Please Enter the Date");
  				mandated.date.focus;
  				return false;
  			} */
			
		}
		//Reference form validation
		function validatereference(reference)
		{
		/*if(reference.name.value=="")
		{
			alert("Enter the Applicant Name");
			reference.name.focus;
			return false;
		}
		if(reference.Discipline.value=="")
		{
			alert("Enter the Discipline");
			reference.Discipline.focus;
			return false;
		}
		if(reference.Facility.value=="")
		{
			alert("Enter the Facility");
			reference.Facility.focus;
			return false;
		}
		if(reference.Employment.value=="")
		{
			alert("select the Dates of Employment");
			reference.Employment.focus;
			return false;
		}
		if(reference.title.value=="")
		{
			alert("Enter the Contact Name (Supervisor) and title");
			reference.title.focus;
			return false;
		}
		if(reference.Numbers.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
   		{
      		alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
      		return false;
   		}
		if(reference.Ext.value.search(/\d{3}/)==-1)
   		{
      		alert("Please enter the Extension");
      		return false;
   		}
		if(reference.pname.value=="")
		{
			alert("please enter the print Name");
			reference.pname.focus;
			return false;
		} */
			if(reference.signature.value=="")
		{
			alert("please enter the signature");
			reference.signature.focus;
			return false;
		}
		/*if(reference.employfrom.value=="")
			{
			alert("please enter the Emplye from");
			reference.employfrom.focus;
			return false;
			}
			if(reference.through.value=="")
				{
				alert("please enter the Emplye through");
				reference.through.focus;
				return false;
				}
				if(reference.comments.value=="")
				{
				alert("please enter the Comments");
				reference.comments.focus;
				return false;
				}*/
				
				if(reference.signature2.value=="")
				 {
					 alert("Plese enter the Electronic signature");
					 reference.signature2.focus;
					 return false;
				 }

}
//standards form validation
function validatestandards(standards)
	{
	  if(standards.signature.value=="Type your Full Name")
			{
			alert("Enter the signature");
			standards.signature.focus;
			return false;
			}
		/*if(standards.date.value=="")
			{
			alert("select the Date");
			standards.date.focus;
			return false;
			} */
	}
	
	// waiver form validation
	
	function validatewaiver(waiver)
	{
		/*if(waiver.name.value=="")
			{
			alert("Enter the Name");
			waiver.name.focus;
			return false;
			} */
			
			if(waiver.signature.value=="")
			{
			alert("Enter the signature");
			waiver.signature.focus;
			return false;
			}
			/*if(waiver.date.value=="")
			{
			alert("please select the date");
			waiver.date.focus;
			return false;
			}*/
			if(waiver.esignature.value=="Type your Full Name")
			{
			alert("Enter the signature");
			waiver.esignature.focus;
			return false;
			}
		/*if(waiver.sdate.value=="")
			{
			alert("please select the date");
			waiver.sdate.focus;
			return false;
			}*/
	}
			// 
			function ethisvalidate(ethis)
			{
				/*if(ethis.name2.value=="")
					{
						alert("Please Enter the print Name");
						ethis.name2.focus;
						return false;
					}*/
					if(ethis.signature.value=="Type your Full Name")
					{
						alert("Please Enter the Signature");
						ethis.signature.focus;
						return false;
						
					}
					/*if(ethis.dates.value=="")
					{
						alert("Please Enter the Date");
						ethis.signature.focus;
						return false;
					}*/
			}
			
			//Application form validation
			
			
			function applications(applicationform)
			 {
				 if(applicationform.name.value=="")
				   {
                      alert("Enter the Name");
					  applicationform.name.focus;
					  return false;
				   }
				   
				  	
	
	  if(applicationform.address.value=="")
				   {
                      alert("Enter Your Address");
					  applicationform.address.focus;
					  return false;
				   }
				   
				    var indexdot;
var indexat;
var email=applicationform.email.value;
indexat=email.indexOf("@");
indexdot=email.indexOf(".");
if(indexat==-1)
	{
		alert("Enter the Valid email Id Ex:yourname@yourmail.com");
		applicationform.email.focus;
		return false;
	}
	
  if(indexdot==-1)
	{
	alert("Enter the Valid email Id Ex:yourname@yourmail.com");
	applicationform.email.focus;
	return false;
	}  
		if(applicationform.homephone.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
   	{
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
      applicationform.homephone.focus;
	  return false;
   	}
				   
				   if(applicationform.specialty.value=="")
				   {
                      alert("Enter your specialty");
					  applicationform.specialty.focus;
					  return false;
				   }
				  
				   if(applicationform.certification.value=="")
				   {
                      alert("Enter Your certification");
					  applicationform.certification.focus;
					  return false;
				   }
				  


				   
				     if(applicationform.fileatt.value=="")
				   {
                      alert("Please upload the updated resume");
					  applicationform.fileatt.focus;
					  return false;
				   }
	
				   
			 }
			 
			 //online application form validation
			 
			 function onlineapplication(onlineapp)
			   {
				   
				   if(onlineapp.fname.value=="")
				   
				   	{
						alert("Please Enter Name");
						onlineapp.fname.focus;
						return false;
					}
		
		       if(onlineapp.address.value=="")
				   
				   	{
						alert("Please Enter the Address");
						onlineapp.address.focus;
						return false;
					}
		     
		    if(onlineapp.city.value=="")
				   
				   	{
						alert("Please Enter the city");
						onlineapp.city.focus;
						return false;
					}
				if(onlineapp.state.value=="")
				   
				   	{
						alert("Please Enter the State");
						onlineapp.state.focus;
						return false;
					}		
		if(onlineapp.postalcode.value=="")
				   
				   	{
						alert("Please Enter the Postal Code");
						onlineapp.postalcode.focus;
						return false;
					}
					
					if(onlineapp.country.value=="")
				   
				   	{
						alert("Please select your country");
						onlineapp.country.focus;
						return false;
					}
					
					  var indexdot;
var indexat;
var email=onlineapp.email.value;
indexat=email.indexOf("@");
indexdot=email.indexOf(".");
if(indexat==-1)
	{
		alert("Enter the Valid email Id Ex:yourname@yourmail.com");
		onlineapp.email.focus;
		return false;
	}
	
  if(indexdot==-1)
	{
	alert("Enter the Valid email Id Ex:yourname@yourmail.com");
	onlineapp.email.focus;
	return false;
	}  


















			   }
			   
			   //Cardic skillchecklist
			   
			   function chicklistcardic(cardic)
			   	{
					
					if(cardic.signature.value=="")
					   {
						alert("Enter the signature");
						cardic.signature.focus;
						return false;
					   }
					if(cardic.signdate.value=="")
					   {
						alert("Enter the Date");
						cardic.signdate.focus;
						return false;
					   }
					if(cardic.phone.value=="")
					   {
						alert("Enter your contact Number");
						cardic.phone.focus;
						return false;
					   }
				}
				
				// critical checklist 
				
                
				function ctricalchecklists(criticalcklist)
			   		{
					
					if(criticalcklist.signature.value=="")
					   {
						alert("Enter the signature");
						criticalcklist.signature.focus;
						return false;
					   }
					if(criticalcklist.signdate.value=="")
					   {
						alert("Enter the Date");
						criticalcklist.signdate.focus;
						return false;
					   }
					if(criticalcklist.phone.value=="")
					   {
						alert("Enter your contact Number");
						criticalcklist.phone.focus;
						return false;
					   }
				} 
				
				//dialysis checklist
				
				function dialysischecklist(dialysis)
			   		{
					
					if(dialysis.signature.value=="")
					   {
						alert("Enter the signature");
						dialysis.signature.focus;
						return false;
					   }
					if(dialysis.signdate.value=="")
					   {
						alert("Enter the Date");
						dialysis.signdate.focus;
						return false;
					   }
					if(dialysis.phone.value=="")
					   {
						alert("Enter your contact Number");
						dialysis.phone.focus;
						return false;
					   }
				}
				
				//emergency checklist
				function emergencychecklist(emergtency)
				   {
					
					if(emergtency.signature.value=="")
					   {
						alert("Enter the signature");
						emergtency.signature.focus;
						return false;
					   }
					if(emergtency.signdate.value=="")
					   {
						alert("Enter the Date");
						emergtency.signdate.focus;
						return false;
					   }
					if(emergtency.phone.value=="")
					   {
						alert("Enter your contact Number");
						emergtency.phone.focus;
						return false;
					   }
					
					}
					
					//labour checklist
					
					function laborchecklist(laborche)
				   {
					
					if(laborche.signature.value=="")
					   {
						alert("Enter the signature");
						laborche.signature.focus;
						return false;
					   }
					if(laborche.signdate.value=="")
					   {
						alert("Enter the Date");
						laborche.signdate.focus;
						return false;
					   }
					if(laborche.phone.value=="")
					   {
						alert("Enter your contact Number");
						laborche.phone.focus;
						return false;
					   }
					}
				
				//medical checklist
				
				function medicalcheck(laborche)
				   {
					
					if(medicalchecklist.signature.value=="")
					   {
						alert("Enter the signature");
						medicalchecklist.signature.focus;
						return false;
					   }
					if(medicalchecklist.signdate.value=="")
					   {
						alert("Enter the Date");
						medicalchecklist.signdate.focus;
						return false;
					   }
					if(medicalchecklist.phone.value=="")
					   {
						alert("Enter your contact Number");
						medicalchecklist.phone.focus;
						return false;
					   }
					}
					
					//nicu checklist
					
					function nicuchecklistge(nicuchecklist)
			          {
						  if(nicuchecklist.signature.value=="")
					   {
						alert("Enter the signature");
						nicuchecklist.signature.focus;
						return false;
					   }
					if(nicuchecklist.signdate.value=="")
					   {
						alert("Enter the Date");
						nicuchecklist.signdate.focus;
						return false;
					   }
					if(nicuchecklist.phone.value=="")
					   {
						alert("Enter your contact Number");
						nicuchecklist.phone.focus;
						return false;
					   }
					  }
								
				
				// operating checklist
				
				function operatingcheckllist(operating)
			          {
						  if(operating.signature.value=="")
					   {
						alert("Enter the signature");
						operating.signature.focus;
						return false;
					   }
					if(operating.signdate.value=="")
					   {
						alert("Enter the Date");
						operating.signdate.focus;
						return false;
					   }
					if(operating.phone.value=="")
					   {
						alert("Enter your contact Number");
						operating.phone.focus;
						return false;
					   }
					  }
					  
					  //Pacu checklist
					  
								
				
				function pacuchecklists(pacuchecklist)
			          {
						  if(pacuchecklist.signature.value=="")
					   {
						alert("Enter the signature");
						pacuchecklist.signature.focus;
						return false;
					   }
					if(pacuchecklist.signdate.value=="")
					   {
						alert("Enter the Date");
						pacuchecklist.signdate.focus;
						return false;
					   }
					if(pacuchecklist.phone.value=="")
					   {
						alert("Enter your contact Number");
						pacuchecklist.phone.focus;
						return false;
					   }
					  }
					  //pediatrics check list
					  
				function pediatricschelists(pediatric)
			          {
						  if(pediatric.signature.value=="")
					   {
						alert("Enter the signature");
						pediatric.signature.focus;
						return false;
					   }
					if(pediatric.signdate.value=="")
					   {
						alert("Enter the Date");
						pediatric.signdate.focus;
						return false;
					   }
					if(pediatric.phone.value=="")
					   {
						alert("Enter your contact Number");
						pediatric.phone.focus;
						return false;
					   }
					  }
					  
					  
					  
					 //picu checklist
					 
					 
					 
					 function picuchecklist(picucheck)
			          {
						  if(picucheck.signature.value=="")
					   {
						alert("Enter the signature");
						picucheck.signature.focus;
						return false;
					   }
					if(picucheck.signdate.value=="")
					   {
						alert("Enter the Date");
						picucheck.signdate.focus;
						return false;
					   }
					if(picucheck.phone.value=="")
					   {
						alert("Enter your contact Number");
						picucheck.phone.focus;
						return false;
					   }
					  }
					  
					  
					  // psychiatric checklist
					  
					   function psychiatricchecklist(psychiatri)
			          {
						  if(psychiatri.signature.value=="")
					   {
						alert("Enter the signature");
						psychiatri.signature.focus;
						return false;
					   }
					if(psychiatri.signdate.value=="")
					   {
						alert("Enter the Date");
						psychiatri.signdate.focus;
						return false;
					   }
					if(psychiatri.phone.value=="")
					   {
						alert("Enter your contact Number");
						psychiatri.phone.focus;
						return false;
					   }
					  }
					  
					  //Rehab checklist 
					  
					   function rehabchecklists(rehabchecklist)
			          {
						  if(rehabchecklist.signature.value=="")
					   {
						alert("Enter the signature");
						rehabchecklist.signature.focus;
						return false;
					   }
					if(rehabchecklist.signdate.value=="")
					   {
						alert("Enter the Date");
						rehabchecklist.signdate.focus;
						return false;
					   }
					if(rehabchecklist.phone.value=="")
					   {
						alert("Enter your contact Number");
						rehabchecklist.phone.focus;
						return false;
					   }
					  }
					  
					  
					  // telemetry checklilst
					  
					   function telemetrychecklist(telemetry)
			          {
						  if(telemetry.signature.value=="")
					   {
						alert("Enter the signature");
						telemetry.signature.focus;
						return false;
					   }
					if(telemetry.signdate.value=="")
					   {
						alert("Enter the Date");
						telemetry.signdate.focus;
						return false;
					   }
					if(telemetry.phone.value=="")
					   {
						alert("Enter your contact Number");
						telemetry.phone.focus;
						return false;
					   }
					  }
					  
					  //online form
					  
					  function onlineforms(onlines)
					   {
						   if(onlines.fname.value=="")
					   {
						alert("Enter your Family name");
						onlines.fname.focus;
						return false;
					   }
					      if(onlines.name.value=="")
					   {
						alert("Enter your First name");
						onlines.name.focus;
						return false;
					   }
					      if(onlines.mname.value=="")
					   {
						alert("Enter your Middle name");
						onlines.mname.focus;
						return false;
					   }
					      if(onlines.mname.value=="")
					   {
						alert("Enter your Middle name");
						onlines.mname.focus;
						return false;
					   }
					        if(onlines.praddress.value=="")
					   {
						alert("Enter your Present Addres");
						onlines.praddress.focus;
						return false;
					   }
					         if(onlines.contactnocell.value=="")
					   {
						alert("Enter your Contact Number(Cell)");
						onlines.contactnocell.focus;
						return false;
					   }
					          if(onlines.dob.value=="")
					   {
						alert("Enter your Date of Birth");
						onlines.dob.focus;
						return false;
					   }
					           if(onlines.citystate.value=="")
					   {
						alert("Enter your City, Town, State or Province");
						onlines.citystate.focus;
						return false;
					   }
					             if(onlines.prnationality.value=="")
					   {
						alert("Enter your Present Nationality");
						onlines.prnationality.focus;
						return false;
					   }
					   
					               if(onlines.gender.value=="")
					   {
						alert("Enter your Gender");
						onlines.gender.focus;
						return false;
					   }
					                if(onlines.cjobtitle.value=="")
					   {
						alert("Enter your Current Job Title");
						onlines.cjobtitle.focus;
						return false;
					   }
					                if(onlines.listprofe.value=="")
					   {
						alert("Enter your List Professional Licenses");
						onlines.listprofe.focus;
						return false;
					   }
					               if(onlines.city1.value=="")
					   {
						alert("Enter the city or Town");
						onlines.city1.focus;
						return false;
					   }
					   			if(onlines.province1.value=="")
					   {
						alert("Enter the Province");
						onlines.province1.focus;
						return false;
					   }
					    			if(onlines.country1.value=="")
					   {
						alert("Enter the country");
						onlines.country1.focus;
						return false;
					   }
					    			if(onlines.from1.value=="")
					   {
						alert("Enter the From (mm/dd/yyy)");
						onlines.from1.focus;
						return false;
					   }
					     			if(onlines.to1.value=="")
					   {
						alert("Enter the To (mm/dd/yyy)");
						onlines.to1.focus;
						return false;
					   }
					   }
					   
					   //Pre Enquiry
					   
					   function preenquery(applicationform)
					     {
							   			if(applicationform.name.value=="")
					   {
						alert("Enter the First Name");
						applicationform.name.focus;
						return false;
					   }
					 
							   			/*if(applicationform.mname.value=="")
					   {
						alert("Enter the Middle Name");
						applicationform.mname.focus;
						return false;
					   }*/
					      			if(applicationform.lname.value=="")
					   {
						alert("Enter the Last Name");
						applicationform.lname.focus;
						return false;
					   }
										  var indexdot;
var indexat;
var email=applicationform.email.value;
indexat=email.indexOf("@");
indexdot=email.indexOf(".");
if(indexat==-1)
	{
		alert("Enter the Valid email Id Ex:yourname@yourmail.com");
		applicationform.email.focus;
		return false;
	}
	
  if(applicationform==-1)
	{
	alert("Enter the Valid email Id Ex:yourname@yourmail.com");
	applicationform.email.focus;
	return false;
	} 
	if(applicationform.mobilephone.value=="")
					   {
						alert("Please Enter your Mobile Number");
						applicationform.mobilephone.focus;
						return false;
					   }   
					   
					     if(applicationform.city.value=="")
					   {
						alert("Please Enter the City");
						applicationform.city.focus;
						return false;
					   }
					    if(applicationform.stateprovince.value=="")
					   {
						alert("Please select the State or provision");
						applicationform.stateprovince.focus;
						return false;
					   }
					   
					   if(applicationform.zipcode.value=="")
					   {
						alert("Please Enter the Zip/postal code");
						applicationform.zipcode.focus;
						return false;
					   }
					    
					   if(applicationform.country.value=="")
					   {
						alert("Please select the country");
						applicationform.country.focus;
						return false;
					   }
					      if(applicationform.address1.value=="")
					   {
						alert("Enter the Address I");
						applicationform.address1.focus;
						return false;
					   }  
					   if(applicationform.jobtype.value=="")
					   {
						alert("Select the types of opportunities you are interested in");
						applicationform.jobtype.focus;
						return false;
					   }  
					  
					/*if(applicationform.password.value=="")
					   {
						alert("Enter the Password");
						applicationform.password.focus;
						return false;
					   }   
					   
					   //password comparision
					   
					   var password1=applicationform.password.value;
					   var password2=applicationform.retypespass.value;
					   
						if(password1!=password2)
						{
								alert("passwords did not match,please type the password again");
								applicationform.retypespass.focus;
								return false;
						}
						   


				

if(applicationform.findus.value=="")
					   {
						alert("How did you find us?");
						applicationform.findus.focus;
						return false;
					   }  */
					
					 
					  


					  

 /*         var num1=applicationform.homephone.value;
		  var num2=applicationform.mobilephone.value;
		  var num3=applicationform.workphone.value;
		  
		  if(num1=="" && num2=="" && num3=="")
			{
			alert("Please Enter any one contact Number");
			return false;
			}			

*/

}
// pop up script
 
		
					   
					   
					   
				