//js document

function check_zakaz() {

var arr_check = [true, true];

  if (document.forms.zakaz_form.email.value == '') {
  document.all['err1'].style.visibility='visible'; 
  arr_check[0] = false;
  } 
  else {
  document.all['err1'].style.visibility='hidden';
  }

  if (document.forms.zakaz_form.phone.value == '') {
  document.all['err2'].style.visibility='visible'; 
  arr_check[1] = false;
  } 
  else {
  document.all['err2'].style.visibility='hidden';
  }  
  
  indicator = true;
 j = 0;
  while (indicator == true) 
  {
      for (i=0;i<arr_check.length;i++) 
      {
        if (arr_check[i] == true) 
        {
          indicator = true;
        }
        else 
        {
          indicator = false;
          document.all['errors_found'].style.visibility='visible';
          //document.anchors[0].focus();
          document.forms.zakaz_form.top.focus();
          return false;
        }
      }
    j = j + 1;
    if (j == arr_check.length) 
    {
     return true;
    }      
  } 
  
}