 if (navigator.appVersion.lastIndexOf('Win') != -1) newline="\r\n"
      else newline="\n";

function emailCheck() {
  txt=document.form1.Email.value;
  if (txt.indexOf("@")<3){
   alert("Attenzione il campo email è obbligatorio. - Email filed is mandatory");
   return false;
  }
  return true;
 }

function noEntry(){
  mt=document.form1.Nome.value;
  if ((mt.length<1)||(mt.substring(0,6)=="******")){
   alert("Attenzione il campo nome è obbligatorio. - Name fiels is mandatory");
   return false;
  }
  return true;
 }
 var nr=0;

  function numericCheckFax(){
  nr1=document.form1.Fax.value;
  flg=0;
  str="";
  spc=""
  arw="";
  for (var i=0;i<nr1.length;i++){
   cmp="0123456789"
   tst=nr1.substring(i,i+1)
   if (cmp.indexOf(tst)<0){
    flg++;
    str+=" "+tst;
    spc+=tst;
    arw+="^";
   }
   else{arw+="_";}
  }
  if (flg!=0){
   if (spc.indexOf(" ")>-1) {
    str+=" and a space";
    }
   alert("Attenzione nel campo Fax sono accettati solo numeri. - In this field you can enter only numbers.");
   return false;
  }
  return true;
 }

 function numericCheckTelefono(){
  nr1=document.form1.Telefono.value;
  flg=0;
  str="";
  spc=""
  arw="";
  for (var i=0;i<nr1.length;i++){
   cmp="0123456789"
   tst=nr1.substring(i,i+1)
   if (cmp.indexOf(tst)<0){
    flg++;
    str+=" "+tst;
    spc+=tst;
    arw+="^";
   }
   else{arw+="_";}
  }
  if (flg!=0){
   if (spc.indexOf(" ")>-1) {
    str+=" and a space";
    }
   alert("Attenzione nel campo Telefono sono accettati solo numeri. - In this field you can enter only numbers.");
   return false;
  }
  return true;
 }

 function numericCheckCap(){
  nr1=document.form1.CAP.value;
  flg=0;
  str="";
  spc=""
  arw="";
  for (var i=0;i<nr1.length;i++){
   cmp="0123456789"
   tst=nr1.substring(i,i+1)
   if (cmp.indexOf(tst)<0){
    flg++;
    str+=" "+tst;
    spc+=tst;
    arw+="^";
   }
   else{arw+="_";}
  }
  if (flg!=0){
   if (spc.indexOf(" ")>-1) {
    str+=" and a space";
    }
   alert("Attenzione nel campo CAP sono accettati solo numeri. - In this field you can enter only numbers.");
   return false;
  }
  return true;
 }
