il campo
chr.value=maxchars1-appunti.value.length;
mi dice che non è definito
in effetti... a cosa dovrevve corrispondere chr ?