docs: public String buildIncludeJs() {
  
          StringBuffer html = new StringBuffer(512);
          html.append("<script type='text/javascript' src='");
          html.append(CmsWorkplace.getSkinUri());
          html.append("commons/ajax.js'></script>\n");
          html.append("<script type='text/javascript' src='");
          html.append(CmsWorkplace.getSkinUri());
          html.append("editors/xmlcontent/help.js'></script>\n");
          html.append("<script type='text/javascript' src='");
          html.append(CmsWorkplace.getSkinUri());
          html.append("admin/javascript/general.js'></script>\n");
          html.append("<script type='text/javascript' src='");
          html.append(CmsWorkplace.getSkinUri());
          html.append("admin/javascript/list.js'></script>\n");
          html.append("<script type='text/javascript'><!--\n");
          html.append("function showAjaxOk() {\n");
          html.append("\tdocument.getElementById('ajaxreport-img').src = '");
          html.append(CmsWorkplace.getSkinUri());
          html.append("commons/ok.png';\n");
          html.append("\tdocument.getElementById('ajaxreport-txt').innerHTML = '");
          html.append(key(Messages.GUI_OPERATION_NO_LOCKS_0));
          html.append("';\n");
          html.append("}\n");
          html.append("var ajaxReportContent = '';\n");
          html.append("var ajaxWaitMessage = '");
          html.append(CmsStringUtil.escapeJavaScript(buildAjaxWaitMessage()));
          html.append("';\n");
          html.append("function showAjaxReportContent() {\n");
          html.append("\tif (ajaxReportContent != '') {\n");
          html.append("\t\tdocument.getElementById('ajaxreport').innerHTML = ajaxReportContent;\n");
          html.append("\t}\n");
          html.append("}\n");
          html.append("function doReportUpdate(msg, state) {\n");
          html.append("\tvar img = state + '.png';\n");
          html.append("\tvar txt = '';\n");
          html.append("\tvar locks = -1;\n");
          html.append("\tvar blockinglocks = -1;\n");
          html.append("\tvar elem = document.getElementById('ajaxreport');\n");
          html.append("\tif (state != 'ok') {\n");
          html.append("\t\tif (state != 'wait') {\n");
          html.append("\t\t\tdocument.getElementById('lock-body-id').className = '';\n");
          html.append("\t\t}\n");
          html.append("\t\tvar img = state + '.png';\n");
          html.append("\t\tvar txt = msg;\n");
          html.append("\t\tif (state == 'fatal') {\n");
          html.append("\t\t\timg = 'error.png';\n");
          html.append("\t\t\ttxt = '");
          html.append(key(org.opencms.workplace.Messages.GUI_AJAX_REPORT_GIVEUP_0));
          html.append("';\n");
          html.append("\t\t} else if (state == 'wait') {\n");
          html.append("\t\t\timg = 'wait.gif';\n");
          html.append("\t\t\ttxt = '");
          html.append(key(org.opencms.workplace.Messages.GUI_AJAX_REPORT_WAIT_0));
          html.append("'\n");
          html.append("\t\t} else if (state == 'error') {\n");
          html.append("\t\t\ttxt = '");
          html.append(key(org.opencms.workplace.Messages.GUI_AJAX_REPORT_ERROR_0));
          html.append("' + msg;\n");
          html.append("\t\t}\n");
          html.append("\t\tdocument.getElementById('ajaxreport-img').src = '");
          html.append(CmsWorkplace.getSkinUri());
          html.append("commons/' + img;\n");
          html.append("\t\tdocument.getElementById('ajaxreport-txt').innerHTML = txt;\n");
          html.append("\t} else {\n");
          html.append("\t\telem.innerHTML = elem.innerHTML + msg.substring(0, 120);\n");
          html.append("\t\tajaxReportContent = msg;\n");
          html.append("\t}\n");
          html.append("\tif (txt != '') {\n");
          html.append("\t}\n");
          html.append("\tif (state == 'ok') {\n");
          html.append("\t\tlocks = document.forms['main'].locks.value;\n");
          html.append("\t\tblockinglocks = document.forms['main'].blockinglocks.value;\n");
          html.append("\t}\n");
          html.append("\tsetConfirmationMessage(locks, blockinglocks);\n");
          html.append("}\n");
          html.append("// -->\n");
          html.append("</script>\n");
          return html.toString();
      }