﻿var intCheckboxesChecked = 0;

function EnableFilterButton(strCheckboxId, strButtonId) {

    var checkbox = document.getElementById(strCheckboxId);
    var button = document.getElementById(strButtonId);

    if (checkbox.checked) {
        intCheckboxesChecked += 1;
    }
    else {
        intCheckboxesChecked -= 1;
    }

    if (intCheckboxesChecked > 0) {
        button.disabled = false;
    }
    else {
        button.disabled = true;
    }
}