code: public static void setViewerMode(Page page, HelpViewerMode mode) {
          if (getViewerMode(page) != mode) {
              removeViewer(page, true);
          }
  
          page.setAttribute(EMBEDDED_ATTRIB, mode);
      }
docs: Sets the help viewer mode for the specified page. If different from the previous mode and a
  viewer for this page exists, the viewer will be removed and recreated on the next request.
  
  @param page The target page.
  @param mode The help viewer mode.