function verificarPreenchimento()
{
    if(document.getElementById("txtNome").value.length > 0)
    {
        if(document.getElementById("txtTelefoneDdd").value.length > 0)
        {
            if(document.getElementById("txtTelefone").value.length > 0)
            {
                if(document.getElementById("txtEmail").value.length > 0)
                {
                    if(verificarEmail(document.getElementById("txtEmail").value))
                    {
                        if(document.getElementById("txtAssunto").value.length > 0)
                        {
                            document.frmAgende.submit();
                        }
                        else
                        {
                            alert("Obrigatório o preenchimento do Assunto.");
                            document.getElementById("txtAssunto").focus();
                        }
                    }
                    else
                    {
                        alert("Preencha corretamente o Email.");
                        document.getElementById("txtEmail").focus();
                    }
                }
                else
                {
                    alert("Obrigatório o preenchimento do Email.");
                    document.getElementById("txtEmail").focus();
                }
            }
            else
            {
                alert("Obrigatório o preenchimento do Telefone.");
                document.getElementById("txtTelefone").focus();
            }
        }
        else
        {
            alert("Obrigatório o preenchimento do DDD do Telefone.");
            document.getElementById("txtTelefoneDdd").focus();
        }
    }
    else
    {
        alert("Obrigatório o preenchimento do Nome.");
        document.getElementById("txtNome").focus();
    }
}

function apagarFormulario()
{
    document.frmAgende.reset();
}
