prova così:

codice:
function test(form) { 

if (form.nome.value == "") {
 alert("Inserisci Il Tuo Nome!");
 return false;
} 
if (form.from.value == "" || 
form.from.value.indexOf('@', 0) == -1) {
alert("Inserisci il tuo indirizzo di e-mail valido!");
return false;
}

if (form.nome.value != "" && 
form.from.value != "" && 
form.from.value.indexOf('@', 0) != -1) 
return true;
}
e nel tag form metti questo:

codice:
<form name="f" onSubmit="return test(this);">
ciao