

function cursor(){
   if (fld1.value == "")
    {alert("Insert the name");
    fld1.focus();
	}else{
        if (fld2.value == "")
        {alert("Insert the last name");
        fld2.focus();
		}else{
            if (fld3.value == "")
            {alert("Insert the telephone number");
            fld3.focus();
			}else{
            	if (fld4.value == "")
            	{alert("Insert the email");
            	fld4.focus();
				}else{
            		if (fld5.value == "")
            		{alert("Insert the fax numberfax");
            		fld5.focus();
					}else{
            			if (fld6.value == "")
            			{alert("Insert the application");
            			fld6.focus();
						}
					}
				}
			}
        }
    }
}


function subForm(){
  if (navigator.appName.substring(0,9) == "Microsoft"){
	fld1 = document.all.nome;
	fld2 = document.all.cognome;
	fld3 = document.all.tel;
	fld4 = document.all.mail;
	fld5 = document.all.fax;
	fld6 = document.all.richiesta;
  }else{
	fld1 = document.info.nome;
	fld2 = document.info.cognome;
	fld3 = document.info.tel;
	fld4 = document.info.mail;
	fld5 = document.info.fax;
	fld6 = document.info.richiesta;
  }
  if ((fld1.value == "") || (fld2.value == "") || ((fld3.value == "") && (fld4.value == "")
  	 && (fld5.value == "")) || (fld6.value == "")){
      cursor();
      return;
	  }
	  ans = confirm(
      "Your application is about to be late.");
	    if (ans){
    document.info.submit();
	}
}


function cursor_(){
   if (fld20.value == "")
    {fld20.focus();
    }else{
        if (fld21.value == "")
        {fld21.focus();
        }else{
            if (fld22.value == "")
            {fld22.focus();
            }else{
            	if (fld23.value == "")
            	{fld23.focus();
            	}else{
            		if (fld24.value == "")
            		{fld24.focus();
            		}else{
            			if (fld25.value == "")
            			{fld25.focus();
						return false;
						}
					}
				}
			}
        }
    }
}

function subPren(){
  if (navigator.appName.substring(0,9) == "Microsoft"){
	fld20 = document.all.nome_;
	fld21 = document.all.cognome_;
	fld22 = document.all.tel_;
	fld23 = document.all.mail_;
	fld24 = document.all.numero_posti;
	fld25 = document.all.note;
  }else{
	fld20 = document.prenot.nome_;
	fld21 = document.prenot.cognome_;
	fld22 = document.prenot.tel_;
	fld23 = document.prenot.mail_;
	fld24 = document.prenot.numero_posti;
	fld25 = document.prenot.note;
  }
  if ((fld20.value == "") || (fld21.value == "") || ((fld22.value == "") && (fld23.value == ""))
  	 || (fld24.value == "") || (fld25.value == "")){
      alert("Not all the fields have stayed compiled");
      cursor_();
      return;
	  }
	  ans = confirm(
      "Your booking is about to be late. There we remember that it will come confirmed to the more soon! Thank you.");
	    if (ans){
    document.prenot.submit();
	}
}

