Mixing php, javascript, html and relying on browser version compatability rather than just using php and html is overcomplicating things in my opinion.
What would you use javascript for? Just the refresh? Why bother, the one liner meta refresh does the task. As far as scrolling down, I use anchor tags and have it refresh to the newest one. This scrolls the page in the iFRAME, and again, is simpler than trying to get some javascript scrolling pos to work.
If you wanted to get real fancy, you could have an invisible iframe inside the chatbox iframe, for some live updating for user info, etc.