/*
CONTROLLO EMAIL NEWSLETTER
*/
  function controllo_Email() {
     // Variabili associate ai campi del modulo
     var email = document.newsletter.email.value;
     // Espressione regolare dell'email
     var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
        //Effettua il controllo sul campo EMAIL
        if (!email_reg_exp.test(email) || (email == "") || (email == "undefined")) {
           alert("Tilføj korrekt e-mail adresse");
           document.newsletter.email.select();
           return false;
        }
 
       //INVIA IL MODULO
	else{
	return true;
	}

  }

 
/*
CONTROLLO CAMPI INFO
*/
  function controllo_Info(info) {
     // Variabili associate ai campi del modulo
     var nome = document.info.nome.value;
     var msg = document.info.messaggio.value;
     var email = document.info.email.value;
     
     
         if (nome=="") {
	   alert("Tilføj fuld navn. Tak");
	   document.info.nome.value = "";
	   document.info.nome.focus();
	   return false;
	}
	
	        if (msg=="") {
	   alert("Tilføj ansøgningen. Tak");
	   document.info.messaggio.value = "";
	   document.info.messaggio.focus();
	   return false;
	}
     // Espressione regolare dell'email
     var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
        //Effettua il controllo sul campo EMAIL
        if (!email_reg_exp.test(email) || (email == "") || (email == "undefined")) {
           alert("Tilføj korrekt e-mail adresse");
           document.info.email.select();
           return false;
        }

        //INVIA IL MODULO
	else{
	document.info.submit()
	}
  }

/*
CONTROLLO CAMPI PRENOTAZIONE

  function controllo_prenotazione(prenotazione) {
     // Variabili associate ai campi del modulo
     var nome = document.prenotazione.first_name.value;
     var msg = document.prenotazione.last_name.value;
     var email = document.prenotazione.email.value;
     
 //VALIDAZIONE RADIO BUTTON
	// set var radio_choice to false
	var radio_choice = false;
	
	// Loop from zero to the one minus the number of radio button selections
	for (counter = 0; counter < prenotazione.os1.length; counter++)
	{
	// If a radio button has been selected it will return true
	// (If not it will return false)
	if (prenotazione.os1[counter].checked)
	radio_choice = true; 
	}
	
	if (!radio_choice)
	{
	// If there were no selections made display an alert box 
	alert("Selezionare tramite chi hai fatto la prenotazione")
	return (false);
	}
    
         if (nome=="") {
	   alert("Inserire il nome, Grazie.");
	   document.prenotazione.first_name.value = "";
	   document.prenotazione.first_name.focus();
	   return false;
	}
	
	        if (msg=="") {
	   alert("Inserire il cognome, Grazie.");
	   document.prenotazione.last_name.value = "";
	   document.prenotazione.last_name.focus();
	   return false;
	}
     // Espressione regolare dell'email
     var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
        //Effettua il controllo sul campo EMAIL
        if (!email_reg_exp.test(email) || (email == "") || (email == "undefined")) {
           alert("Inserire un indirizzo email corretto.");
           document.prenotazione.email.select();
           return false;
        }



        //INVIA IL MODULO
	else{
	document.prenotazione.submit();
	}
  }
*/
