<!-- Inizio sezione controllo Form


// Copyright (C)1999 by Andrea Romaldo Software Development all Rights Reserved.




var emailAddress="";



function toName()

   {

   var toNameval=document.forms[0].elements[2].value;



   }




function Reset()

   {

   document.forms[0].elements[3].value = "";                                                                                   // nome

   document.forms[0].elements[4].value = "";                                                                                   // email

   document.forms[0].elements[5].value = "";                                                                                   // commento

   document.forms[0].elements[3].focus();

   }





function submitForms()

   {

   if ( (isName() ) && (isEmail()) && (isComment())  )

      if (confirm("\n\nClicca su OK per spedire la pagina.\n\nClicca su ANNULLA per ricominciare."))

         { 


         return true;

         }

      else

         {

         alert("\nRicompila il modulo.");

         return false;      

         }

   else

      return false;

   }




function isName()

   {

   var str = document.forms[0].elements[3].value;



   if (str == "")

      {

      alert("\nNon hai inserito il tuo nome.\n\nPer favore inserisci il tuo nome.")

      document.forms[0].elements[3].focus();

      return false;

      }

   // La funzione è false se i caratteri inseriti non sono a-z, A-Z, o uno spazio.

   for (var i = 0; i < str.length; i++) 

      {

      var ch = str.substring(i, i + 1);

      if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != ' ') 

         {

         alert("\nIl tuo nome non può contenere che lettere e spazi.\n\nPer favore inserisci correttamente il tuo nome.");

         document.forms[0].elements[3].select();

         document.forms[0].elements[3].focus();

         return false;

         }

      }

   return true;

   }



// Verifica il campo E-MAIL .

function isEmail()

   {

   emailAddress=document.forms[0].elements[4].value;

   // La funzione è false se il campo e-mail non è compilato.

   if (document.forms[0].elements[4].value == "") 

      {

      alert("\nNon hai inserito il tuo indirizzo e-mail.\n\nPer favore inseriscilo.")

      document.forms[0].elements[4].focus();

      return false; 

      }

   // Return false if e-mail field does not contain a '@' and '.' .

   if (document.forms[0].elements[4].value.indexOf ('@',0) == -1 || 

       document.forms[0].elements[4].value.indexOf ('.',0) == -1)

      {

      alert("\nIl tuo E-mail deve contenere \"@\" e uno o più \".\"\n\nPer favore inserisci correttamente il tuo indirizzo e-mail.")

      document.forms[0].elements[4].select();

      document.forms[0].elements[4].focus();

      return false;

      }


   else

      {

      toName();

      return true;

      }

   }





// Verifica il campo COMMENTO.

function isComment()

   {

   // Se il campo commento viene lasciato in bianco,viene chiesta la conferma se il commento non ci deve essere.

   if (document.forms[0].elements[5].value == "")

      {

      if (confirm("\nSei sicuro di voler lasciare questa pagina senza un commento?\n\nClicca su ANNULLA per includere un commento.\n\nClicca su OK se non vuoi inserire alcun commento.")) 

         return true

      else

         {

         document.forms[0].elements[5].focus();

         return false;      

         }

      }

   else

      return true   

   }








// Fine sezione controllo form 




function scroll_status (seed)
{
        var msg = "Radicondoli is in Italy in tuscany center near Siena. Good By to Radicondoli ";
        var out = " ";
        var c   = 1;

        if (150 < seed) {
                seed--;
                var cmd="scroll_status(" + seed + ")";
                timerTwo=window.setTimeout(cmd,100);
        }
        else if (seed <= 150 && 0 < seed) {
                for (c=0 ; c < seed ; c++) {
                        out+=" ";
                }
                out+=msg;
                seed--;
                var cmd="scroll_status(" + seed + ")";
                window.status=out;
                timerTwo=window.setTimeout(cmd,100);
        }
        else if (seed <= 0) {
                if (-seed < msg.length) {
                        out+=msg.substring(-seed,msg.length);
                        seed--;
                        var cmd="scroll_status(" + seed + ")";
                        window.status=out;
                        timerTwo=window.setTimeout(cmd,100);
                }
                else {
                        window.status=" ";
                        timerTwo=window.setTimeout("scroll_status(150)",100);
                }
        }
}



// -- Fine del primo codice JavaScript  -------------- 





-->

