This is the NervousText applet in javascript:
The test assumes that applet code is generated with:
java -classpath js.jar \
  -extends java.applet.Applet \
  -implements java.lang.Runnable \
and the resulting 2 classes, NervousText.class extending java.applet.Applet and implementing java.lang.Runnable and NervousText1.class which represents compiled JavaScript code, are placed in the same directory as NervousText.html.

The test also assumes that js.jar from Rhino distribution is available in the same directory.