docs: public static void writeDateJavaScript(Date date, Sequence sequence, Appendable out, Appendable scriptOut) throws IOException {
  		if(date==null) out.append("&#160;");
  		else {
  			String dateString = SQLUtility.getDate(date.getTime());
  			long id = sequence.getNextSequenceValue();
  			String idString = Long.toString(id);
  			// Write the element
  			out.append("<span id=\"chainWriterDate");
  			out.append(idString);
  			out.append("\">");
  			encodeTextInXhtml(dateString, out);
  			out.append("</span>");
  			// Write the shared script only on first sequence
  			if(id==1) {
  				scriptOut.append("  function chainWriterUpdateDate(id, millis, serverValue) {\n"
  							   + "    if(document.getElementById) {\n"
  							   + "      var date=new Date(millis);\n"
  							   + "      var clientValue=date.getFullYear() + \"-\";\n"
  							   + "      var month=date.getMonth()+1;\n"
  							   + "      if(month<10) clientValue+=\"0\";\n"
  							   + "      clientValue+=month+\"-\";\n"
  							   + "      var day=date.getDate();\n"
  							   + "      if(day<10) clientValue+=\"0\";\n"
  							   + "      clientValue+=day;\n"
  							   + "      if(clientValue!=serverValue) document.getElementById(\"chainWriterDate\"+id).firstChild.nodeValue=clientValue;\n"
  							   + "    }\n"
  							   + "  }\n");
  			}
  			scriptOut.append("  chainWriterUpdateDate(");
  			scriptOut.append(idString);
  			scriptOut.append(", ");
  			scriptOut.append(Long.toString(date.getTime()));
  			scriptOut.append(", \"");
  			encodeJavaScriptInXhtml(dateString, scriptOut);
  			scriptOut.append("\");\n");
  		}
  	}