code: public String getInitializationFooter(int numberOfPages, int selectedPage) {
  
          StringBuffer content = new StringBuffer(1024);
          content.append("top.dU(document,");
          content.append(numberOfPages);
          content.append(",");
          content.append(selectedPage);
          content.append("); \n");
  
          // display eventual error message
          if (getSettings().getErrorMessage() != null) {
              // display error message as JavaScript alert
              content.append("alert(\"");
              content.append(CmsStringUtil.escapeJavaScript(getSettings().getErrorMessage().key(getLocale())));
              content.append("\");\n");
              // delete error message container in settings
              getSettings().setErrorMessage(null);
          }
  
          // display eventual broadcast message(s)
          String message = getBroadcastMessageString();
          if (CmsStringUtil.isNotEmpty(message)) {
              // display broadcast as JavaScript alert
              content.append("alert(decodeURIComponent(\"");
              // the user has pending messages, display them all
              content.append(CmsEncoder.escapeWBlanks(message, CmsEncoder.ENCODING_UTF_8));
              content.append("\"));\n");
          }
  
          content.append("}\n");
          return content.toString();
      }
docs: Generates the footer of the explorer initialization code.<p>
  
  @param numberOfPages the number of pages
  @param selectedPage the selected page to display
  
  @return js code for initializing the explorer view
  
  @see #getInitializationHeader()
  @see #getInitializationEntry(CmsResourceUtil, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)