function isNumberKey(evt) {
	var charCode = (evt.which) ? evt.which : event.keyCode;
	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
		return false;
	}
	else {
		var fmobile = document.getElementById("FatherMobileNoTextBox").value;
		var mmobile = document.getElementById("MotherMobilNoTextBox").value;
		var gmobile = document.getElementById("GuardianMobileNoTextBox").value;
		var DOB = document.getElementById("BirthDateTextBox").value;
		if (DOB != "") {
			document.getElementById("dobdnull").style.display = 'none';
		}
	}
}
function OnlyNumericEntry() {
	if ((event.keyCode < 48 || event.keyCode > 57 || event.keyCode == 13 || event.keyCode == 176)) {
		event.returnValue = false;
	}
	else {
		var mobile = document.getElementById("MobileNoTextBox").value;
		var DOB = document.getElementById("BirthDateTextBox").value;
		if (mobile != "") {
			document.getElementById("mobilenull").style.display = 'none';
		}
		if (DOB != "") {
			document.getElementById("dobdnull").style.display = 'none';
		}
	}
}
function checkNum() {
	if ((event.keyCode > 64 && event.keyCode < 91) || (event.keyCode > 96 && event.keyCode < 123) || event.keyCode == 8 || event.keyCode == 32 || event.keyCode == 13 || event.keyCode == 176) {
		var fname = document.getElementById("FirstNameTextBox").value;
		var lname = document.getElementById("LastNameTextBox").value;
		if (fname != "") {
			document.getElementById("fnamenull").style.display = 'none';
		}
		if (lname != "") {
			document.getElementById("lnamenull").style.display = 'none';
		}
	}
	else {
		event.returnValue = false;
	}
}
function ValidateNull() {
	var fmobile = document.getElementById("FatherMobileNoTextBox").value;
	var mmobile = document.getElementById("MotherMobilNoTextBox").value;
	var gmobile = document.getElementById("GuardianMobileNoTextBox").value;
	if (fmobile != "") {
		var ftext = fmobile.length;
		if (ftext <= 9) {
			document.getElementById("fmobilenull").style.display = 'block';
			document.getElementById("FatherMobileNoTextBox").focus();
			return false;
		}
	}
	if (mmobile != "") {
		var mtext = mmobile.length;
		if (mtext <= 9) {
			document.getElementById("mmobilenull").style.display = 'block';
			document.getElementById("MotherMobilNoTextBox").focus();
			return false;
		}
	}
	if (gmobile != "") {
		var gtext = gmobile.length;
		if (gtext <= 9) {
			document.getElementById("gmobilenull").style.display = 'block';
			document.getElementById("GuardianMobileNoTextBox").focus();
			return false;
		}
	}
}
function DropDownCheck(obj) {
	var value = document.getElementById(obj.id).value;
	if (value == "-1") {
		if (obj.id == "GenderDropDownList") {
			document.getElementById("gendernull").style.display = 'block';
		}
		if (obj.id == "OrgDropDownList") {
			document.getElementById("orgnull").style.display = 'block';
		}
		if (obj.id == "BatchDropDownList") {
			document.getElementById("batchnull").style.display = 'block';
		}
		if (obj.id == "StandardDropDownList") {
			document.getElementById("standardnull").style.display = 'block';
		}
		return false;
	}
	else {
		if (obj.id == "GenderDropDownList") {
			document.getElementById("gendernull").style.display = 'none';
		}
		if (obj.id == "OrgDropDownList") {
			document.getElementById("orgnull").style.display = 'none';
		}
		if (obj.id == "BatchDropDownList") {
			document.getElementById("batchnull").style.display = 'none';
		}
		if (obj.id == "StandardDropDownList") {
			document.getElementById("standardnull").style.display = 'none';
		}
		return false;
	}
}
$(function () {
	$("#FatherBirthDateTextBox").datepicker({
		dateFormat: 'dd/mm/yy'
	}).val();
});
$(function () {
	$("#MotherBirthDateTextBox").datepicker({
		dateFormat: 'dd/mm/yy'
	}).val();
});
$(function () {
	$("#GuardianBirthDateTextBox").datepicker({
		dateFormat: 'dd/mm/yy'
	}).val();
});