To allow a Tiny MCE editor to accept javascript, you must add the extended_valid_elements attribute to allow the scripts tags. If not, Tiny MCE will automatically remove these tags to prevent script injection.
tinymce.init({
.....
extended_valid_elements : "script[language|type|src]"
});