The Files

In order to run the menu tree on your site the foillowing files are required: navfunction.js, navdata.js, styles.js and a file which calls them.

navfunction.js

The file navfunction.js contains the fucntions which allow the construction of the navigational array, build the HTML of the navigation from the array folders open and closed. In general it should not be edited.

navdata.js

This file conatins various settinsg for the tree, such as its width and the location of image files, which are covered in Settings, as well as the data which is used to populate the tree, covered in Tree Data.

If you wish to have several trees on in your site you may wish to copy the settinmgs out into their own file and have several tree data files.

Note that navfunction.js must always be called before navdata.js, as it contains the functions used to build the navigational array.

styles.js

This contains various styles that are used by the tree - navselected, navunselected, navtable and navdiv. If you wish they can be incorporated into a more general stylesheet.

Your File

The file that contains the tree menu should look something like this:
<html>
 <head>
   <title>Tree Menu example</title>
   <link rel="STYLESHEET" type="text/css" 
	href="menu_files/styles.css">
   <script src="menu_files/navfunction.js" 
	type=text/javascript></script>
   <script src="menu_files/navdata.js" 
	type=text/javascript></script>
 </head>
 <body>
   <script>buildnav("");</script>
 </body>
</html>
The function buildnav() Creates the tree, place it within the code whereever you want the tree to appear. To preselect an item enter its url as the parameter (This can be particularly useful if you are using the tree outside of a frameset).