$(function()
	{

				// Set up #pane4 and the links which scrollTo elements within it
				
                var $pane = $('#dizionario');
				$pane.jScrollPane({animateTo:true});
				$('area.scroll-to-element').bind(
					'click',
					function()
					{
						var targetElementSelectorString = $(this).attr('rel');
						$pane[0].scrollTo(targetElementSelectorString);
						return false;
					}
				);
});

//Cambia l'immagine al passaggio del mouse
function cambia(ImageName,ImageFile){
    document.getElementById(ImageName).src = ImageFile;
  }
//-->
function PopupWindow(myURL, myHeight, myWidth) {
	var w_options="alwaysLowered=yes,toolbar=no,menubar=0,scrollbars=yes,resizable=no,status=no,location=no,height=" + myHeight + ",width=" + myWidth;
	var w_name="copywin3";
	w_win=window.open(myURL, w_name, w_options);
		}
function privacy() {
javascript:PopupWindow('informativa.pdf','500','700');
			}
			
function Modulo() {
     var cognome = document.modulo.cognome.value;
     var nome = document.modulo.nome.value;
	 var contatto = document.modulo.contatto.value;
	 var contatto2 = document.modulo.contatto2.value;
	 var privacy_check = document.modulo.privacy_check.checked;

        if ((cognome == "") || (cognome == "undefined") || (cognome == " ")) {
           alert("Inserire un Cognome.");
           document.modulo.cognome.focus();
           return false;
        }
        else if ((nome == "") || (nome == "undefined") || (nome == " ")) {
           alert("Inserire un Nome.");
           document.modulo.nome.focus();
           return false;
        }

       else if ((contatto == "") || (contatto == "undefined") || (contatto == " ")) {
           alert("Inserire un numero di telefono.");
           document.modulo.contatto.focus();
           return false;
        }
	   else if ((contatto2 == "") || (contatto2 == "undefined") || (contatto2 == " ")) {
           alert("Inserire un indirizzo e-mail.");
           document.modulo.contatto2.focus();
           return false;
        }
	   else if (privacy_check == false) {
           alert("Devi leggere ed accettare le condizioni sulla privacy.");
           document.modulo.privacy_check.focus();
           return false;
        }
 else {
   document.modulo.submit();
        }
  }
  
function Modulo_prev() {
     var cognome = document.modulo_prev.cognome.value;
     var nome = document.modulo_prev.nome.value;
	 var contatto = document.modulo_prev.contatto.value;
	 var contatto2 = document.modulo_prev.contatto2.value;
	 var privacy_check = document.modulo_prev.privacy_check.checked;

        if ((cognome == "") || (cognome == "undefined") || (cognome == " ")) {
           alert("Inserire un Cognome.");
           document.modulo_prev.cognome.focus();
           return false;
        }
        else if ((nome == "") || (nome == "undefined") || (nome == " ")) {
           alert("Inserire un Nome.");
           document.modulo_prev.nome.focus();
           return false;
        }

       else if ((contatto == "") || (contatto == "undefined") || (contatto == " ")) {
           alert("Inserire un numero di telefono.");
           document.modulo_prev.contatto.focus();
           return false;
        }
	   else if ((contatto2 == "") || (contatto2 == "undefined") || (contatto2 == " ")) {
           alert("Inserire un indirizzo e-mail.");
           document.modulo_prev.contatto2.focus();
           return false;
        }
	   else if (privacy_check == false) {
           alert("Devi leggere ed accettare le condizioni sulla privacy.");
           document.modulo_prev.privacy_check.focus();
           return false;
        }
 else {
   document.modulo_prev.submit();
        }
  }

