function CheckLength(sFormField, nMaxLength) {
	var nLength
	var sString = new String
	nLength = document.form1[sFormField].value.length
	if (nLength > nMaxLength) {
		sString = document.form1[sFormField].value
		sString = sString.slice(0,nMaxLength)
		document.form1[sFormField].value = sString
		nLength = nMaxLength
		}
	document.form1[sFormField + "Length"].value = (nMaxLength - nLength)
}

