﻿
function submitform() {
    var form = jQuery('#InfoRequest');
    form.hide('fast');

    jQuery.ajax({
        type: "POST",
        url: form.attr("action"),
        dataType: "html",
        data: form.serialize() + "&NoBots=True",
        success: function(response) {
            form.html(response);
            form.show('fast');
        },
        error: function(xhr, ajaxOptions, thrownError) {
            form.show('fast');
            if ($('.error')) {
                $('.error').show('fast');
            }
            else {
                alert(xhr.status);
                alert(thrownError);
            }
        }
    });
}

