// definition for tree navigation

// ==============================



// definition of appearance (global settings that can be overwritten for every instance of a menu)

// -----------------------------------------------------------------------------------------------

topHeader    = ""                                                                            // will be drawn only once on the top

header        = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">";        // will be repeated for every level

tr_defstart    = "<tr>";                                                                        // will be repeated for every node



// all entries below can take the following variable

// $desc        - description of the node

// $url            - url of the link

// $target        - target tag TARGET="..."

// $statuso        - status text if folder is open

// $statusc        - status text if folder is closed

// $statusd        - status text over a document

// $id            - unique id of the branch



// use the following function to navigate

// $treenav.directOpen('$id')    - to open an object and all parent objects with it

// $treenav.directClose('$id')    - to close an object with all children



if(typeof(pathcorr)!="string") pathcorr="";

// the following lines will be used if a folder has got no link and is closed

tr_folderc_nolink     = Array();

tr_folderc_nolink[0]= "<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directOpen('$id')\" onmouseover=\"status='$statusc';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/close.gif\" border=\"0\"></a></td>";                                                    // node td if last node in list

tr_folderc_nolink[1]="<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directOpen('$id')\" onmouseover=\"status='$statusc';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/close.gif\" border=\"0\"></a></td>" //node td if not last node in list

tr_folderc_nolink[2]="";                                                        // td with folder icon (use "" if no folder icon)

tr_folderc_nolink[3]="<td><nobr><a href=\"javascript:loadCat($id);\" onmouseover=\"status='click to browse category $desc';return true\" onmouseout=\"status='';\" class=\"fnav1sub\">$desc</a></nobr></td>";                                                                // td with description ($desc as variable)



// the following lines will be used if a folder has got a link and is closed

tr_folderc_link     = Array();

tr_folderc_link[0]    = "<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directOpen('$id')\" onmouseover=\"status='$statusc';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/close.gif\" width=\"7\" height=\"12\" border=\"0\"></a></td>";                                                    // node td if last node in list

tr_folderc_link[1]    ="<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directOpen('$id')\" onmouseover=\"status='$statusc';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/close.gif\" width=\"7\" height=\"12\" border=\"0\"></a></td>" //node td if not last node in list

tr_folderc_link[2]    ="";                                                        // td with folder icon (use "" if no folder icon)

tr_folderc_link[3]    ="<td><a href=\"$url\" $target onmouseover=\"status='$statusd';return true\" onmouseout=\"status='';\"><span class=\"fnewsnode\">$desc</span></a></td>";                                                                // td with description ($desc as variable)



// the following lines will be use if a folder has got no link and is opened

tr_foldero_nolink     = Array();

tr_foldero_nolink[0]= "<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directClose('$id')\" onmouseover=\"status='$statuso';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/open.gif\" border=\"0\"></a></td>";                                                    // node td if last node in list

tr_foldero_nolink[1]="<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directClose('$id')\" onmouseover=\"status='$statuso';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/open.gif\" border=\"0\"></a></td>" //node td if not last node in list

tr_foldero_nolink[2]="";                                                        // td with folder icon (use "" if no folder icon)

tr_foldero_nolink[3]=tr_folderc_nolink[3];



// the following line will be use if a folder has got a link and is opened

tr_foldero_link     = Array();

tr_foldero_link[0]    = "<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directClose('$id')\" onmouseover=\"status='$statuso';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/open.gif\" border=\"0\"></a></td>";                                                    // node td if last node in list

tr_foldero_link[1]    ="<td width=\"1%\" valign=\"top\"><a href=\"javascript:$treenav.directClose('$id')\" onmouseover=\"status='$statuso';return true\" onmouseout=\"status='';\"><img src=\""+pathcorr+"../nicons/open.gif\" border=\"0\"></a></td>" //node td if not last node in list

tr_foldero_link[2]    ="";                                                        // td with folder icon (use "" if no folder icon)

tr_foldero_link[3]    ="<td><a href=\"$url\" $target onmouseover=\"status='$statusd';return true\" onmouseout=\"status='';\"><span class=\"fnewsnode\">$desc</span></a></td>";                                                                // td with description ($desc as variable)



