Index: package_branches/invirt-web/cherrypy/code/templates/functions.mako
===================================================================
--- package_branches/invirt-web/cherrypy/code/templates/functions.mako	(revision 2395)
+++ package_branches/invirt-web/cherrypy/code/templates/functions.mako	(revision 2400)
@@ -39,2 +39,12 @@
 % endif
 </%def>
+
+<%!
+def jquote(string):
+    return "'" + string.replace('\\', '\\\\').replace("'", "\\'").replace('\n', '\\n') + "'"
+%>
+
+<%def name="helppopup(subj)">
+## Return HTML code for a (?) link to a specified help topic
+<span class="helplink"><a href="help?simple=true;subject=${subj | u}" target="_blank" onclick="return helppopup(${subj | jquote,u})">(?)</a></span>
+</%def>
