I don't know any java or java script but I can at least share with you some code that does what you looking for.
The files needed are in a package that can be downloaded from here:
http://www.webdesignskolan.com/javascripts/javaapplets/menyer/dellastreeapplet/dltree101.zip
And the code to be used in the web page in the body is like this:
<APPLET CODE="TreeApplet" NAME="TreeApplet" WIDTH="220" HEIGHT="340">
<PARAM NAME="Copyright" VALUE="(c)1998 Robert Della Malva (robdella@webshuttle.ch)">
<PARAM NAME="Tree_ScriptFile" VALUE="os_script.txt">
<PARAM NAME="Tree_DefaultUrlTarget" VALUE="_self">
<PARAM NAME="Tree_MouseOverLinkSound" VALUE="drip.au">
<PARAM NAME="Tree_MouseOverMenuSound" VALUE="drip.au">
<PARAM NAME="Tree_MouseClickLinkSound" VALUE="piano.au">
<PARAM NAME="Tree_MouseClickMenuClosedSound" VALUE="chirp.au">
<PARAM NAME="Tree_MouseClickMenuOpenSound" VALUE="return.au">
</APPLET> The names(values) in the code above are in swedish but that shouldn't be too confusing I think.
Good luck!