themachine I think the problem is with the Browser.ExecJS actions. If you search the manual at the Browser plugin you will see that is dangerous and unstable to inject JS functions .Browser object
Maybe use 3-rd party plugin ...like: Call JavaScript or FunctionExt
I never try them becouse are to complicated for me