code: public static void addJsHeadlines(final PrintWriter writer, final List jsHeadlines) {
  		if (jsHeadlines == null || jsHeadlines.isEmpty()) {
  			return;
  		}
  
  		writer.println();
  		writer.write("\n<!-- Start javascript headlines -->"
  				+ OPEN_JAVASCRIPT);
  
  		for (Iterator iter = jsHeadlines.iterator(); iter.hasNext();) {
  			String line = (String) iter.next();
  			writer.write("\n" + line);
  		}
  
  		writer.write(CLOSE_JAVASCRIPT
  				+ "\n<!-- End javascript headlines -->");
  	}
docs: Add a list of javascript headline entries intended to be added only once to the page.
  
  @param writer the writer to write to.
  @param jsHeadlines a list of javascript entries to be added to the page as a whole.