Javascript runs in IE-based publ. but not in a Stand-alone

Dear experts,
I am trying to figure out whether or not HE could do what I need and I ran into the following problem:
The below inserted javascript runs in an IE-based publication but not in a Stand-alone HTML viewer one.

----------- I am no programmer ;-( but have to put together a Stand-alone version from quite a few html files with javascripts in some of them for interactive elements like in the above example.

I would honestly appreciate, if you could point out to me where to look for clues for what I am doing wrong or even know the answer.

Software-info: HE 3.6.5 on XP SP3

Unfortunately, HTML viewer publications do not handle JavaScript. Please see: http://www.htmlexe.com/help/htmlviewerpub.htm

I recommend you to stay with an IE publication instead. Do not worry about using this publication type: it doesn’t need any additional program as
now IE components are shipped with Windows itself, so you can consider IE publications as stand-alone too.