function checkItNum(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if (charCode != 8 && charCode != 9 && (charCode < 48 || charCode > 57)) {
		//alert("This field accepts numbers only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts numbers only."
		return false
	}
	status = ""
	return true
}

function checkItTime(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if ((charCode < 48 || charCode > 58) && (charCode != 65) && (charCode != 97) && (charCode != 77) && (charCode != 109) && (charCode != 80) && (charCode != 112)){
		//alert("This field accepts numbers only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts time notation characters only."
		return false
	}
	status = ""
	return true
}

function checkItDate(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if (charCode < 47 || charCode > 57) {
		//alert("This field accepts numbers only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts date notation characters only. (numerals and slash)"
		return false
	}
	status = ""
	return true
}

function checkItMoney(fld,evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if (fld.value.substr(0,1) == '0') fld.value = '';
	if (((charCode < 48 || charCode > 57) && charCode != 46) || (charCode == 46 && fld.value.indexOf('.') != -1) || (fld.value.indexOf('.') != -1 && fld.value.substring(fld.value.indexOf('.'),fld.value.length).length > 2)) {
		//alert("This field accepts numbers only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts numbers and one decimal only."
		return false
	}
	status = ""
	return true
}

function checkItAlpha(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if ((charCode != 8 && charCode != 9 && charCode != 32 && charCode < 65) || (charCode > 122) || (charCode > 90 && charCode < 97)) {
		//alert("This field accepts alpha characters only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts alpha characters only."
		return false
	}
	status = ""
	return true
}

function checkItAlphaNum(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if ((charCode != 8 && charCode != 9 && charCode != 32 && charCode < 48) || (charCode > 57 && charCode < 65) || (charCode > 90 && charCode < 97) || (charCode > 122)) {
		//alert("This field accepts alphanumeric characters only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts alphanumeric characters only."
		return false
	}
	status = ""
	return true
}

function checkItAlphaNumCr(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if ((charCode != 8 && charCode != 9 && charCode != 13 && charCode != 32 && charCode < 48) || (charCode > 57 && charCode < 65) || (charCode > 90 && charCode < 97) || (charCode > 122)) {
		//alert("This field accepts alphanumeric characters and line breaks only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts alphanumeric characters and line breaks only."
		return false
	}
	status = ""
	return true
}

function checkItEmail(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if ((charCode != 8 && charCode != 9 && charCode < 45) || (charCode > 122 && charCode != 190) || (charCode == 47) || (charCode > 57 && charCode < 64) || (charCode > 90 && charCode < 97)){
		//alert("This field accepts email-valid characters only."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts email-valid characters only."
		return false
	}
	status = ""
	return true
}

function checkItAlphaNumCrPunct(evt) { 
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if (charCode != 8 && charCode != 9 && (charCode < 13) || (charCode >= 14 && charCode <= 31) || (charCode == 34) || (charCode == 39) || (charCode == 96) || (charCode == 127)) {
		//alert("This field accepts all characters except single and double quotes."); //You can Comment this line out if you do not want to alert the user.
		status = "This field accepts all characters except single and double quotes."
		return false
	}
	status = ""
	return true
}

function validateEmail(frm){
	str = frm.email.value;
	if (str != null || str.length>7) {
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;								// not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;	// valid
		if (!reg1.test(str) && reg2.test(str))										// if syntax is valid
			return true;
		else
			return false
	} else return false
}