// --------------------------------------------------- 	
// CHECK REGISTRATION FORM  	
// --------------------------------------------------- 	
	function CVs_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.");
			alert("PLEASE NOTE!\n\nTo send your message is necessary to read and approve the privacy statement.");
			window.open('../privacy/privacy.php','Privacy','toolbar=no,width=520,height=520,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no');
			return (false);
		}
		if (theForm.elements['item_field[firstname]'].value == "") {
			//alert("NOME non valido");
			alert("Invalid NAME");
			theForm.elements['item_field[firstname]'].focus();
			return (false);
		}
		if (theForm.elements['item_field[lastname]'].value == "") {
			//alert("COGNOME non valido");
			alert("Invalid SURNAME");
			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");
			alert("Invalid EMAIL");
			theForm.elements['item_field[email]'].focus();
			return (false);
		}
		if (theForm.elements['item_field[address]'].value == "") {
			//alert("INDIRIZZO non valido");
			alert("Invalid ADDRESS");
			theForm.elements['item_field[address]'].focus();
			return (false);
		}
		if (theForm.elements['item_field[city]'].value == "") {
			//alert("CITTA' non valida");
			alert("Invalid CITY");
			theForm.elements['item_field[city]'].focus();
			return (false);
		}
		if (theForm.elements['item_field[county]'].value == "") {
			//alert("PROVINCIA non valida");
			alert("Invalid COUNTY/STATE");
			theForm.elements['item_field[county]'].focus();
			return (false);
		}
		if (theForm.elements['item_field[telephone]'].value == "") {
			//alert("TELEFONO mancante");
			alert("Invalid TELEPHONE");
			theForm.elements['item_field[telephone]'].focus();
			return (false);
		}
		
		if (theForm.new_cv.value == "") {
			//alert("Si prega di allegare il CV nel formato adeguato");
			alert("Please, attach your CV");
			theForm.new_cv.focus();
			return (false);
		} 
		/*if (theForm.elements['security_code'].value == "") {
		   alert("ATTENZIONE!!! Scrivere il codice di sicurezza visibile nell'immagine!");
		    theForm.elements['security_code'].focus();
		    return (false);
		}*/
		if ( theForm.elements['security_code'].value == "" ) {
			//alert("ATTENZIONE!!! Scrivere il codice di sicurezza visibile nell'immagine con bordo rosso!");
			alert("PLEASE NOTE!!! Type the SECURITY CODE you can find into the image!");
			theForm.elements['security_code'].style.border = '1px solid #ff0000';
			theForm.elements['security_code'].focus();
			return (false);
		}
		theForm.okForm.value = true;
		return (true);
	}
// --------------------------------------------------- 	
// --------------------------------------------------- 	

