 function testCont(){
   var chislo=/\D/;
   if(document.form1.sername.value == "" ){
    document.form1.sername.select();
    alert("Введите свою фамилию");
	return false;
   }
   if(document.form1.name.value == "" ){
     document.form1.name.select();
     alert("Введите свое имя");
   	 return false;
   }
   if(document.form1.patronymic.value == "" ){
     document.form1.patronymic.select();
     alert("Введите свое отчество");
   	 return false;
   }
   if(document.form1.ethnicity.value == "" ){
     document.form1.ethnicity.select();
     alert("Введите свою национальность");
   	 return false;
   }
   if(document.form1.day.value == "" ){
     document.form1.day.select();
     alert("Введите день своего рождения");
   	 return false;
   }
   if(document.form1.day.value > 31 || form1.day.value <= 0){
     document.form1.day.select();
     alert("Не корректное значение поля 'день рождения'");
   	 return false;
   }
  if(chislo.test(document.form1.day.value)){
     document.form1.day.select();
     alert("Не корректное значение поля 'день рождения'");
   	 return false;
   }
   if(document.form1.year.value == "" ){
     document.form1.year.select();
     alert("Введите год своего рождения");
   	 return false;
   }
   if(document.form1.year.value.length != 4 ){
     document.form1.year.select();
     alert("Не верная длина цифры вашего года рождения");
   	 return false;
   }
  if(chislo.test(document.form1.year.value)){
     document.form1.year.select();
     alert("Не корректное значение поля 'год рождения'");
   	 return false;
   }

   if(document.form1.position.value == "" ){
     document.form1.position.select();
     alert("Заполните поле семейное положение");
   	 return false;
   }
   if(document.form1.children.value == "" ){
     document.form1.children.select();
     alert("Заполните поле наличие детей и их возрост");
   	 return false;
   }
   if(document.form1.adres.value == "" ){
     document.form1.adres.select();
     alert("Введите адрес по прописке");
   	 return false;
   }
   if(document.form1.adresF.value == "" ){
     document.form1.adresF.select();
     alert("Введите адрес проживания");
   	 return false;
   }
   if(document.form1.tel.value == "" ){
     document.form1.tel.select();
     alert("Введите контактный телефон");
   	 return false;
   }
   if(document.form1.institution.value == "" ){
     document.form1.institution.select();
     alert("Заполните поле учебное заведение");
   	 return false;
   }
   if(document.form1.year2.value == "" ){
     document.form1.year2.select();
     alert("Введите год начала обучения");
   	 return false;
   }   
   if(document.form1.year2.value.length != 4 ){
     document.form1.year2.select();
     alert("Не верная длина цифры года начала обучения");
   	 return false;
   }
   if(chislo.test(document.form1.year2.value)){
     document.form1.year.select();
     alert("Не корректное значение поля 'год начала обучения'");
   	 return false;
   }
   if(document.form1.year3.value == "" ){
     document.form1.year3.select();
     alert("Введите год окончания обучения");
   	 return false;
   }
   if(document.form1.year3.value.length != 4 ){
     document.form1.year3.select();
     alert("Не верная длина цифры года окончания обучения");
   	 return false;
   }
   if(chislo.test(document.form1.year3.value)){
     document.form1.year.select();
     alert("Не корректное значение поля 'год окончания обучения'");
   	 return false;
   }
   return true;
 }

 function testCont2(){
   var chislo=/\D/;

   if(document.form2.family.value == ""){
    document.form2.family.select();
    alert("Заполните поле ближайшие родственники");
	return false;
   }

   if(document.form2.job1.value != "" && document.form2.jyear11.value == ""){
    document.form2.jyear11.select();
    alert("Введите год принятия на работу");
	return false;
   }

   if(document.form2.job1.value != "" && document.form2.jyear11.value.length != 4 ){
     document.form2.jyear11.select();
     alert("Не верная длина цифры год начала работы");
   	 return false;
   }

  if(document.form2.job1.value != "" && chislo.test(document.form2.jyear11.value)){
     document.form2.jyear11.select();
     alert("Не корректное значение поля год начала работы");
   	 return false;
   }

   if(document.form2.job1.value != "" && document.form2.jyear12.value == ""){
    document.form2.jyear12.select();
    alert("Введите год увольнения");
	return false;
   }


   if(document.form2.job1.value != "" && document.form2.jyear12.value.length != 4 ){
     document.form2.jyear12.select();
     alert("Не верная длина цифры год увольнения");
   	 return false;
   }

  if(document.form2.job1.value != "" && chislo.test(document.form2.jyear12.value)){
     document.form2.jyear12.select();
     alert("Не корректное значение поля год увольнения");
   	 return false;
   }

   if(document.form2.job1.value != "" && document.form2.dolg1.value == ""){
    document.form2.dolg1.select();
    alert("Введите свою должность");
	return false;
   }

   if(document.form2.job1.value != "" && document.form2.coment1.value == ""){
    document.form2.coment1.select();
    alert("Какими конкретно вопросами Вы занимались?");
	return false;
   }

   if(document.form2.job2.value != "" && document.form2.jyear21.value == ""){
    document.form2.jyear21.select();
    alert("Введите год принятия на работу");
	return false;
   }

   if(document.form2.job2.value != "" && document.form2.jyear21.value.length != 4 ){
     document.form2.jyear21.select();
     alert("Не верная длина цифры год начала работы");
   	 return false;
   }

  if(document.form2.job2.value != "" && chislo.test(document.form2.jyear21.value)){
     document.form2.jyear21.select();
     alert("Не корректное значение поля год начала работы");
   	 return false;
   }

   if(document.form2.job2.value != "" && document.form2.jyear22.value == ""){
    document.form2.jyear22.select();
    alert("Введите год увольнения");
	return false;
   }

   if(document.form2.job2.value != "" && document.form2.jyear22.value.length != 4 ){
     document.form2.jyear22.select();
     alert("Не верная длина цифры год увольнения");
   	 return false;
   }

  if(document.form2.job2.value != "" && chislo.test(document.form2.jyear22.value)){
     document.form2.jyear22.select();
     alert("Не корректное значение поля год увольнения");
   	 return false;
   }

   if(document.form2.job2.value != "" && document.form2.dolg2.value == ""){
    document.form2.dolg2.select();
    alert("Введите свою должность");
	return false;
   }

   if(document.form2.job2.value != "" && document.form2.coment2.value == ""){
    document.form2.coment2.select();
    alert("Какими конкретно вопросами Вы занимались?");
	return false;
   }

   if(document.form2.job3.value != "" && document.form2.jyear31.value == ""){
    document.form2.jyear31.select();
    alert("Введите год принятия на работу");
	return false;
   }

   if(document.form2.job3.value != "" && document.form2.jyear31.value.length != 4 ){
     document.form2.jyear31.select();
     alert("Не верная длина цифры год начала работы");
   	 return false;
   }

  if(document.form2.job3.value != "" && chislo.test(document.form2.jyear31.value)){
     document.form2.jyear31.select();
     alert("Не корректное значение поля год начала работы");
   	 return false;
   }

   if(document.form2.job3.value != "" && document.form2.jyear32.value == ""){
    document.form2.jyear32.select();
    alert("Введите год увольнения");
	return false;
   }

   if(document.form2.job3.value != "" && document.form2.jyear32.value.length != 4 ){
     document.form2.jyear32.select();
     alert("Не верная длина цифры год увольнения");
   	 return false;
   }

  if(document.form2.job3.value != "" && chislo.test(document.form2.jyear32.value)){
     document.form2.jyear32.select();
     alert("Не корректное значение поля год увольнения");
   	 return false;
   }

   if(document.form2.job3.value != "" && document.form2.dolg3.value == ""){
    document.form2.dolg3.select();
    alert("Введите свою должность");
	return false;
   }

   if(document.form2.job3.value != "" && document.form2.coment3.value == ""){
    document.form2.coment3.select();
    alert("Какими конкретно вопросами Вы занимались?");
	return false;
   }

   if(document.form2.hobby.value == ""){
    document.form2.hobby.select();
    alert("Заполните поле ваши увлечения");
	return false;
   }

   if(document.form2.oklad.value == ""){
    document.form2.oklad.select();
    alert("Какую работу вы хотели бы выполнять?");
	return false;
   }

   return true;
 }

 function job(){
 if(job2.style.display=='inline')
 {
    job2.style.display='none';
  }else{
    job2.style.display='inline';
  }
 }

 function jobs(){
  if(job3.style.display=='inline')
  {
    job3.style.display='none';
  }else{
    job3.style.display='inline';
  }
 }

function test(){
  if(document.formz.name.value == ""){
   document.formz.name.select();
   alert("Введите Ф.И.О.");
   return false;
  }
  if(document.formz.mail.value == "" ){
   document.formz.mail.select();
   alert("Введите E-mail");
   return false;
  }
  if(document.formz.mail.value.indexOf("@") <= 0 || document.formz.mail.value.indexOf("@") == document.formz.mail.value.length - 1 ){
   document.formz.mail.select();
   alert("Введите корректный E-mail");
   return false;
  }
  if(document.formz.phone.value == ""){
   document.formz.phone.select();
   alert("Введите контактный телефон");
   return false;
  }
}