﻿$(document).ready(function () {
    $("#ocpvFooter").click(function (e) {
        var href = $(this).attr("href");
        e.preventDefault();
        $.ajax({
            type: "POST",
            url: "/Default.aspx/GetUserACHId",
            data: "{}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                if (parseInt(eval('(' + data.d + ')')) > -1) {
                    idUser = parseInt(eval('(' + data.d + ')'));
                    location.href = href;
                } else { location.href = "/Inscription/InscriptionLight.aspx?from=HPV"; }
            },
            error: function (data) { return v_retour; }
        });
    });
});
