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) - (400 / 2);
	if (popwindow == null) {
		popwindow = window.open('../../Pages/FeeManagement/AddStudent.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/FeeManagement/AddStudent.aspx', '', 'height=400,width=1000,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left);
	}
}
function fnCloseForm() {
	window.close();
	return false;
}
function GetValueFromChild() {
	location.reload(true);
}
function ClosePage() {
	GetValueFromChild();
	window.close();
	return false;
}
function fnValidateSetupMaster() {
	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)];
	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)];
	if (fnDoValidate(himsValidator))
		return true;
	else
		return false;
}
popwindow = null;
function OpenDrugDispense() {
	var left = (screen.width / 2) - (700 / 2);
	var top = (screen.height / 2) - (500 / 2);
	if (popwindow == null) {
		popwindow = window.open('../../Common/FileUpload/UploadEmployeePhoto.aspx', '', 'height=500,width=700,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left);
	}
	else {
		popwindow.close();
		popwindow = window.open('../../Common/FileUpload/UploadEmployeePhoto.aspx', '', 'height=500,width=700,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left);
	}
}
popwindow = null;
function OpenFileUpload() {
	var left = (screen.width / 2) - (700 / 2);
	var top = (screen.height / 2) - (500 / 2);
	if (popwindow == null) {
		popwindow = window.open('../Common/FileUpload/Upload.aspx?PageName=Student&Multi=false', '', 'height=500,width=700,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left);
	}
	else {
		popwindow.close();
		popwindow = window.open('../Common/FileUpload/Upload.aspx?PageName=Student&Multi=false', '', 'height=500,width=700,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes' + ', top=' + top + ', left=' + left);
	}
}