//Função que testa e-mail 
function fncVerifyStandardEmail (pObjField, pIntMax) {

    var pStrFormattedR = new Array;

	
    lIntMax = pIntMax;						

	//Leitura do comando de validação
	//1	\w+				=> 1 ou mais caracteres inclusos em a-z,A-Z,0-9 + {'_'}
	//2	[\.-]?			=> apenas 1 caracter incluso em {'.','-'}
	//3	([\.-]?\w)*		=> 0 ou mais grupos de caracteres do tipo 2 seguido do tipo \w
	//4	(\.\w{2,3})+	=> 1 ou mais grupos de 2 ou 3 caracteres do tipo \w no fim da string
	lIntReturn = 0
	if (! (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(pObjField.value)) ) {
		lIntReturn = -241;
        } 
	if ((lIntMax > 0) && (pObjField.value.length > lIntMax)) {
		lIntReturn =  -242
        }  

    if(lIntReturn < 0) {
		alert("E-mail inválido!")
        pObjField.focus();
        return false;
    } 

    return true;
 }

function fncValidaCamposFaleConosco(objForm) {
	if (objForm.txtNome.value == '') {
		alert("Preencha o campo nome")
		objForm.txtNome.focus()
		return false;
	}
	if (objForm.txtEmail.value == '') {
		alert("Preencha o campo E-mail")
		objForm.txtEmail.focus()
		return false;
	}
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(objForm.txtEmail.value))
	{
		alert("Por Favor digite um e-mail válido.")
		objForm.txtEmail.focus();
		return false;
	}
	if (objForm.txtAssunto.value == '') {
		alert("Preencha o campo Assunto")
		objForm.txtAssunto.focus()
		return false;
	}
	if (objForm.txtmensagem.value == '') {
		alert("Preencha o campo Mensagem")
		objForm.txtmensagem.focus()
		return false;
	}
	return true;
}