function Validator(theForm)
{  
  
  
   if (theForm.citta.value == "")
  {
     alert("Il campo \"Cittą\" e' obbligatorio!");
     theForm.citta.focus();
     return (false);
  }
  
  
  if (theForm.Regione.value == "")
  {
     alert("Il campo \"Regione\" e' obbligatorio!");
     theForm.Regione.focus();
     return (false);
  }
  
  if (theForm.Provincia.value == "")
  {
     alert("Il campo \"Provincia\" e' obbligatorio!");
     theForm.Provincia.focus();
     return (false);
  }
  
  
  if ((theForm.DataInizio.value == "")||(theForm.DataInizio.value == "gg/mm/aa"))
  {
     alert("Il campo \"DataInizio\" e' obbligatorio!");
     theForm.DataInizio.focus();
     return (false);
  }

  if ((theForm.DataFine.value == "")||(theForm.DataFine.value == "gg/mm/aa"))

  {
    alert("Il campo \"DataFine\" e' obbligatorio!");
    theForm.DataFine.focus();
    return (false);
  }
  
  
  if (theForm.TitoloConcerto.value == "")
  {
    alert("Il campo \"TitoloConcerto\" e' obbligatorio!");
    theForm.TitoloConcerto.focus();
    return (false);
  }

    
   if (theForm.NomeGruppo.value == "")
  {
    alert("Il campo \"NomeGruppo\" e' obbligatorio!");
    theForm.NomeGruppo.focus();
    return (false);
  }

  if (theForm.wwwAddress.value == "")
  {
     www= "www.yeaah.com/live/info.asp";
     theForm.wwwAddress.value=www;   
     return (true);
  }
  
  
   if (theForm.Orgcom.value == "")
  {
    alert("Il campo \"Organizer-Contact-City\" e' obbligatorio!");
    theForm.Orgcom.focus();
    return (false);
  }


  	 if (theForm.Email.value == "")
  {
    alert("Il campo \"Email\" e' obbligatorio!");
    theForm.Email.focus();
    return (false);
  }
  
  
  //controllo e-mail

	  var flag;
      var flag1;
      var flag2;
      
      var email = new String(theForm.Email.value);
	   var y = email;
	   flag = false;
	   flag1 = false;
	   flag2 = false;
	  

	   var email;
	 	email = theForm.Email.value
	    
	   if (email.length<7)
  	   {	alert("L'indirizzo E-MAIL ha una lunghezza errata!");
	        theForm.Email.focus();
	        return(false);
	   }  
	     
	 	for(var i=0; i<email.length; i++)
	 		{ //alert(y.charAt(i))
	 			if (((y.charAt(i) >= "0") && (y.charAt(i) <= "9")) || ((y.charAt(i) >= "a") && (y.charAt(i) <= "z")) || (y.charAt(i) == "@") || (y.charAt(i) == ".") || (y.charAt(i) == "_")) 
	 			{	flag = true
	 			}
	 	      else
	 		     {
	 				alert("L'indirizzo Email contiene caratteri non validi.");
	 				theForm.Email.focus();
	 			    return(false);
	 			  }
	 			if(y.charAt(i) == "@")
	 			{	flag1 = true;	
	 			}
				
		 		if(y.charAt(i) == ".")
		 			{	flag2 = true;
	 				}
	 		}
	 		
	 		if ((!flag1 == true) || (!flag2 == true))
	 				{	alert("L'indirizzo E-MAIL non e' corretto !");
	 			       theForm.Email.focus();
	 			       return(false);
	 		       } 	 		


  

  return (true);
}

