JSTree help please

JSTree help please

Hi Guys,

Im tying to get one of the http://www.JStree.com examples working. The one that interests me is the Flat xml example. I've downloaded the package and unzipped the files all in one folder removing all the subfolders they are in.

Anyway looking at the documentation for the flat file xml, Ive got the following code to create my tree.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <script type="text/javascript" src="jquery.js"></script>
  <script type="text/javascript" src="_lib.js"></script>
  <script type="text/javascript" src="tree_component.js"></script>
  <link rel="stylesheet" type="text/css" href="tree_component.css" />
<title>JSTree</title>
</head>

<body>
<script type="text/javascript">

$(function() {
  tree1 = new tree_component();
  tree1.init($("#demo"), {
    data  : {
      type  : "xml_flat",
      url   : "flat.xml"
    }
  });
});

</script>

<div id="demo">
</div>
</body>
</html>


When I access the page, I get a blank page, no error. Running the Firebug command, it says Error:tree_component is not defined - line 15. The line in question is tree1 = new tree_component(); , but I am not sure how to define this, any help would be much appreciated.....hopefully osmething simple for you Jquery gurus.


Many Thanks

Jalz