doc.head().append("<script type=\"text/javascript\"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-354970-27']); _gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>");
doc.body().attr("data-worksheet-id", worksheet.id);
doc.body().attr("data-worksheet-ro-id", worksheet.readOnlyId);
final Element header = doc.body().appendElement("div").attr("id", "header");
header.appendElement("div").attr("id", "logo").text("LastCalc");
header.appendElement("div").attr("id", "help-button").text("Show Help");
final Element ws = doc.body().appendElement("div").attr("id", "worksheet");
ws.appendElement("div").attr("class", "groups").appendElement("a")
.attr("href", "https://github.com/sanity/LastCalc/wiki")
.attr("target", "_blank").html("LastCalc is open source! Read more...");