// produzido pela Equipe BrazMill - http://www.brazmill.com.br em FEV/07

function checa(nform) {
	if (nform.nome.value == "") {
		alert("O campo Nome está em branco!");
		nform.nome.focus();
		nform.nome.select();
		return false;
	}
	if (nform.email.value == "") {
		alert("O campo E-mail está em branco!");
		nform.email.focus();
		nform.email.select();
		return false;
	} else {
		prim = nform.email.value.indexOf("@")
		if(prim < 2) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf("@",prim + 1) != -1) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf(".") < 1) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf(" ") != -1) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf("@.") > 0) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf("/") > 0) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf("[") > 0) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf("]") > 0) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf("(") > 0) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf(")") > 0) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		if(nform.email.value.indexOf("..") > 0) {
			alert("O e-mail está incorreto!");
			nform.email.focus();
			nform.email.select();
			return false;
		}
		
	}
	if (nform.assunto.value == "") {
		alert("O campo Assunto está em branco!");
		nform.assunto.focus();
		nform.assunto.select();
		return false;
	}
	if (nform.mensagem.value == "") {
		alert("O campo Mensagem está em branco!");
		nform.mensagem.focus();
		nform.mensagem.select();
		return false;
	}
		return true;
}