function Modulo_rich() {
     var cognome = document.modulo_rich.cognome.value;
     var nome = document.modulo_rich.nome.value;
	 var contatto = document.modulo_rich.contatto.value;
	 var contatto2 = document.modulo_rich.contatto2.value;
	 var privacy_check = document.modulo_rich.privacy_check.checked;

        if ((cognome == "") || (cognome == "undefined") || (cognome == " ")) {
           alert("Inserire un Cognome.");
           document.modulo_rich.cognome.focus();
           return false;
        }
        else if ((nome == "") || (nome == "undefined") || (nome == " ")) {
           alert("Inserire un Nome.");
           document.modulo_rich.nome.focus();
           return false;
        }

       else if ((contatto == "") || (contatto == "undefined") || (contatto == " ")) {
           alert("Inserire un numero di telefono.");
           document.modulo_rich.contatto.focus();
           return false;
        }
	   else if ((contatto2 == "") || (contatto2 == "undefined") || (contatto2 == " ")) {
           alert("Inserire un indirizzo e-mail.");
           document.modulo_rich.contatto2.focus();
           return false;
        }
	   else if (privacy_check == false) {
           alert("Devi leggere ed accettare le condizioni sulla privacy.");
           document.modulo_rich.privacy_check.focus();
           return false;
        }
 else {
   document.modulo_rich.submit();
        }
  }
  
 function Modulo_app() {
     var cognome = document.modulo_app.cognome.value;
     var nome = document.modulo_app.nome.value;
	 var contatto = document.modulo_app.contatto.value;
	 var contatto2 = document.modulo_app.contatto2.value;
	 var privacy_check = document.modulo_app.privacy_check.checked;

        if ((cognome == "") || (cognome == "undefined") || (cognome == " ")) {
           alert("Inserire un Cognome.");
           document.modulo_app.cognome.focus();
           return false;
        }
        else if ((nome == "") || (nome == "undefined") || (nome == " ")) {
           alert("Inserire un Nome.");
           document.modulo_app.nome.focus();
           return false;
        }

       else if ((contatto == "") || (contatto == "undefined") || (contatto == " ")) {
           alert("Inserire un numero di telefono.");
           document.modulo_app.contatto.focus();
           return false;
        }
	   else if ((contatto2 == "") || (contatto2 == "undefined") || (contatto2 == " ")) {
           alert("Inserire un indirizzo e-mail.");
           document.modulo_app.contatto2.focus();
           return false;
        }
	   else if (privacy_check == false) {
           alert("Devi leggere ed accettare le condizioni sulla privacy.");
           document.modulo_app.privacy_check.focus();
           return false;
        }
 else {
   document.modulo_app.submit();
        }
  }
  
function Modulo_collab() {
     var nome = document.modulo_collab.nome.value;
	 var cognome = document.modulo_collab.cognome.value;
	 var sesso = document.modulo_collab.sesso.value;
	 var eta = document.modulo_collab.eta.value;
	 var indirizzo = document.modulo_collab.indirizzo.value;
	 var citta = document.modulo_collab.citta.value;
	 var provincia = document.modulo_collab.provincia.value;
	 var email = document.modulo_collab.email.value;
	 var cellulare = document.modulo_collab.cellulare.value;
	 var telefono = document.modulo_collab.telefono.value;
	 var cap = document.modulo_collab.cap.value;
	 var anni = document.modulo_collab.anni.value;
	 var privacy_check = document.modulo_collab.privacy_check.checked;

        if ((nome == "") || (nome == "undefined") || (nome == " ")) {
           alert("Inserire un Nome.");
           document.modulo_collab.nome.focus();
           return false;
        }
        else if ((cognome == "") || (cognome == "undefined") || (cognome == " ")) {
           alert("Inserire un Cognome.");
           document.modulo_collab.cognome.focus();
           return false;
        }
        else if ((eta == "") || (eta == "undefined") || (eta == " ")) {
           alert("Inserire una Etą.");
           document.modulo_collab.eta.focus();
           return false;
        }
        else if ((indirizzo == "") || (indirizzo == "undefined") || (indirizzo == " ")) {
           alert("Inserire un Indirizzo.");
           document.modulo_collab.indirizzo.focus();
           return false;
        }
        else if ((citta == "") || (citta == "undefined") || (citta == " ")) {
           alert("Inserire una Cittą.");
           document.modulo_collab.citta.focus();
           return false;
        }
        else if ((provincia == "") || (provincia == "undefined") || (provincia == " ")) {
           alert("Inserire una Provincia.");
           document.modulo_collab.provincia.focus();
           return false;
        }
        else if ((email == "") || (email == "undefined") || (email == " ")) {
           alert("Inserire una E-Mail.");
           document.modulo_collab.email.focus();
           return false;
        }
        else if ((cellulare == "") || (cellulare == "undefined") || (cellulare == " ")) {
           alert("Inserire un Cellulare.");
           document.modulo_collab.cellulare.focus();
           return false;
        }
        else if ((telefono == "") || (telefono == "undefined") || (telefono == " ")) {
           alert("Inserire un Telefono.");
           document.modulo_collab.telefono.focus();
           return false;
        }
        else if ((cap == "") || (cap == "undefined") || (cap == " ")) {
           alert("Inserire un Cap.");
           document.modulo_collab.cap.focus();
           return false;
        }
        else if ((anni == "") || (anni == "undefined") || (anni == " ")) {
           alert("Inserire gli anni di attivitą.");
           document.modulo_collab.anni.focus();
           return false;
        }
	   else if (privacy_check == false) {
           alert("Devi leggere ed accettare le condizioni sulla privacy.");
           document.modulo_collab.privacy_check.focus();
           return false;
        }
 else {
   document.modulo_collab.submit();
        }
  }
