//<script type="text/javascript">

function CheckASCII_Address(CheckString) {
// This function only permits use of alphas, numerics, apostrophe, 
// space, period, hyphen
// Apostrophe will need to be handled with DoubleApostrophe function

	for (var i = 0; i < CheckString.length; i++) { 
		if (CheckString.charCodeAt(i) < 32 || CheckString.charCodeAt(i) > 122) {
				return false;
			}
		else if (CheckString.charCodeAt(i) > 32 && CheckString.charCodeAt(i) < 39) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 39 && CheckString.charCodeAt(i) < 46) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 46 && CheckString.charCodeAt(i) < 48) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 57 && CheckString.charCodeAt(i) < 65) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 90 && CheckString.charCodeAt(i) < 97) {
			return false;
		}
		else {
		}
	}
	return true;
}

function CheckASCII_StateCountry(CheckString) {
// This function only permits use of alphas, space, period, ampersand

	for (var i = 0; i < CheckString.length; i++) { 
		if (CheckString.charCodeAt(i) < 32 || CheckString.charCodeAt(i) > 122) {
				return false;
			}
		else if (CheckString.charCodeAt(i) > 32 && CheckString.charCodeAt(i) < 38) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 38 && CheckString.charCodeAt(i) < 46) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 46 && CheckString.charCodeAt(i) < 65) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 90 && CheckString.charCodeAt(i) < 97) {
			return false;
		}
		else {
		}
	}
	return true;
}

function CheckASCII_Zip(CheckString) {
// This function only permits use of alphas, numerics and hyphen

	for (var i = 0; i < CheckString.length; i++) { 
		if (CheckString.charCodeAt(i) < 45 || CheckString.charCodeAt(i) > 122) {
				return false;
			}
		else if (CheckString.charCodeAt(i) > 45 && CheckString.charCodeAt(i) < 48) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 57 && CheckString.charCodeAt(i) < 65) {
			return false;
		}
		else if (CheckString.charCodeAt(i) > 90 && CheckString.charCodeAt(i) < 97) {
			//alert(CheckString.charCodeAt(i))
			return false;
		}
		else {
		}
	}
	return true;
}

function CheckASCII_PhoneFax(CheckString) {
// This function only permits use of numerics and hyphen

	for (var i = 0; i < CheckString.length; i++) { 
		if (CheckString.charCodeAt(i) < 45 || CheckString.charCodeAt(i) > 57) {
				return false;
			}
		else if (CheckString.charCodeAt(i) > 45 && CheckString.charCodeAt(i) < 48) {
			return false;
		}
		else {
		}
	}
	return true;
}

//</script>
