 function isNumberKey(evt) {
	var charCode = (evt.which) ? evt.which : event.keyCode;
	if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;
	return true;
}
function textCounter(field, maxlimit) {
	if (field.value.length > maxlimit) {
		field.value = field.value.substring(0, maxlimit);
	}
}
function GetValueFromChild() {
	location.reload(true);
}
function EditVal() {
	var left = (screen.width / 2) - (1000 / 2);
	var top = (screen.height / 2) - (500 / 2);
	if (popwindow == null) {
		popwindow = window.open('../../Pages/StudentManagement/AdmissionDetails.aspx', '', 'height=400,width=1000,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left)
	}
	else {
		popwindow.close();
		popwindow = window.open('../../Pages/StudentManagement/AdmissionDetails.aspx', '', 'height=400,width=1000,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left)
	}
}
function fnValidateSetupMaster() {
	var himsValidator = [
						 new hims_ctl_val('ctl00_CP_CodeFindTextBox', "Id No.", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_FirstNameTextBox', "First Name", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_ClassIdDropDownList', "Class", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_DivisionIdDropDownList', "Division", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_StatusDropDownList', "Status", "T", "", "", "", 20),
						 new hims_ctl_val("ctl00_CP_AdmissionCategoryDropDownList", "Admission Category", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_AdmissionDateDatePickerControl' + '_DateTextbox', "Admission Date", "T", "", "", "", 10)
	];
	if (fnDoValidate(himsValidator))
		return true;
	else
		return false;
}
function fnValidateSetupMasterAuto() {
	var himsValidator = [
						 new hims_ctl_val('ctl00_CP_FirstNameTextBox', "First Name", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_ClassIdDropDownList', "Class", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_DivisionIdDropDownList', "Division", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_StatusDropDownList', "Status", "T", "", "", "", 20),
						 new hims_ctl_val("ctl00_CP_AdmissionCategoryDropDownList", "Admission Category", "T", "", "", "", 20),
						 new hims_ctl_val('ctl00_CP_AdmissionDateDatePickerControl' + '_DateTextbox', "Admission Date", "T", "", "", "", 10)
	];
	if (fnDoValidate(himsValidator))
		return true;
	else
		return false;
}