﻿function StoreRegelingIDInSession(id) {
    var sender = document.getElementById(id);
    var action = "remove";
    if (sender && sender.checked) {
        action = "add";
    }

    $.ajax({
        type: "GET",
        url: "/_layouts/ReedBusinessFiscaalTotaalMoss2007Portal/Pages/PersistSelectedRegeling.ashx",
        data: "id=" + id + "&action=" + action,
        success: function(output) {
            // do something with successful output?
        }
    });
}

function PreselectRegelingen(ids) {
    $("input.regelingCheckBox")
        .each(function() {
            if (ids.indexOf($(this).attr("id")) > -1) {
                $(this).attr("checked", "true");
            }
        });
}
