function showerror() { 
 alert("email введен неправильно. Вы не сможете получить ссылку на результат теста."); 
 } 
 function checkmail() 
 { 
 txt=document.enterdata.User_Email.value; 
 txtn=document.enterdata.User_Name.value; 
  if (txt == "") {  alert("Укажите ваш email для получения ссылки на результаты теста.");  return(false)  } 
 if (txtn == "") {  alert("Вы забыли указать Ваше имя.");  return(false) } 

  if (txt.indexOf(".") == -1) { 
 alert("В email пропущена \".\""); 
 return(false) 
 } 
  dog = txt.indexOf("@"); 
 if (dog == -1) { 
 alert("В email пропущен символ \"@\"."); 
 return(false) 
 } 
  if ((dog < 1) || (dog > txt.length - 5)) { 
 showerror(); 
 return(false) 
 } 
  if ((txt.charAt(dog - 1) == '.') || (txt.charAt(dog + 1) == '.')) { 
 showerror(); 
 return(false) 
 } 
 } 
 
function Display(which) {
  mn=document.getElementById("MamaNeznay");
  mr=document.getElementById("MamaRanshe");
  ms=document.getElementById("MamaSrok");
  mp=document.getElementById("MamaPosge");
  mz=document.getElementById("MamaZachali");
 if (which=="MamaNeznay") mn.style.display="block";
    else mn.style.display="none";
 if (which=="MamaRanshe") mr.style.display="block";
    else mr.style.display="none";
  if (which=="MamaSrok") ms.style.display="block";
    else ms.style.display="none";
 if (which=="MamaPosge") mp.style.display="block";
    else mp.style.display="none";
 if (which=="MamaZachali") mz.style.display="block";
    else mz.style.display="none";
}
function Display1(which) {
  mn=document.getElementById("LastChildNeznay");
  mr=document.getElementById("LastChildRanshe");
  ms=document.getElementById("LastChildSrok");
  mp=document.getElementById("LastChildPosge");
  mz=document.getElementById("LastChildZachali");
 if (which=="LastChildNeznay") mn.style.display="block";
    else mn.style.display="none";
 if (which=="LastChildRanshe") mr.style.display="block";
    else mr.style.display="none";
  if (which=="LastChildSrok") ms.style.display="block";
    else ms.style.display="none";
 if (which=="LastChildPosge") mp.style.display="block";
    else mp.style.display="none";
 if (which=="LastChildZachali") mz.style.display="block";
    else mz.style.display="none";
}
function Display2(which) {
  y1=document.getElementById("yes1");
  n1=document.getElementById("no1");
  n2=document.getElementById("no2");
  n3=document.getElementById("no3");
  n4=document.getElementById("no4");
 if (which=="yes") y1.style.display="block";
    else y1.style.display="none";
 if (which=="no") 
	{
	n1.style.display="block";
	n2.style.display="block";
	n3.style.display="block";
	n4.style.display="block";
	}
    else 
	{
	n1.style.display="none";
	n2.style.display="none";
	n3.style.display="none";
	n4.style.display="none";
	}
}

function sendmail(){
    valid = true;
txt=document.formmail.email.value; 
 txtn=document.formmail.name.value; 
  if (txt == "") {  alert("Вы забыли указать Ваш E-mail .");  valid = false;  } 
  else{
    if (txtn == "") {  alert("Вы забыли указать Ваше имя .");   valid = false;}
     else{
        if (txt.indexOf(".") == -1) { 
 alert("В Email пропущена \".\""); 
 valid = false;
 } 
  dog = txt.indexOf("@"); 
 if (dog == -1) { 
 alert("В Email пропущен символ \"@\"."); 
 valid = false;
 } 
  if ((dog < 1) || (dog > txt.length - 5)) { 
 showerror(); 
 valid = false;
 } 
  if ((txt.charAt(dog - 1) == '.') || (txt.charAt(dog + 1) == '.')) { 
 showerror(); 
 valid = false;
 } 
     } 
  }
  
  
  if(valid) {document.formmail.submit();}
}
function displ_prodlenie(which) {
  mn=document.getElementById("prodli_calend");
 if (which=="prodli_calend") mn.style.display="block";
    else mn.style.display="none";
}

