Thanks to Cameron Gregory at his site:

www.Bloke.com ... for the Javascript code. For loads more Javascript stuff visit his site - remember not all of it will work on a Dreamcast :(