How to use javascript in rhtml

Take a look at http://lena.franken.de/software/javascript/