function fnValidate() {
    var himsValidator = [
							 new hims_ctl_val("ctl00_CP_OrgGroupDropDownList", "Org Group", "T", "", "", "", 20)
    ];
    if (fnDoValidate(himsValidator))
        return true;
    else
        return false;
}

function isNumberKeyWithinFive(evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode;
    if (charCode >= 48 && charCode <= 53) {
        if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {
            return false;
        }
        return true;
    }
    else {
        return false;
    }
}

// Mantis Id : 0034171
function StudentAttachmentSizeValidation(evt) {
    var $input = $(evt.target);
    var txtval = $input.val();
    var charCode = evt.which || evt.keyCode;
    var cursorStart = evt.target.selectionStart;
    var cursorEnd = evt.target.selectionEnd;

    if ([8, 46, 37, 39, 9].includes(charCode)) {
        return true;
    }

    if ((charCode >= 48 && charCode <= 57) || (charCode >= 96 && charCode <= 105)) {
        var digit = charCode >= 96 ? charCode - 96 : charCode - 48;

        var newValue;

        if (cursorStart === cursorEnd) {
            newValue = [
                txtval.slice(0, cursorStart),
                digit,
                txtval.slice(cursorEnd),
            ].join('');
        } else {
            newValue = [
                txtval.slice(0, cursorStart),
                digit,
                txtval.slice(cursorEnd),
            ].join('');
        }

        var parsedValue = parseInt(newValue, 10);

        if (isNaN(parsedValue) || parsedValue < 0 || parsedValue > 1000) {
            evt.preventDefault();
            return false;
        }
        return true;
    }

    evt.preventDefault();
    return false;
}


    
