public void sendReply_cgibin_configmenu_cgi(MyHTTPServer socket, String cookie) throws Exception
	{
		System.out.println("sendReply_cgibin_configmenu_cgi START");
		List<String> reply = new ArrayList<String>();

		addHTTP200(reply, cookie);
		addPageHeader(reply, "");

		reply.add("<FORM ACTION=\"/cgi-bin/config-do.cgi\" METHOD=\"POST\">\n");

		reply.add("<H1>Nagios handling parameters</H1>\n");
		reply.add("<TABLE>\n");
		reply.add("<TR><TD>Always notify:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"always_notify\" VALUE=\"on\" " + isChecked(config.getAlwaysNotify()) + "></TD><TD>Also display when notifications are disabled</TD></TR>\n");
		reply.add("<TR><TD>Also acknowledged:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"also_acknowledged\" VALUE=\"on\" " + isChecked(config.getAlsoAcknowledged()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Host problem acknowledged, show services problems:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"host_also_acknowledged\" VALUE=\"on\" " + isChecked(config.getHostAcknowledgedShowServices()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Also scheduled downtime</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"also_scheduled_downtime\" VALUE=\"on\" " + isChecked(config.getAlsoScheduledDowntime()) + "></TD><TD>Also display problems for which downtime has been scheduled</TD></TR>\n");
		reply.add("<TR><TD>Host scheduled downtime, show services problems:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"host_also_scheduled_downtime\" VALUE=\"on\" " + isChecked(config.getHostScheduledDowntimeShowServices()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Also soft state:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"also_soft_State\" VALUE=\"on\" " + isChecked(config.getAlsoSoftState()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Also disabled checks:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"also_disabled_active_checks\" VALUE=\"on\" " + isChecked(config.getAlsoDisabledActiveChecks()) + "></TD><TD>Also display problems for which active checks have been disabled</TD></TR>\n");
		reply.add("<TR><TD>Show services for host with problems:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"show_services_for_host_with_problems\" VALUE=\"on\" " + isChecked(config.getShowServicesForHostWithProblems()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Show services for host with acked/scheduled downtime:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"host_scheduled_downtime_or_ack_show_services\" VALUE=\"on\" " + isChecked(config.getHostSDOrAckShowServices()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Show flapping:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"show-flapping\" VALUE=\"on\" " + isChecked(config.getShowFlapping()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Maximum check age (to see<BR>if Nagios still runs):</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"max-check-age\" VALUE=\"" + config.getMaxCheckAge() + "\"></TD><TD>Set to -1 to disable</TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("<BR>\n");

		reply.add("<H1>Network parameters</H1>\n");
		reply.add("Please note that after you click on submit, the new network-settings are applied immeditately.<BR>\n");
		reply.add("<TABLE>\n");
		String proxyHost = config.getProxyHost();
		reply.add("<TR><TD>HTTP proxy (for outbound connections) host:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"proxy-host\" VALUE=\"" + (proxyHost != null ? proxyHost : "") + "\"></TD><TD>empty to disable</TD></TR>\n");
		reply.add("<TR><TD>HTTP proxy port:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"proxy-port\" VALUE=\"" + (proxyHost != null ? "" + config.getProxyPort() : "8080") + "\"></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Network interface to listen on:</TD><TD><SELECT NAME=\"network-interface\"><OPTION VALUE=\"0.0.0.0\"" + (config.getHTTPServerListenAdapter().equals("0.0.0.0") == true ? " SELECTED" : "") + ">All interfaces</OPTION>");
		Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
		for (NetworkInterface netint : Collections.list(nets))
		{
			Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
			for (InetAddress inetAddress : Collections.list(inetAddresses))
			{
				String address = inetAddress.toString().substring(1);
				int percent = address.indexOf("%");
				if (percent != -1)
					address = address.substring(0, percent);
				reply.add("<OPTION VALUE\"" + address + "\"" + (config.getHTTPServerListenAdapter().equals(address) == true ? " SELECTED" : "") + ">" + address + "</OPTION>");
			}
		}
		reply.add("</TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Port to listen on:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"network-port\" VALUE=\"" + config.getHTTPServerListenPort() + "\"></TD><TD></TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("<BR>\n");

		reply.add("<H1>Nagios server(s)</H1>\n");
		reply.add("See the <A HREF=\"http://vanheusden.com/java/CoffeeSaint/#howto\">CoffeeSaint website</A> to see what you can enter here.<BR>\n");
		reply.add("Please note that 'username' and 'password' are only for 'http-auth'.<BR>\n");
		reply.add("Also please note that http/https are NOT the urls of the Nagios web-interface but URLs of the status.dat-file. See <A HREF=\"http://vanheusden.com/java/CoffeeSaint/#url\">this page</A> for more info.<BR>\n");
		reply.add("<TABLE>\n");
		reply.add("<TR><TD><B>type</B></TD><TD><B>Nagios version</B></TD><TD><B>data source</B></TD><TD><B>remove?</B></TD><TD><B>username</B></TD><TD><B>password</B></TD><TD><B>pretty name</B></TD></TR>\n");
		for(NagiosDataSource dataSource : config.getNagiosDataSources())
		{
			String type = "?", username = "", password = "";
			if (dataSource.getType() == NagiosDataSourceType.TCP)
				type = "tcp";
			else if (dataSource.getType() == NagiosDataSourceType.ZTCP)
				type = "compressed tcp";
			else if (dataSource.getType() == NagiosDataSourceType.LS)
				type = "LiveStatus tcp socket";
			else if (dataSource.getType() == NagiosDataSourceType.HTTP)
			{
				if (dataSource.getUsername() != null)
				{
					type = "http-auth";
					username = dataSource.getUsername();
					password = dataSource.getPassword();
				}
				else
					type = "http";
			}
			else if (dataSource.getType() == NagiosDataSourceType.FILE)
				type = "file";

			String version = "?";
			if (dataSource.getVersion() == NagiosVersion.V1)
				version = "1";
			else if (dataSource.getVersion() == NagiosVersion.V2)
				version = "2";
			else if (dataSource.getVersion() == NagiosVersion.V3)
				version = "3";

			String parameters = "?";
			if (dataSource.getType() == NagiosDataSourceType.TCP || dataSource.getType() == NagiosDataSourceType.ZTCP || dataSource.getType() == NagiosDataSourceType.LS)
				parameters = dataSource.getHost() + " " + dataSource.getPort();
			else if (dataSource.getType() == NagiosDataSourceType.HTTP)
				parameters = dataSource.getURL().toString();
			else if (dataSource.getType() == NagiosDataSourceType.FILE)
				parameters = dataSource.getFile();

			String pn = dataSource.getPrettyName();
			if (pn == null)
				pn = "";

			String serverString = parameters;
			reply.add("<TR><TD>" + type + "</TD><TD>" + version + "</TD><TD>" + parameters + "</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"serverid_" + serverString.hashCode() + "\" VALUE=\"on\"></TD><TD>" + username + "</TD><TD>" + password +"</TD><TD>" + pn + "</TD></TR>\n");
		}
		reply.add("<TR>\n");
		reply.add("<TD><SELECT NAME=\"server-add-type\"><OPTION VALUE=\"tcp\">TCP</OPTION><OPTION VALUE=\"ztcp\">GZIP compressed TCP</OPTION><OPTION VALUE=\"ls\">LiveStatus TCP socket</OPTION><OPTION VALUE=\"http\">HTTP</OPTION><OPTION VALUE=\"file\">FILE</OPTION></SELECT></TD>\n");
		reply.add("<TD><SELECT NAME=\"server-add-version\"><OPTION VALUE=\"1\">1</OPTION><OPTION VALUE=\"2\">2</OPTION><OPTION VALUE=\"3\" SELECTED>3</OPTION></SELECT></TD>\n");
		reply.add("<TD><INPUT TYPE=\"TEXT\" NAME=\"server-add-parameters\"></TD>\n");
		reply.add("<TD></TD>\n");
		reply.add("<TD><INPUT TYPE=\"TEXT\" NAME=\"nagios-http-username\"></TD>\n");
		reply.add("<TD><INPUT TYPE=\"PASSWORD\" NAME=\"nagios-http-password\"></TD>\n");
		reply.add("<TD><INPUT TYPE=\"TEXT\" NAME=\"nagios-pretty-name\"></TD>\n");
		reply.add("</TR>\n");
		reply.add("<TR><TD>Use HTTP compression:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"disable-http-compression\" VALUE=\"on\" " + isChecked(config.getAllowHTTPCompression()) + "></TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("TCP requires an ip-address followed by a space and a port-number in the parameters field.<BR>\n");
		reply.add("<BR>\n");

		reply.add("<H1>Look and feel parameters</H1>\n");
		reply.add("<TABLE>\n");
		reply.add("<TR><TD>Refresh interval:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"sleepTime\" VALUE=\"" + config.getSleepTime() + "\"></TD><TD>&gt; 1</TD></TR>\n");
		reply.add("<TR><TD>Double buffering:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"double-buffering\" VALUE=\"on\" " + isChecked(config.getDoubleBuffering()) + "></TD><TD>Might speed-up/slow-down screen refreshes</TD></TR>\n");
		reply.add("<TR><TD>Fullscreen mode:</TD><TD><SELECT NAME=\"fullscreen\">\n");
		reply.add(selectField(config.getFullscreenName(), "none"));
		reply.add(selectField(config.getFullscreenName(), "undecorated"));
		reply.add(selectField(config.getFullscreenName(), "fullscreen"));
		reply.add(selectField(config.getFullscreenName(), "allmonitors"));
		reply.add("</SELECT></TD><TD>Requires restart of CoffeeSaint.</TD></TR>\n");
		if (config.getRunGui()) {
			reply.add("<TR><TD>Select monitor:</TD><TD><SELECT NAME=\"use-screen\">\n");
			reply.add(selectField(config.getUseScreen(), "ALL"));
			List<Monitor> monitors = CoffeeSaint.getMonitors();
			for(Monitor monitor : monitors)
				reply.add(selectField(config.getUseScreen(), monitor.getDeviceName()));
			reply.add("</SELECT></TD><TD>Requires restart of CoffeeSaint.</TD></TR>\n");
		}
		reply.add("<TR><TD>Show counter:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"counter\" VALUE=\"on\" " + isChecked(config.getCounter()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Counter position:</TD><TD><SELECT NAME=\"counter-position\">\n");
		reply.add(selectField(config.getCounterPositionName(), "upper-left"));
		reply.add(selectField(config.getCounterPositionName(), "upper-right"));
		reply.add(selectField(config.getCounterPositionName(), "lower-left"));
		reply.add(selectField(config.getCounterPositionName(), "lower-right"));
		reply.add(selectField(config.getCounterPositionName(), "center"));
		reply.add("</SELECT></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Verbose:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"verbose\" VALUE=\"on\" " + isChecked(config.getVerbose()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Number of rows:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"nRows\" VALUE=\"" + config.getNRows() + "\"></TD><TD>&gt;= 3</TD></TR>\n");
		reply.add("<TR><TD>Minimum row height:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"min-row-height\" VALUE=\"" + config.getMinRowHeight() + "\"></TD><TD>or -1 to not auto adjust the row height</TD></TR>\n");
		reply.add("<TR><TD>Number of columns:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"problem-columns\" VALUE=\"" + config.getNProblemCols() + "\"></TD><TD>&gt;= 1</TD></TR>\n");
		reply.add("<TR><TD>Flexible number of columns:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"flexible-n-columns\" VALUE=\"on\" " + isChecked(config.getFlexibleNColumns()) + "></TD><TD>Use in combination with number of columns</TD></TR>\n");
		GraphicsEnvironment lge = GraphicsEnvironment.getLocalGraphicsEnvironment();
		List<String> fontNames = CoffeeSaint.convertStringArrayToList(lge.getAvailableFontFamilyNames());
		reply.add("<TR><TD>Font:</TD><TD>");
		stringSelectorHTML(reply, "font", fontNames, config.getFontName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Warning font:</TD><TD>");
		stringSelectorHTML(reply, "warning-font", fontNames, config.getWarningFontName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Critical font:</TD><TD>");
		stringSelectorHTML(reply, "critical-font", fontNames, config.getCriticalFontName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Reduce text width to fit to screen:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"reduce-textwidth\" VALUE=\"on\" " + isChecked(config.getReduceTextWidth()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Anti-alias:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"anti-alias\" VALUE=\"on\" " + isChecked(config.getAntiAlias()) + "></TD><TD>Slows down considerably in some situations but improves how fonts are shown</TD></TR>\n");
		reply.add("<TR><TD>Max. quality graphics:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"max-quality-graphics\" VALUE=\"on\" " + isChecked(config.getMaxQualityGraphics()) + "></TD><TD>Slows down considerably in some situations</TD></TR>\n");
		reply.add("<TR><TD>Transparency:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"transparency\" VALUE=\"" + config.getTransparency() + "\"></TD><TD>0.0...1.0 only usefull with background image/webcam, 1.0 = not transparent</TD></TR>\n");
		reply.add("<TR><TD>Header transparency:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"header-transparency\" VALUE=\"" + config.getHeaderTransparency() + "\"></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Row border:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"row-border\" VALUE=\"on\" " + isChecked(config.getRowBorder()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Header border height:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"upper-row-border-height\" VALUE=\"" + config.getUpperRowBorderHeight() + "\"></TD><TD>In case you want a thicker bar between the header and the problem list.</TD></TR>\n");
		reply.add("<TR><TD>Row border color:</TD><TD>\n");
		colorSelectorHTML(reply, "row-border-color", config.getRowBorderColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Graph color:</TD><TD>\n");
		colorSelectorHTML(reply, "graph-color", config.getGraphColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		// reply.add("<TR><TD>Header background color:</TD><TD>\n");
		// colorSelectorHTML(reply, "header-color", config.getHeaderColorName(), true);
		// reply.add("</TD><TD>Select 'NONE' for state-color(!).</TD></TR>");
		reply.add("<TR><TD>Text color:</TD><TD>\n");
		colorSelectorHTML(reply, "textColor", config.getTextColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Warning text color:</TD><TD>\n");
		colorSelectorHTML(reply, "warningTextColor", config.getWarningTextColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Critical text color:</TD><TD>\n");
		colorSelectorHTML(reply, "criticalTextColor", config.getCriticalTextColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Background color:</TD><TD>\n");
		colorSelectorHTML(reply, "backgroundColor", config.getBackgroundColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Background fade-to color:</TD><TD>\n");
		colorSelectorHTML(reply, "bgcolor-fade-to", config.getBackgroundColorFadeToName(), true);
		reply.add("</TD><TD>(color gradient)</TD></TR>");
		reply.add("<TR><TD>Problem bar fade-to-color:</TD><TD>\n");
		colorSelectorHTML(reply, "problem-row-gradient", config.getProblemRowGradientName(), true);
		reply.add("</TD><TD>(color gradient)</TD></TR>");
		reply.add("<TR><TD>Background color OK-status:</TD><TD>\n");
		colorSelectorHTML(reply, "bgColorOk", config.getBackgroundColorOkStatusName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Background color warning-status (HARD):</TD><TD>\n");
		colorSelectorHTML(reply, "warning-bg-color", config.getWarningBgColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Background color warning-status (SOFT):</TD><TD>\n");
		colorSelectorHTML(reply, "warning-bg-color-soft", config.getWarningBgColorNameSoft(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Background color critical-status (HARD):</TD><TD>\n");
		colorSelectorHTML(reply, "critical-bg-color", config.getCriticalBgColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Background color critical-status (SOFT):</TD><TD>\n");
		colorSelectorHTML(reply, "critical-bg-color-soft", config.getCriticalBgColorNameSoft(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Background color unknown-status:</TD><TD>\n");
		colorSelectorHTML(reply, "unknown-bg-color", config.getNagiosUnknownBgColorName(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Let bg color depend on state:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"color-bg-to-state\" VALUE=\"on\" " + isChecked(config.getSetBgColorToState()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Host issues:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"host-issue\" VALUE=\"" + config.getHostIssue() + "\"></TD><TD><A HREF=\"/help-escapes.html\" TARGET=\"_new\">List of escapes</A></TD></TR>\n");
		reply.add("<TR><TD>Service issues:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"service-issue\" VALUE=\"" + config.getServiceIssue() + "\"></TD><TD><A HREF=\"/help-escapes.html\" TARGET=\"_new\">List of escapes</A></TD></TR>\n");
		reply.add("<TR><TD>Header:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"header\" VALUE=\"" + config.getHeader() + "\"></TD><TD><A HREF=\"/help-escapes.html\" TARGET=\"_new\">List of escapes</A></TD></TR>\n");
		reply.add("<TR><TD>Footer:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"footer\" VALUE=\"" + (config.getFooter() != null ? config.getFooter() : "") + "\"></TD><TD><A HREF=\"/help-escapes.html\" TARGET=\"_new\">List of escapes</A></TD></TR>\n");
		reply.add("<TR><TD>Show header:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"show-header\" VALUE=\"on\" " + isChecked(config.getShowHeader()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Flash (blink) problems:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"flash\" VALUE=\"on\" " + isChecked(config.getFlash()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Show unknown:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"display-unknown\" VALUE=\"on\" " + isChecked(config.getDisplayUnknown()) + "></TD><TD>Display with unknown/pending state</TD></TR>\n");
		reply.add("<TR><TD>Show flapping icon:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"show-flapping-icon\" VALUE=\"on\" " + isChecked(config.getShowFlappingIcon()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Header always bg color:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"header-always-bgcolor\" VALUE=\"on\" " + isChecked(config.getHeaderAlwaysBGColor()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Scroll header:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"scrolling-header\" VALUE=\"on\" " + isChecked(config.getScrollingHeader()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Scroll footer:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"scrolling-footer\" VALUE=\"on\" " + isChecked(config.getScrollingFooter()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Scroll problems:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"scroll-if-not-fitting\" VALUE=\"on\" " + isChecked(config.getScrollIfNotFit()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Scroll pixels/sec:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"scroll-pixels-per-sec\" VALUE=\"" + config.getScrollingPixelsPerSecond() + "\"></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Text split offsets:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"scroll-splitter\" VALUE=\"" + (config.getLineScrollSplitterString() == null ? "" : "" + config.getLineScrollSplitterString()) + "\"></TD><TD>At what offsets start drawing<BR> the \\T text splitters (tab stops).</TD></TR>\n");
		reply.add("<TR><TD>Draw split-line:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"draw-problems-service-split-line\" VALUE=\"on\" " + isChecked(config.getDrawProblemServiceSplitLine()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Sort order:</TD><TD>\n");
		stringSelectorHTML(reply, "sort-order", config.getSortFields(), config.getSortOrder(), false);
		reply.add("</TD><TD></TD></TR>");
		reply.add("<TR><TD>Sort numeric:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"sort-order-numeric\" VALUE=\"on\" " + isChecked(config.getSortOrderNumeric()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Sort reverse:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"sort-order-reverse\" VALUE=\"on\" " + isChecked(config.getSortOrderReverse()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Sparkline size:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"sparkline-size\" VALUE=\"" + config.getSparkLineWidth() +  "\"></TD><TD>In number of pixels, 0 to disable</TD></TR>\n");
		reply.add("<TR><TD>Sparkline draw mode:</TD><TD><SELECT NAME=\"sparkline-mode\">");
		reply.add("<OPTION VALUE=\"avg-sd\"" + (config.getSparklineGraphMode() == SparklineGraphMode.AVG_SD ? " SELECTED" : "") + ">scale to average &amp; standard deviation</OPTION>\n");
		reply.add("<OPTION VALUE=\"min-max\"" + (config.getSparklineGraphMode() == SparklineGraphMode.MIN_MAX ? " SELECTED" : "") + ">scale between min and max</OPTION>\n");
		reply.add("</SELECT></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Ok message:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"no-problems-text\" VALUE=\"" + (config.getNoProblemsText() != null ? config.getNoProblemsText() : "") + "\"></TD><TD>Message to show if there are no problems.</TD></TR>\n");
		reply.add("<TR><TD>Ok message position:</TD><TD><SELECT NAME=\"no-problems-text-position\">\n");
		reply.add(selectField(config.getNoProblemsTextPositionName(), "upper-left"));
		reply.add(selectField(config.getNoProblemsTextPositionName(), "upper-right"));
		reply.add(selectField(config.getNoProblemsTextPositionName(), "lower-left"));
		reply.add(selectField(config.getNoProblemsTextPositionName(), "lower-right"));
		reply.add(selectField(config.getNoProblemsTextPositionName(), "center"));
		reply.add(selectField(config.getNoProblemsTextPositionName(), "nowhere"));
		reply.add("</SELECT></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Problem message:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"state-problems-text\" VALUE=\"" + (config.getStateProblemsText() != null ? config.getStateProblemsText() : "") + "\"></TD><TD>Used in the %STATE escape string.</TD></TR>\n");
		reply.add("<TR><TD>Problem message bg color:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"no-problems-text-with-bg-color\" VALUE=\"on\" " + isChecked(config.getNoProblemsTextBg()) + "></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Logo:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"logo-url\" VALUE=\"" + (config.getLogo() != null ? config.getLogo() : "") + "\"></TD><TD>Either a pathname or an URL.</TD></TR>\n");
		reply.add("<TR><TD>Logo position:</TD><TD><SELECT NAME=\"logo-position\">\n");
		Position lp = config.getLogoPosition();
		reply.add("<OPTION VALUE=\"left\"");
		if (lp == Position.LEFT || lp == Position.UPPER_LEFT)
			reply.add(" SELECTED");
		reply.add(">left</OPTION>");
		reply.add("<OPTION VALUE=\"right\"");
		if (lp == Position.RIGHT || lp == Position.UPPER_RIGHT)
			reply.add(" SELECTED");
		reply.add(">right</OPTION>");
		reply.add("</SELECT></TD><TD></TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("<BR>\n");

		if (config.getDisableHTTPFileselect() == false)
		{
			reply.add("<H1>Files</H1>\n");
			reply.add("<TABLE>\n");
			reply.add("<TR><TD>File to store prediction data in:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"brain-file\" VALUE=\"" + (config.getBrainFileName() != null ? config.getBrainFileName() : "")+ "\"></TD><TD>Used for predicting problem count</TD></TR>\n");
			reply.add("<TR><TD>File to store performance data in:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"performance-data\" VALUE=\"" + (config.getPerformanceDataFileName() != null ? config.getPerformanceDataFileName() : "") + "\"></TD><TD>Used for sparklines</TD></TR>\n");
			reply.add("<TR><TD>File to store latency data in:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"latency-file\" VALUE=\"" + (config.getLatencyFile() != null ? config.getLatencyFile() : "") + "\"></TD><TD></TD></TR>\n");
			reply.add("</TABLE>\n");
			reply.add("<BR>\n");
		}

		reply.add("<H1>Filters</H1>\n");
		reply.add("<TABLE>\n");
		reply.add("<TR><TD>Hosts to place at the top:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"prefer\" VALUE=\"" + config.getPrefersList() + "\"></TD><TD>Comma-seperated list (can be regular expressions)</TD></TR>\n");
		reply.add("<TR><TD>Hosts filter exclude list:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"hosts-filter-exclude-list\" VALUE=\"" + config.getHostsFilterExcludeList() + "\"></TD><TD>Comma-seperated list (can be regular expressions)</TD></TR>\n");
		reply.add("<TR><TD>Hosts filter include list:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"hosts-filter-include-list\" VALUE=\"" + config.getHostsFilterIncludeList() + "\"></TD><TD>(are applied after processing the exclude list)</TD></TR>\n");
		reply.add("<TR><TD>Services filter exclude list:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"services-filter-exclude-list\" VALUE=\"" + config.getServicesFilterExcludeList() + "\"></TD><TD>See host-filter comments</TD></TR>\n");
		reply.add("<TR><TD>Services filter include list:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"services-filter-include-list\" VALUE=\"" + config.getServicesFilterIncludeList() + "\"></TD><TD></TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("<BR>\n");

		reply.add("<H1>Multimedia</H1>\n");
		reply.add("<H2>Warning sound</H2>\n");
		reply.add("<TABLE>\n");
		reply.add("<TR><TD>Warning sound:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"warning-sound\" VALUE=\"" + config.getProblemSound() + "\"></TD><TD>File path</TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("<H2>Webcams</H2>\n");
		reply.add("Please note: regular JPEG camera's require type \"HTTP\" or \"HTTPS\". Streaming webcams require \"MJPEG\".<BR>\n");
		reply.add("<TABLE>\n");
		for(String image : config.getImageUrls())
			reply.add("<TR><TD>Remove webcam:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"webcam_" + image.hashCode() + "\" VALUE=\"on\"><A HREF=\"" + image + "\" TARGET=\"_new\">" + image + "</A></TD></TR>\n");
		reply.add("<TR><TD>Add webcam:</TD><TD><SELECT NAME=\"newWebcamType\"><OPTION VALUE=\"MJPEG\">MJPEG</OPTION><OPTION VALUE=\"HTTP\">HTTP</OPTION><OPTION VALUE=\"HTTPS\">HTTPS</OPTION><OPTION VALUE=\"FILE\">FILE</OPTION></SELECT> <INPUT TYPE=\"TEXT\" NAME=\"newWebcam\"></TD></TR>\n");
		String to;
		if (config.getWebcamTimeout() == -1)
			to = "";
		else
			to = "" + config.getWebcamTimeout();
		reply.add("<TR><TD>Loading timeout:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"webcam-timeout\" VALUE=\"" + to + "\"></TD><TD>In seconds, &gt; 1, leave empty to disable</TD></TR>\n");
		reply.add("<TR><TD>Adapt image size:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"adapt-img\" VALUE=\"on\" " + isChecked(config.getAdaptImageSize()) + "> (fit below list of problems)</TD></TR>\n");
		reply.add("<TR><TD>Randomize order of images:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"random-img\" VALUE=\"on\" " + isChecked(config.getRandomWebcam()) + "></TD></TR>\n");
		reply.add("<TR><TD>Number of columns:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"cam-cols\" VALUE=\"" + config.getCamCols() + "\"></TD></TR>\n");
		reply.add("<TR><TD>Number of rows:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"cam-rows\" VALUE=\"" + config.getCamRows() + "\"></TD></TR>\n");
		reply.add("<TR><TD>Keep aspect ratio:</TD><TD><INPUT TYPE=\"CHECKBOX\" NAME=\"keep-aspect-ratio\" VALUE=\"on\" " + isChecked(config.getKeepAspectRatio()) + "></TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("<BR>\n");

		reply.add("<H1>Web-interface uthentication(s)</H1>\n");
		reply.add("<FONT SIZE=-1>Leave these fields empty to disable web-interface authentication.<BR>\n");
		reply.add("<TABLE>\n");
		reply.add("<TR><TD>Authentication timeout:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"web-expire-time\" VALUE=\"" + config.getWebSessionExpire() + "\"></TD><TD>In seconds, &gt; 1</TD></TR>\n");
		reply.add("<TR><TD>Username:</TD><TD><INPUT TYPE=\"TEXT\" NAME=\"web-username\" VALUE=\"" + (config.getWebUsername() != null ? config.getWebUsername() : "") + "\"></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>New password:</TD><TD><INPUT TYPE=\"PASSWORD\" NAME=\"web-password1\" VALUE=\"" + (config.getWebPassword() != null ? config.getWebPassword() : "") + "\"></TD><TD></TD></TR>\n");
		reply.add("<TR><TD>Confirm new password:</TD><TD><INPUT TYPE=\"PASSWORD\" NAME=\"web-password2\" VALUE=\"" + (config.getWebPassword() != null ? config.getWebPassword() : "") + "\"></TD><TD>Please repeat.</TD></TR>\n");
		reply.add("</TABLE>\n");
		reply.add("<BR>\n");

		reply.add("<H1>Submit changes</H1>\n");
		reply.add("<INPUT TYPE=\"SUBMIT\" VALUE=\"Submit changes!\"><BR>\n");
		reply.add("<BR>\n");

		reply.add("</FORM>\n");

		addPageTail(reply, true);

		socket.sendReply(reply);
		System.out.println("sendReply_cgibin_configmenu_cgi END");
	}