var x = "";
var e = null;

function cntChars(form, m) {
	if (window.document.forms[form].text.value.length > m) {
		window.document.forms[form].text.value = x;
	} else {
		x = window.document.forms[form].text.value;
	}
	if (e == null)
		e = document.getElementById('cntChars');
	else
		e.childNodes[0].data = window.document.forms[form].text.value.length;
}

function cntchar(m) {
	if (window.document.forms[0].text.value.length > m) {
		window.document.forms[0].text.value = x;
	} else {
		x = window.document.forms[0].text.value;
	}
	if (e == null)
		e = document.getElementById('cntChars');
	else
		e.childNodes[0].data = window.document.forms[0].text.value.length;
}