var supportsKeys = false;
function calcCharLeft(oText,maxLength,oCount) {
	if (oText.value.length > maxLength) {
		oText.value = oText.value.substring(0,maxLength);
		charleft = 0;
	} else {
		charleft = maxLength - oText.value.length;
	}
	oCount.value = charleft;
}
function calcChar(oText,maxLength,oCount) {
	if (oText.value.length > maxLength) {
		oText.value = oText.value.substring(0,maxLength);
	}
	oCount.value = oText.value.length;
}
function countUp(oText,maxLength,oCount) {
	supportsKeys = true;
	calcChar(oText,maxLength,oCount);
}
function countDown(oText,maxLength,oCount) {
	supportsKeys = true;
	calcCharLeft(oText,maxLength,oCount);
}
