closing <div> tags to avoid .innerHTML JS errors on XHTML pages