function validateForm() {
var r, re,w;
re = /[0-9(.*/)]/;
r = /(@)/;
w = /[(.*/#)]/;
	
//nome
	if (document.dati.txtnome.value == "") { alert('Inserire il nome azienda'); document.dati.txtnome.focus(); document.dati.txtazienda.select(); return false; } 
	if (!isNaN(document.dati.txtnome.value)) { alert('Il campo nome non può essere numerico '); document.dati.txtnome.focus(); document.dati.txtnome.select(); return false; } 

//cognome
	if (document.dati.txtnome.value == "") { alert('Inserire il nome azienda'); document.dati.txtnome.focus(); document.dati.txtazienda.select(); return false; } 
	if (!isNaN(document.dati.txtcognome.value)) { alert('Il campo cognome non può essere numerico '); document.dati.txtnome.focus(); document.dati.txtnome.select(); return false; } 

//email
	if (document.dati.txtemail.value != "" ) { 
		var p=document.dati.txtemail.value.indexOf('@');
		var v=document.dati.txtemail.value.indexOf('.');
		if (p<1 || p==(document.dati.txtemail.length-1)) { 
			alert("Indirizzo email non corretto "); 
			document.dati.txtemail.focus(); 
			document.dati.txtemail.select(); 
			return false;
		}
	if (v<1 || v==(document.dati.txtemail.length-1)) { 
		alert("Indirizzo email non corretto "); 
		document.dati.txtemail.focus(); 
		document.dati.txtemail.select(); 
		return false;
		}
	}
	
//azienda
	if (document.dati.txtazienda.value == "") { alert('Inserire il nome azienda'); document.dati.txtnome.focus(); document.dati.txtazienda.select(); return false; } 
	if (!isNaN(document.dati.txtazienda.value)) { alert('Il campo nome non può essere numerico '); document.dati.txtnome.focus(); document.dati.txtazienda.select(); return false; } 

//nazione

//citta
	if (document.dati.txtcitta.value == "") { alert("Inserire la città"); document.dati.txtcitta.focus(); document.dati.txtcitta.select();  return false; }
	if ((document.dati.txtcitta.value.search(re))>=0) { alert('Il campo citta non può contenere numeri '); document.dati.txtcitta.focus(); document.dati.txtcitta.select(); return false; } 	

//telefono
	if (document.dati.txttel.value != "") {
		if ((document.dati.txttel.value.search(re))<0) { alert("Il campo tel puo' contenere solo numeri"); document.dati.txttel.focus(); document.dati.txttel.select(); return false;}
	} else { alert("Inserire il Telefono"); document.dati.txttel.focus(); document.dati.txttel.select(); return false; }

//fax
	if (document.dati.txtfax.value != "") {
		if ((document.dati.txtfax.value.search(re))<0) { alert("Il campo fax puo' contenere solo numeri"); document.dati.txtfax.focus(); document.dati.txtfax.select(); return false;}
	}

//tipo_utente
	// NULL
	
//note
	// NULL
	
	if (document.dati.checkauth[1].checked) { alert ("Non puoi continuare l'invio dei tuoi dati \n se  non accetti le condizioni dell'art.675/96"); return false; }	
	return true;
}
