sciss - 2011-10-20

i am having trouble using pages which embed dom style javascript manipulations. e.g. a function like this:

function fixTOC() {
    var x = document.getElementsByClassName("lang-sc");
    ...

this page throws the following error when loading:

20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440] Oct 20, 2011 8:33:18 PM org.lobobrowser.html.js.Executor executeFunction
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440] WARNING: executeFunction(): There was an error in Javascript code.
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440] org.mozilla.javascript.EcmaError: TypeError: Cannot find function getElementsByClassName in object #document. (file:/Users/hhrutz/Library/Application Support/SuperCollider/Help/scdoc.js#318)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3785)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3763)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3791)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3810)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3881)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2360)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2327)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1514)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at script.fixTOC(file:/Users/hhrutz/Library/Application Support/SuperCollider/Help/scdoc.js:318)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.SecurityControllerImpl$1.run(SecurityControllerImpl.java:44)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at java.security.AccessController.doPrivileged(Native Method)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.SecurityControllerImpl.callWithDomain(SecurityControllerImpl.java:48)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:841)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at script.did_load(file:/Users/hhrutz/Library/Application Support/SuperCollider/Help/Overviews/Methods.html#window:141)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.SecurityControllerImpl$1.run(SecurityControllerImpl.java:44)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at java.security.AccessController.doPrivileged(Native Method)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.SecurityControllerImpl.callWithDomain(SecurityControllerImpl.java:48)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:841)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at script.onload_2023141816(body[].onload:1)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.SecurityControllerImpl$1.run(SecurityControllerImpl.java:44)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at java.security.AccessController.doPrivileged(Native Method)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.SecurityControllerImpl.callWithDomain(SecurityControllerImpl.java:48)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:841)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.Executor.executeFunction(Executor.java:71)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.js.Executor.executeFunction(Executor.java:52)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.domimpl.HTMLDocumentImpl.setUserData(HTMLDocumentImpl.java:1204)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.parser.HtmlParser.parse(HtmlParser.java:542)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.parser.HtmlParser.parse(HtmlParser.java:507)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.html.domimpl.HTMLDocumentImpl.load(HTMLDocumentImpl.java:386)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.primary.clientlets.html.HtmlClientlet.processImpl(HtmlClientlet.java:164)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.primary.clientlets.html.HtmlClientlet.processImpl(HtmlClientlet.java:171)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.primary.clientlets.html.HtmlClientlet.process(HtmlClientlet.java:79)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.request.ClientletRequestHandler.processResponse(ClientletRequestHandler.java:115)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.request.RequestEngine.processHandler(RequestEngine.java:856)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.request.RequestEngine.access$1(RequestEngine.java:713)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.request.RequestEngine$RequestHandlerTask$1.run(RequestEngine.java:1026)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at java.security.AccessController.doPrivileged(Native Method)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.request.RequestEngine$RequestHandlerTask.run(RequestEngine.java:1033)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at org.lobobrowser.util.SimpleThreadPool$ThreadRunnable.run(SimpleThreadPool.java:127)
20/10/2011 20:33:18 [0x0-0x1f71f7].net.sourceforge.supercollider[32440]     at java.lang.Thread.run(Thread.java:637)

it seems that the document element is not defined. any ways to fix this?