Thanks for the tip, I think you were indeed right. It’s really a shame that WordPress doesn’t provide real HTML support out of the box.
After messing around for a while, I finally found a simple and effective way to add the javascript to the right pages by using the nice plugin “CSS & Javascript Toolbox”.