treeview expand all

treeview expand all

I've been trying to implement the treeview ( http://docs.jquery.com/Plugins/Treeview/treeview) on one of my asp.net pages.  I would like to expand all from codebehind and attempted to insert the following code in a literal on postback
 
var
allLIs = document.getElementById( "xp3tree" ).getElementsByTagName( "li" );
for ( var i = 0; i < allLIs.length; i++) { allLIs[i].className = 'open' ; }
 
this doesn't seem to work. is there an expand all function for the tree other than one in the control option?