Ho provato così ma non funziona...nessun errore ma non visualizza nemmeno nulla...
codice:
function CheckLength(theform, maxchars) {
    if (theform.value.length > maxchars) {
        theform.value = theform.value.substring(0, maxchars);
    } else {
        limit = maxchars - theform.value.length;
		theform.innerHTML = limit;
		
    }
	document.write('<span>'+limit+'</span>')
}
...tra il body...
<script>onkeyup=""textCounter(document.getElementB yId('Admin"&RsSEZ("ID_SEZ")&"').SEZ_TESTO,255);""</script>