Aaah, I see, HTML5. Have you seen this thread? http://forums.adobe.com/thread/1202496?tstart=0
The specific statements you're using at the moment to refer to Captivate variables (objCP.cpEISetValue and such) are not meant for HTML5, which has its own JavaScript API. When you preview with F12 it is a Flash output, which will work with what you have, but once you publish as HTML5 the code is no longer the right syntax.
I don't know if fixing those statements will completely solve your problem, but it's where I'd start.