function controlla(form) {
		if(!controlla_nome(form)) { return false; }
		if(!controlla_cognome(form)) { return false; }	
		if(!controlla_email(form)) { return false; }
		if(!controlla_password(form)) { return false; }
		return true;
	}

	function controlla_nome(form) {
	  if (document.getElementById('nome').value=="") {
		alert("Insert your Name!");
		document.getElementById('nome').focus();
		document.getElementById('nome').select();
		return false;
	  }
	return true;
	}
	function controlla_cognome(form) {
	  if (document.getElementById('cognome').value=="") {
		alert("Insert your Surname!");
		document.getElementById('cognome').focus();
		document.getElementById('cognome').select();
		return false;
	  }
	return true;
	}
	function controlla_password(form) {
	  if (document.getElementById('pwd').value=="") {
		alert("Insert the password!");
		document.getElementById('pwd').focus();
		document.getElementById('pwd').select();
		return false;
	  }
	return true;
	}
	function controlla_email(form) {
	  if (document.getElementById('email').value=="") {
		alert("Insert the e-mail!");
		document.getElementById('email').focus();
		document.getElementById('email').select();
		return false;
	  }
	  else
	  {
		var filter =/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if(!filter.test(document.getElementById('email').value)){
		alert("Insert a valid e-mail");
		document.getElementById('email').focus();
		document.getElementById('email').select();
		return false;
		}
	  }
	return true;
	}