function setAllCheckBoxes(formName, fieldName, checkValue)
{
    if (!document.forms[formName]) {
        return;
    }
    var objCheckBoxes = document.forms[formName].elements[fieldName];

    if (!objCheckBoxes) {
        return;
    }
    var countCheckBoxes = objCheckBoxes.length;

    if (!countCheckBoxes) {
        objCheckBoxes.checked = checkValue;
    } else {
        for(i = 0; i < countCheckBoxes; i++) {
            objCheckBoxes[i].checked = checkValue;
        }
    }
}
