<!--
  lastLen = 0;

  /**
   * Check the the content's length of the given widget, using a given maximum
   * length and a given counter to display the number of remaining characters.
   */
  function checkLength(widget, maxLength, counterId)
  {
    len = widget.value.length;

    if (len == lastLen)
      return;

    if (len > maxLength)
    {
      widget.value = widget.value.substring(0, maxLength);

      count = 0;
    }
    else
      count = maxLength - len;

    document.getElementById(counterId).innerHTML = count;

    lastLen = len;
  }
-->
