// --------------------------------------------------- 	
// CHECK REGISTRATION FORM  	
// --------------------------------------------------- 	
	function Form_Validator(theForm) {	
		
		if (theForm.privacy_accepted.checked == false) {
			alert("ATTENZIONE!\n\nPer procedere all'invio delle informazioni è necessario aver letto ed approvato l'informativa sulla privacy.");
			window.open('../privacy/privacy.php','Privacy','toolbar=no,width=520,height=500,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no');
			return (false);
		}
		if (theForm.elements['item_field[firstname]'].value == "") {
		    alert("NOME non valido");
		    theForm.elements['item_field[firstname]'].focus();
		    return (false);
		}
		if (theForm.elements['item_field[lastname]'].value == "") {
		    alert("COGNOME non valido");
		    theForm.elements['item_field[lastname]'].focus();
		    return (false);
		}
		if ((!(theForm.elements['item_field[email]'].value.search(/^\w+((\+\w+)|(-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.([A-Za-z0-9])([A-Za-z0-9]?)([A-Za-z0-9]?)$/)!= -1)) || (theForm.elements['item_field[email]'].value=="")) {  
		  	alert("EMAIL non valida");
		    theForm.elements['item_field[email]'].focus();
		  	return (false);
		}  
		
			// Richieste da Seitron  
			if ( ( theForm.elements['contactType'][0].checked == true ) && ( theForm.elements['item_field[company]'].value == "" ) ) {
			    alert("Se sei un'AZIENDA è necessario indicare il NOME DELL'AZIENDA");
			    theForm.elements['item_field[company]'].focus();
			    return (false);
			}
						
			if (theForm.elements['item_field[address]'].value == "") {
			    alert("INDIRIZZO non valido");
			    theForm.elements['item_field[address]'].focus();
			    return (false);
			}
			if (theForm.elements['item_field[zipcode]'].value == "") {
			    alert("C.A.P. non valido");
			    theForm.elements['item_field[zipcode]'].focus();
			    return (false);
			}
			if (theForm.elements['item_field[city]'].value == "") {
			    alert("CITTA' non valida");
			    theForm.elements['item_field[city]'].focus();
			    return (false);
			}
			if (theForm.elements['item_field[telephone]'].value == "") {
			    alert("N° DI TELEFONO non valido");
			    theForm.elements['item_field[telephone]'].focus();
			    return (false);
			}
			// Richieste da Seitron  
					
		
		if (theForm.description.value == "") {
		    alert("COMMENTI mancanti");
		    theForm.description.focus();
		    return (false);
		} 
		/*if ( theForm.elements['secureCode'].value == "" ) {
		    alert("ATTENZIONE!!! Scrivere il codice di sicurezza visibile nell'immagine con bordo rosso!");
		    theForm.elements['secureCode'].style.border = '1px solid #ff0000';
			theForm.elements['secureCode'].focus();
		    return (false);
		}*/
		theForm.okForm.value = true;
		return (true);
	}
// --------------------------------------------------- 	
// --------------------------------------------------- 	
 	
