document.write html ending tags should be escaped

See http://www.htmlhelp.com/tools/validator/problems.html#script, the ending tags for the frames were not escaped properly in the javascript code.
Merge pull request #386 from liedekef/patch-2

document.write html ending tags should be escaped