Here's a user sub to set the title of a page, via script, from an RB program:

'sets the title of the window via script
sub doctitle title$
html "<script>document.title = '"; title$ ; "';</script>"
end sub