Actually TinyMce editor is not supposed to use Javascript inside it.
It looks like you've posted it in the source code - so it should be executable.
But TinyMCE editor modify javascript code - so it maybe be changed, the code can become nonfunctioning or removed.
In this thread on TinyMCE forums similar problem is discussed:
http://www.tinymce.com/forum/viewtopic.php?id=15899
In your case it adds CDATA section to javascript code, as the result it breaks forum XML.
I haven't found any settings option in TinyMCE to control this behaviour of TinyMCE.
There are some patches, but most of them are for particular version of TinyMCE and can't be applicable.