 if (navigator.appVersion.lastIndexOf('Win') != -1) newline="\r\n"

      else newline="\n";
function decodify()

{

	{ 

              	document.forms[1].encoding="text/plain";



			document.forms[1].method="post";



                	document.forms[1].action="mailto:anxanum@anxanumviaggi.it?Subject=Contatto Dal Sito Anxanum Viaggi";

	}



	var i=0; var c=0; var d=0;var e=0;var u=""; 

		



	for ( i=0; i<document.form1[1].value.length; ++i)

		{

		c=document.form1[1].value.charAt(i);

		if (c== "\r" || c == newline) msgWindow.document.write ("<BR>")

		else if (c== "+" ) msgWindow.document.write (" ")

		else if (c== "&" ) msgWindow.document.write ("<P>")

		else if (c == "%")

					 { 

					d = document.form1.txt.value.charAt(i+1);

					e = document.form1.txt.value.charAt(i+2);

					i=i+2;

					if (d == "2" && e == "4") msgWindow.document.write ("$")

					else if (d == "E" && e == "D") msgWindow.document.write ("&iacute")

					else if (d == "F" && e == "A") msgWindow.document.write ("&uacute")

					else if (d == "F" && e == "3") msgWindow.document.write ("&oacute")

					else if (d == "E" && e == "9") msgWindow.document.write ("&eacute")

					else if (d == "E" && e == "2") msgWindow.document.write ("&acirc")

					else if (d == "C" && e == "7") msgWindow.document.write ("&Ccedil")

					else if (d == "E" && e == "7") msgWindow.document.write ("&ccedil")

					else if (d == "F" && e == "5") msgWindow.document.write ("&otilde")

					else if (d == "E" && e == "3") msgWindow.document.write ("&atilde")

					else if (d == "E" && e == "A") msgWindow.document.write ("&ecirc")

					else if (d == "E" && e == "1") msgWindow.document.write ("&aacute")

					else if (d == "E" && e == "0") msgWindow.document.write ("&agrave")

					else if (d == "C" && e == "3") msgWindow.document.write ("&Atilde")

					else if (d == "D" && e == "5") msgWindow.document.write ("&Otilde")

					else if (d == "C" && e == "A") msgWindow.document.write ("&Ecirc")

					else if (d == "C" && e == "2") msgWindow.document.write ("&Acirc")

					else if (d == "C" && e == "1") msgWindow.document.write ("&Aacute")

					else if (d == "C" && e == "D") msgWindow.document.write ("&Iacute")

					else if (d == "D" && e == "3") msgWindow.document.write ("&Oacute")

					else if (d == "C" && e == "9") msgWindow.document.write ("&Eacute")

					else if (d == "C" && e == "0") msgWindow.document.write ("&Agrave")

					else if (d == "C" && e == "8") msgWindow.document.write ("&Egrave")

					else if (d == "F" && e == "4") msgWindow.document.write ("&ocirc")

					else if (d == "D" && e == "4") msgWindow.document.write ("&Ocirc")

					else if (d == "7" && e == "C") msgWindow.document.write ("|")

					else if (d == "5" && e == "C") msgWindow.document.write ("|")

					else if (d == "B" && e == "A") msgWindow.document.write ("o.")

					else if (d == "A" && e == "A") msgWindow.document.write ("a.")

					else if (d == "7" && e == "E") msgWindow.document.write ("~")

					else if (d == "3" && e == "F") msgWindow.document.write ("?")

					else if (d == "D" && e == "A") msgWindow.document.write ("&Uacute")

					else if (d == "E" && e == "8") msgWindow.document.write ("&egrave")

					else if (d == "2" && e == "F") msgWindow.document.write ("/")

					else if (d == "2" && e == "B") msgWindow.document.write ("+")

					else if (d == "2" && e == "C") msgWindow.document.write (",")

					else if (d == "0" && e == "D") msgWindow.document.write ("<BR>")

					else if (d == "2" && e == "5") msgWindow.document.write ("%")

					else if (d == "2" && e == "1") msgWindow.document.write ("!")

					else if (d == "3" && e == "D") msgWindow.document.write ("=")

					else if (d == "3" && e == "C") msgWindow.document.write ("<")

					else if (d == "3" && e == "E") msgWindow.document.write (">")

					else if (d == "2" && e == "8") msgWindow.document.write ("(")

					else if (d == "2" && e == "9") msgWindow.document.write (")")

					else if (d == "2" && e == "7") msgWindow.document.write ("'")

					else if (d == "2" && e == "2") msgWindow.document.write ('"')

					else if (d == "2" && e == "3") msgWindow.document.write ("#")

					else if (d == "2" && e == "6") msgWindow.document.write ("&")

					else if (d == "3" && e == "B") msgWindow.document.write (";")

					else if (d == "3" && e == "A") msgWindow.document.write (":")

					

					}

		

		}

 

  doit(); 
  
  }


function emailCheck() {
  txt=document.form1.mail.value;
  if (txt.indexOf("@")<3){
   alert("Attenzione il campo email è obbligatorio.");
   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.");
   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.");
   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.");
   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.");
   return false;
  }
  return true;
 }

function doit() {
  
  setTimeout("document.location = 'ok.asp';",1000);
}
