// JavaScript Document
function validaForm () {
	var erro="";
	
	if (document.news.nome.value== "") {
		erro = erro + "\n O campo NOME deve ser preeenchido!";
	} 
	if (!isValidMail (document.news.email.value)) {
		erro = erro + "\n Preencha o campo E-MAIL corretamente!";
	}
	if (erro=="") {
		return true;
	}	else {
		alert ("\t Atenção!\n" + erro);
		return false;
	}		
}
function isValidMail(mail){
		 var retorno = true;
		 if (mail.indexOf("@",0) == -1) retorno = false;
		 if (mail.indexOf(".",0) == -1) retorno = false;
		 if (mail.indexOf("@.",0) != -1) retorno = false;   
		 if (mail.length < 5) retorno = false;
		 
		 return retorno; 
	}