// the next two lines define the tr line where the subcontent ist placed. use $subcontent as variable

tr_subontent        ="<td></td><td>$subcontent</td>";

tr_subontent_last    ="<td></td><td>$subcontent</td>";



// the following lines are used if the item is a document with a link.

// use $docpic as variable for the name docpicture (only needed if different pics ar used

tr_doc_link     = Array();

tr_doc_link[0]    = "<td width=\"1%\"><img src=\""+pathcorr+"../images/tp.gif\" width=7 height=1></td>";                                                    // doc td if last doc in list

tr_doc_link[1]    ="<td width=\"1%\"><img src=\""+pathcorr+"../images/tp.gif\" width=7 height=1></td>"                                                         // doc td if not last doc in list

tr_doc_link[2]    ="";                                                // td with doc icon (use "" if no doc icon. static or $docpic as variable)

tr_doc_link[3]    = tr_folderc_nolink[3];



// the following lines is used if item is a document without a link.

// use $docpic as variable for the name docpicture (only needed if different pics ar used

tr_doc_nolink            = Array();

tr_doc_nolink[0]    = "<td width=\"1%\" valign=\"top\"><img src=\""+pathcorr+"../images/tp.gif\" width=7 height=1></td>";                                                    // doc td if last doc in list

tr_doc_nolink[1]    ="<td width=\"1%\" valign=\"top\"><img src=\""+pathcorr+"../images/tp.gif\" width=7 height=1></td>"                                                         // doc td if not last doc in list

tr_doc_nolink[2]    ="";                                                        // td with doc icon (use "" if no folder icon static or $docpic as variable)

tr_doc_nolink[3]=tr_foldero_nolink[3];







tr_defend    = "</tr>";

footer    ="</table>";    // will be repeated for every level

topFooter =""            // will be drawn only one at the very end of the layer

layerwidth    = "";        // use "" if no setting should be made

layerheight = "";





// standard settings

// -----------------

// for all status-settings: if none is given, no status will be generated. use '$desc' as variable for the description of the node

status_doc             = "Klicken Sie, um die Seite zu zeigen";        // status if item is a document.

status_node_open     = "click to hide sub-categories of $desc";    // status if item is a opened node.

status_node_close     = "click to display sub-categories of $desc";    // status if item is a closed node.



// standard target

std_target            = "";                // use "" if no target-tag is needed



// docpics defines a set of pictures that can be show alternatively as picture for doc

docpics    = Array();

docpics['standard']    = "doc.gif";            // just insert additional assosiation to be used later with object.setPoperty("docpic",assosiation);

docpics['word']        = "word.gif";



// definition of behaviour

unique            = true;                        // set to true if only on branch of a tree can be opened at the same time

memorize        = true;                    // if true, keeps state of subnode (open/closed) if parent node is closed



// definition of navigations

// use myNavigation = new treenav();

// if nothing no adjustments are needed, go to definition og structure

// if you want to make adjustement just add line like the following:

// myNavigation.propname = "value"    where propname is any property (e.g. status_doc)



categories = new treenav("categories");



// definition of structure

// -----------------------

// use myNavigation.topObject.addChild(...) to start

//

// exemples

// ------------------

// make entry on root

// child = tree.addChild(desciption,id,[url],[status],[statustext]);

//

// make sub-entry

// subchild = child.tree.addChild(description,[id],[url],[status],[target])

//

// parameters:

// description     : string that will be shown

// id            : [optional] unique value (int or string e.g. 32 or 1_1) that will be needed for recognition from scripts (if id is "" or 0, an autogenerate value will be taken)

// url            : [optional] url that is jumped to on click

// status        : [optional] status-line that is shown on mouse over. if none is given or null, the standard status is used, depending on what type this entry is (node or document)

// target        : [optional] target of url. if none is given, the standad is used

//

// extended properties

// subchild.propname= value;    // use any property for propname.

// e.g docpic makes sens. docpic defines whitch pic of the docpic-array is to be drawn (defaut:standard)







