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.