function counterUpdate(box) {
  count = box + "ct"
  field = document.getElementById(box);
  if ( field )
    {
      if(field.value.length >= 1024)
	field.value = field.value.substring(0, 1024);
    }
  txt_field = document.getElementById(count);
  if ( txt_field )
    {	
      txt_field.innerHTML = field.value.length;
    }
}
function sf(box) {
  count = box + "ct"
  counterUpdate(box, count);
  if ( document.f && document.f.box )
    {
      document.f.box.focus();
    }
}
