[sorry for sending two mails...]<br>BTW, I found the html issue I think. Lines 100 and 101 should be<div>html += <span>"<span>\n</span>"</span>.<span>join</span><span>(</span>htmlParts<span>)</span><br>
html += <span>"</body></html>"</span></div>instead of "htmlParts +="<br>