"function createIndent(o,domNode,node,level)\n"
"{\n"
"  if (node.parentNode && node.parentNode.parentNode)\n"
"  {\n"
"    createIndent(o,domNode,node.parentNode,level+1);\n"
"  }\n"
"  var imgNode = document.createElement(\"img\");\n"
"  if (level==0 && node.childrenData)\n"
"  {\n"
"    node.plus_img = imgNode;\n"
"    node.expandToggle = document.createElement(\"a\");\n"
"    node.expandToggle.href = \"javascript:void(0)\";\n"
"    node.expandToggle.onclick = function() \n"
"    {\n"
"      if (node.expanded) \n"
"      {\n"
"        $(node.getChildrenUL()).slideUp(\"fast\");\n"
"        if (node.isLast)\n"
"        {\n"
"          node.plus_img.src = node.relpath+\"ftv2plastnode.png\";\n"
"        }\n"
"        else\n"
"        {\n"
"          node.plus_img.src = node.relpath+\"ftv2pnode.png\";\n"
"        }\n"
"        node.expanded = false;\n"
"      } \n"
"      else \n"
"      {\n"
"        expandNode(o, node, false);\n"
"      }\n"
"    }\n"
"    node.expandToggle.appendChild(imgNode);\n"
"    domNode.appendChild(node.expandToggle);\n"
"  }\n"
"  else\n"
"  {\n"
"    domNode.appendChild(imgNode);\n"
"  }\n"
"  if (level==0)\n"
"  {\n"
"    if (node.isLast)\n"
"    {\n"
"      if (node.childrenData)\n"
"      {\n"
"        imgNode.src = node.relpath+\"ftv2plastnode.png\";\n"
"      }\n"
"      else\n"
"      {\n"
"        imgNode.src = node.relpath+\"ftv2lastnode.png\";\n"
"        domNode.appendChild(imgNode);\n"
"      }\n"
"    }\n"
"    else\n"
"    {\n"
"      if (node.childrenData)\n"
"      {\n"
"        imgNode.src = node.relpath+\"ftv2pnode.png\";\n"
"      }\n"
"      else\n"
"      {\n"
"        imgNode.src = node.relpath+\"ftv2node.png\";\n"
"        domNode.appendChild(imgNode);\n"
"      }\n"
"    }\n"
"  }\n"
"  else\n"
"  {\n"
"    if (node.isLast)\n"
"    {\n"
"      imgNode.src = node.relpath+\"ftv2blank.png\";\n"
"    }\n"
"    else\n"
"    {\n"
"      imgNode.src = node.relpath+\"ftv2vertline.png\";\n"
"    }\n"
"  }\n"
"  imgNode.border = \"0\";\n"
"}\n"
"\n"
"function newNode(o, po, text, link, childrenData, lastNode)\n"
"{\n"
"  var node = new Object();\n"
"  node.children = Array();\n"
"  node.childrenData = childrenData;\n"
"  node.depth = po.depth + 1;\n"
"  node.relpath = po.relpath;\n"
"  node.isLast = lastNode;\n"
"\n"
"  node.li = document.createElement(\"li\");\n"
"  po.getChildrenUL().appendChild(node.li);\n"
"  node.parentNode = po;\n"
"\n"
"  node.itemDiv = document.createElement(\"div\");\n"
"  node.itemDiv.className = \"item\";\n"
"\n"
"  node.labelSpan = document.createElement(\"span\");\n"
"  node.labelSpan.className = \"label\";\n"
"\n"
"  createIndent(o,node.itemDiv,node,0);\n"
"  node.itemDiv.appendChild(node.labelSpan);\n"
"  node.li.appendChild(node.itemDiv);\n"
"\n"
"  var a = document.createElement(\"a\");\n"
"  node.labelSpan.appendChild(a);\n"
"  node.label = document.createTextNode(text);\n"
"  a.appendChild(node.label);\n"
"  if (link) \n"
"  {\n"
"    a.href = node.relpath+link;\n"
"  } \n"
"  else \n"
"  {\n"
"    if (childrenData != null) \n"
"    {\n"
"      a.className = \"nolink\";\n"
"      a.href = \"javascript:void(0)\";\n"
"      a.onclick = node.expandToggle.onclick;\n"
"      node.expanded = false;\n"
"    }\n"
"  }\n"
"\n"
"  node.childrenUL = null;\n"
"  node.getChildrenUL = function() \n"
"  {\n"
"    if (!node.childrenUL) \n"
"    {\n"
"      node.childrenUL = document.createElement(\"ul\");\n"
"      node.childrenUL.className = \"children_ul\";\n"
"      node.childrenUL.style.display = \"none\";\n"
"      node.li.appendChild(node.childrenUL);\n"
"    }\n"
"    return node.childrenUL;\n"
"  };\n"
"\n"
"  return node;\n"
"}\n"
"\n"
"function showRoot()\n"
"{\n"
"  var headerHeight = $(\"#top\").height();\n"
"  var footerHeight = $(\"#nav-path\").height();\n"
"  var windowHeight = $(window).height() - headerHeight - footerHeight;\n"
"  navtree.scrollTo('#selected',0,{offset:-windowHeight/2});\n"
"}\n"
"\n"
"function expandNode(o, node, imm)\n"
"{\n"
"  if (node.childrenData && !node.expanded) \n"
"  {\n"
"    if (!node.childrenVisited) \n"
"    {\n"
"      getNode(o, node);\n"
"    }\n"
"    if (imm)\n"
"    {\n"
"      $(node.getChildrenUL()).show();\n"
"    } \n"
"    else \n"
"    {\n"
"      $(node.getChildrenUL()).slideDown(\"fast\",showRoot);\n"
"    }\n"
"    if (node.isLast)\n"
"    {\n"
"      node.plus_img.src = node.relpath+\"ftv2mlastnode.png\";\n"
"    }\n"
"    else\n"
"    {\n"
"      node.plus_img.src = node.relpath+\"ftv2mnode.png\";\n"
"    }\n"
"    node.expanded = true;\n"
"  }\n"
"}\n"
"\n"
"function getNode(o, po)\n"
"{\n"
"  po.childrenVisited = true;\n"
"  var l = po.childrenData.length-1;\n"
"  for (var i in po.childrenData) \n"
"  {\n"
"    var nodeData = po.childrenData[i];\n"
"    po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],\n"
"        i==l);\n"
"  }\n"
"}\n"
"\n"
"function findNavTreePage(url, data)\n"
"{\n"
"  var nodes = data;\n"
"  var result = null;\n"
"  for (var i in nodes) \n"
"  {\n"
"    var d = nodes[i];\n"
"    if (d[1] == url) \n"
"    {\n"
"      return new Array(i);\n"
"    }\n"
"    else if (d[2] != null) // array of children\n"
"    {\n"
"      result = findNavTreePage(url, d[2]);\n"
"      if (result != null) \n"
"      {\n"
"        return (new Array(i).concat(result));\n"
"      }\n"
"    }\n"
"  }\n"
"  return null;\n"
"}\n"
"\n"
"function initNavTree(toroot,relpath)\n"
"{\n"
"  var o = new Object();\n"
"  o.toroot = toroot;\n"
"  o.node = new Object();\n"
"  o.node.li = document.getElementById(\"nav-tree-contents\");\n"
"  o.node.childrenData = NAVTREE;\n"
"  o.node.children = new Array();\n"
"  o.node.childrenUL = document.createElement(\"ul\");\n"
"  o.node.getChildrenUL = function() { return o.node.childrenUL; };\n"
"  o.node.li.appendChild(o.node.childrenUL);\n"
"  o.node.depth = 0;\n"
"  o.node.relpath = relpath;\n"
"\n"
"  getNode(o, o.node);\n"
"\n"
"  o.breadcrumbs = findNavTreePage(toroot, NAVTREE);\n"
"  if (o.breadcrumbs == null)\n"
"  {\n"
"    o.breadcrumbs = findNavTreePage(\"index.html\",NAVTREE);\n"
"  }\n"
"  if (o.breadcrumbs != null && o.breadcrumbs.length>0)\n"
"  {\n"
"    var p = o.node;\n"
"    for (var i in o.breadcrumbs) \n"
"    {\n"
"      var j = o.breadcrumbs[i];\n"
"      p = p.children[j];\n"
"      expandNode(o,p,true);\n"
"    }\n"
"    p.itemDiv.className = p.itemDiv.className + \" selected\";\n"
"    p.itemDiv.id = \"selected\";\n"
"    $(window).load(showRoot);\n"
"  }\n"
"}\n"
"\n"
