if(document.getElementById(pagina))
  document.getElementById(pagina).className='mensel'

function validate_form() {
  validity = true; // assume valid
  if (!check_empty(document.form.nome.value))
  	{ validity = false; alert('Name field is empty!'); }
  if (!check_empty(document.form.cognome.value))
  	{ validity = false; alert('Last Name field is empty!'); }
  if (!check_email(document.form.email.value))
  	{ validity = false; alert('Email address is invalid!'); }
  if (!check_empty(document.form.telefono.value))
  	{ validity = false; alert('Phone field is empty!'); }
  if (validity)
  	alert ("THANK YOU."
  		+ "We will send you further information"
  		+ " as soon as possible.");
  return validity;
}
function check_empty(text) {
  return (text.length > 0); // returns false if empty
}
function check_email(address) {
  if ((address == "")
    || (address.indexOf ('@') == -1)
    || (address.indexOf ('.') == -1))
      return false;
  return true;
}