$(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();
        }
  }