<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">function DoAjaxPostOnSubmit(e, btnClicked, isFooterContact, recaptchaPublicKey) {
    e.preventDefault();
    if (isFooterContact) {
        grecaptcha.ready(function () {
            grecaptcha.execute(recaptchaPublicKey + "", { action: 'submit' }).then(function (token) {
                document.getElementById("g-recaptcha-response-Footer-Contact-Us").value = token;
                submitContactForm($(btnClicked).parents('form'));
            });
        });
    } else {
        grecaptcha.ready(function () {
            grecaptcha.execute(recaptchaPublicKey + "", { action: 'submit' }).then(function (token) {
                document.getElementById("g-recaptcha-response-Contact-Us").value = token;
                submitContactForm($(btnClicked).parents('form'));
            });
        });
    }
}

function submitContactForm(btnClicked) {
    var parentNodeObj = $(btnClicked).parents('form:first').parent();
    var formData = $(btnClicked).parents('form');

    $("#sendemail*").hide();
    $("#pleaseWaitSeding*").show();
    $(btnClicked).attr('disabled', true);
    $.ajax({
        url: "/ContactUs/GeneralContactWidget",
        type: "POST",
        data: formData.prevObject.serialize(),
        success: function (result) {

            if ($(btnClicked).parent().hasClass("contact-float-content")) {

                $(".contact-float-content").empty();
                $(".contact-float-content").html(result);
            } else {
                $(".contact-content").empty();
                $(".contact-content").html(result);
            }

            $('#responseMessage').html("HOLA");

            setTimeout(function () {
                $("#success_message").remove();

            }, 5000);


            // $(btnClicked).button('reset');
            $("#sendemail*").show();
            $("#pleaseWaitSeding*").hide();
            $(btnClicked).attr('disabled', false);
        },
        error: function (result) {
        }
    });
} </pre></body></html>