This example work OK in FireFox and IE5.5+ browsers, the extraction of JS code works OK in SpiderMonkey, but in Rhino fails.
We are using Rhino in Cocoon, in standalone Java applications and our Eclipse plug-ins.
We are using JavaScript for DHTML (see GeaBios Public Service)
Here is the link to download the code for SpiderMonkey/Rhino standalone test.