the loading time is actually only a minimal problem. the .js file is cached after the first time, so it's only downloaded once. also, one of the members of this forum ( i forget who ), built this html2javascript converter, which should help you.
http://www.simonsgroup.com/test/html2javascript/html2javascript.html