<!--
function CheckEmail(strData) {
	var posAt = strData.indexOf("@")
	var strName = strData.substring(0, posAt)
	var strDomain = strData.substring(posAt+1, strData.length)
	var dotPos = strDomain.indexOf(".")
	var strExt = strDomain.substring(dotPos+1,strDomain.length)
	var strDomain = strDomain.substring(0,dotPos)
	if (strName == "" || strDomain == "" || strExt == "") {
		return true;
	} else {
		return false;
	}
}

// Only allows numbers to be entered into form items
function checkNums(id,def) {
	var ssnVal = id.value;
	ssnVal = ssnVal.replace(/\D/g,""); // Replace Non Digit with "" wherever it appears
	if (ssnVal == "") {ssnVal = def}
	id.value = ssnVal;
}

// Limits the number of text characters in an input box
function checkMaxChars(object,MaxLen,e) {
	if (validKeys(e)) {
		return true;
	} else {
		return (object.value.length <= MaxLen);
	}
}

function validKeys(e) {
	// This is used to allow Delete/Backspace to work when limiting max chars.
	var keynum;
	if(window.event) { // IE
		keynum = e.keyCode;
	} else if (e.which) { // Netscape/Firefox/Opera
		keynum = e.which;
	}
	
	if (keynum == 8 || keynum == undefined) {
		return true;
	} else {
		return false;
	}
}
//-->
