
	function valida_mail(valor) {
	prim = valor.indexOf("@")
	if(prim < 2) return false;
	if(valor.indexOf("@",prim + 1) != -1) return false
	if(valor.indexOf(".") < 1) return false;
	if(valor.indexOf("zipmeil.com") > 0) return false;
	if(valor.indexOf("hotmeil.com") > 0) return false;
	if(valor.indexOf(".@") > 0) return false;
	if(valor.indexOf("@.") > 0) return false;
	if(valor.indexOf(".com.br.") > 0) return false;
	if(valor.indexOf("/") > 0) return false;
	if(valor.indexOf("[") > 0) return false;
	if(valor.indexOf("]") > 0) return false;
	if(valor.indexOf("(") > 0) return false;
	if(valor.indexOf(")") > 0) return false;
	if(valor.indexOf("..") > 0) return false;
	if(valor.indexOf(",") > 0) return false;
	return true;

}
	function validaForm(){
		d = document.contato;
		
		//validar nome
		if (d.nome.value == ""){
			alert("O campo " + d.nome.name + " deve ser preenchido!");
			d.nome.focus();
			return false;
		}
		
				
		//validar email
		if (d.email.value==""){
		alert("Por favor, digite seu e-mail.");
		d.email.focus();
		return false;
		}
		if (!valida_mail(d.email.value) ){
		alert("Por favor, digite um e-mail válido.");
		d.email.select();
		return false;
		}
		//validar mensagem
		if (d.mensagem.value == ""){
			alert("O campo " + d.mensagem.name + " deve ser preenchido!");
			d.mensagem.focus();
			return false;
		}
		
		}