function fnValidate() {
    var himsValidator = [
							 new hims_ctl_val("ctl00_CP_SearchClassDropDownList", "Class", "T", "", "", "", 20),
							 new hims_ctl_val("ctl00_CP_SearchDivisionDropDownList", "Division", "T", "", "", "", 20),
							 new hims_ctl_val("ctl00_CP_AttendanceTypeDropDownList", "Attendance Type", "T", "", "", "", 20),
							 new hims_ctl_val('ctl00_CP_AttendanceDatePickerControl' + '_DateTextbox', "Attendance Date", "T", "", "", "", 10)
    ];
    if (fnDoValidate(himsValidator))
        return true;
    else
        return false;
}
function checkAllRows(obj) {
    //var table = obj.closest('table');
    //var listaElementos = table.querySelectorAll('table input[type=checkbox]');
    //for (var i = 0, n = listaElementos.length; i < n; i++) {
    //    var element = listaElementos[i];
    //    if (obj.checked) {
    //        element.checked = true;
    //    }
    //    else {
    //        element.checked = false;
    //    }
    //}
    var objGridview = obj.closest('table');
    var list = objGridview.getElementsByTagName("input");
    for (var i = 0; i < list.length; i++) {
        var objRow = list[i].parentNode.parentNode;
        if (list[i].type == "checkbox" && obj != list[i]) {
            if (obj.checked) {
                list[i].checked = true;
            }
            else {
                list[i].checked = false;
            }
        }
    }
}
function checkUncheckHeaderCheckBox(obj) {
    var objGridView = obj.closest('table');
    var list = objGridView.getElementsByTagName("input");
    for (var i = 0; i < list.length; i++) {
        var objHeaderChkBox = list[0];
        var checked = true;
        if (list[i].type == "checkbox" && list[i] != objHeaderChkBox) {
            if (!list[i].checked) {
                checked = false;
                break;
            }
        }
    }
    objHeaderChkBox.checked = checked;
}
function isNumberKey(evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode;
    if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    return true;
}

