function validaContato(theForm){

    re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
    uf = /^[a-zA-Z]{2}$/;

    if (theForm.nome.value == ""){
        alert("ERRO:\nNome não informado!");
        theForm.nome.focus();
        return false;
    }

    if (theForm.empresa.value == ""){
        alert("ERRO:\nEmpresa não informada!");
        theForm.empresa.focus();
        return false;
    }

    if (theForm.cidade.value == ""){
        alert("ERRO:\nCidade não informada!");
        theForm.cidade.focus();
        return false;
    }

    if (theForm.uf.value != ""){
        if(!uf.test(theForm.uf.value)){
            alert("ERRO:\nEste campo aceita apenas letras!");
            theForm.uf.select();
            return false;
        }
    }else{
        alert("ERRO:\nUnidade Federativa não informada!");
        theForm.uf.focus();
        return false;
    }

    if(theForm.email.value == "" && theForm.fone.value == ""){
        alert("ERRO:\nÉ necessário informa o e-mail ou o telefone!");
        theForm.email.focus();
        return false;
    }else{
        if(theForm.email.value != ""){
            if(!re.test(theForm.email.value)){
                alert("ERRO:\nEndereço eletrônico inválido!");
                theForm.email.select();
                return false;
            }
        }
    }

    if (theForm.assunto.value == ""){
        alert("ERRO:\nAssunto não informado!");
        theForm.assunto.focus();
        return false;
    }

    if (theForm.mensagem.value == ""){
        alert("ERRO:\nMensagem não informada!");
        theForm.mensagem.focus();
        return false;
    }

    return true;
}
