summaryrefslogtreecommitdiff
path: root/docs/navtree.js
blob: 38eca26e23c1c167973fb60627db011babe67e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
var NAVTREE =
[
  [ "AudioManager", "index.html", [
    [ "License", "lic.html", [
      [ "Open Source Projects in the source tree", "lic.html#proj", null ],
      [ "License Split", "lic.html#split", null ],
      [ "Mozilla Public License, v. 2.0", "lic.html#mpl", null ],
      [ "MIT license", "lic.html#mit", null ]
    ] ],
    [ "Dependencies", "dep.html", [
      [ "Dependency Graph", "dep.html#deps", null ],
      [ "Depedency Graph for Tests", "dep.html#deptest", null ],
      [ "Generated Dependency Graph", "dep.html#depgen", null ]
    ] ],
    [ "Versioning", "ver.html", [
      [ "New versioning scheme", "ver.html#new_ver", null ],
      [ "The versioning scheme until 7.0", "ver.html#ver_graph", null ]
    ] ],
    [ "Architecture Overview", "architecturepage.html", [
      [ "Audio Domains", "architecturepage.html#domains", null ],
      [ "Routing Adapter", "architecturepage.html#routing_adaptor", null ],
      [ "Gateway", "architecturepage.html#gateway", null ],
      [ "Converter", "architecturepage.html#converter", null ]
    ] ],
    [ "UML Model auf the AudioManager", "uml.html", [
      [ "Audio Manager Branch", "uml.html#svn", null ]
    ] ],
    [ "AudioManager Components", "audiomanagercomponentspage.html", [
      [ "AudioManagerDaemon", "audiomanagercomponentspage.html#audiomanagercomponents", [
        [ "Daemon Overview", "audiomanagercomponentspage.html#daemonover", null ]
      ] ],
      [ "AudioManagerCommandPlugin", "audiomanagercomponentspage.html#commander", [
        [ "Interfaces", "audiomanagercomponentspage.html#commandIface", null ]
      ] ],
      [ "AudioManagerController", "audiomanagercomponentspage.html#controller", [
        [ "Interfaces", "audiomanagercomponentspage.html#controlIface", null ]
      ] ],
      [ "Routing AudioManagerRoutingPlugin", "audiomanagercomponentspage.html#router", [
        [ "Interfaces", "audiomanagercomponentspage.html#routingIface", null ],
        [ "Bus topology", "audiomanagercomponentspage.html#subrouter", null ],
        [ "Busname", "audiomanagercomponentspage.html#busname", null ],
        [ "CommonAPI plugins", "audiomanagercomponentspage.html#CAPIplugins", null ]
      ] ]
    ] ],
    [ "AudioManager and CommonAPI", "comminAPI.html", null ],
    [ "Elements of the AudioManagement", "elementspage.html", [
      [ "Overview Class Diagram", "elementspage.html#cDiag", null ],
      [ "Sources", "elementspage.html#source", [
        [ "Attributes", "elementspage.html#sourceattributes", null ]
      ] ],
      [ "Sinks", "elementspage.html#sinks", [
        [ "Attributes", "elementspage.html#sinkattributes", null ]
      ] ],
      [ "Gateways", "elementspage.html#gw", [
        [ "Attributes", "elementspage.html#gwattributes", null ]
      ] ],
      [ "Crossfaders", "elementspage.html#crossfaders", [
        [ "Attributes", "elementspage.html#cfattributes", null ]
      ] ]
    ] ],
    [ "The relation of sources & sinks with the AudioManager", "sourcesink.html", [
      [ "Class diagramm of the relation between sources, sinks and the AudioManager", "sourcesink.html#claDi", null ],
      [ "The REAL interaction", "sourcesink.html#boil", null ],
      [ "Connection Formats", "sourcesink.html#conFormats", null ],
      [ "Source States", "sourcesink.html#sstates", null ],
      [ "Availability", "sourcesink.html#avail", null ],
      [ "Volumes", "sourcesink.html#vol", null ],
      [ "SoundProperties", "sourcesink.html#SoundProperties", null ],
      [ "Interrupt States", "sourcesink.html#in", null ]
    ] ],
    [ "About unique IDs : Static vs Dynamic IDs", "uniquepage.html", [
      [ "Why having two different kinds of ids?", "uniquepage.html#why", null ],
      [ "The setup", "uniquepage.html#setup", null ]
    ] ],
    [ "Classification of Sinks and Sources", "classficationpage.html", [
      [ "Classification", "classficationpage.html#classification", null ],
      [ "Attributes", "classficationpage.html#attributes", null ]
    ] ],
    [ "Interrups & Low Level Interrupts", "interrupts.html", [
      [ "Differences", "interrupts.html#diff", null ],
      [ "Criterias", "interrupts.html#crit", null ]
    ] ],
    [ "Connections & MainConnections", "connpage.html", [
      [ "Connections", "connpage.html#con", null ],
      [ "Mainconnections", "connpage.html#maincon", null ],
      [ "Attributes", "connpage.html#att", null ]
    ] ],
    [ "Lipsync", "lip.html", [
      [ "The Task of the Audiomanager", "lip.html#t", null ],
      [ "Example", "lip.html#ex", null ]
    ] ],
    [ "Early Audio", "early.html", [
      [ "The Requirement", "early.html#req", null ],
      [ "Early Startup", "early.html#earlys", null ],
      [ "Late Rundown", "early.html#late", null ]
    ] ],
    [ "The two views of the AudioManager", "views.html", [
      [ "The CommandInterface View View", "views.html#command", null ],
      [ "RoutingInterface View", "views.html#route", null ],
      [ "Overview", "views.html#over", null ]
    ] ],
    [ "Volumes & MainVolumes", "vol.html", [
      [ "MainVolumes", "vol.html#mainVol", null ],
      [ "Volumes", "vol.html#volv", null ]
    ] ],
    [ "Properties", "prop.html", [
      [ "SoundProperties & MainSoundProperties", "prop.html#soundprop", null ],
      [ "SystemProperties", "prop.html#sys", null ]
    ] ],
    [ "Notifications", "notifi.html", [
      [ "What are notifications?", "notifi.html#notifi_ex", null ],
      [ "Overview", "notifi.html#notifi_overview", null ],
      [ "CommandInterface", "notifi.html#notifi_command", null ],
      [ "ControlInterface", "notifi.html#notifi_control", null ],
      [ "RoutingInterface", "notifi.html#notifi_routing", null ],
      [ "Notification Levels", "notifi.html#notifi_levels", null ]
    ] ],
    [ "Miscellaneous", "misc.html", [
      [ "Connection Formats", "misc.html#misc_connfor", null ],
      [ "Persistence", "misc.html#misc_pers", null ],
      [ "Speed dependent volume", "misc.html#misc_speed", null ]
    ] ],
    [ "Last User Mode", "luc.html", [
      [ "Last User Mode concept", "luc.html#luc_concept", null ],
      [ "The handling in the rundown context:", "luc.html#luc_rundown", null ],
      [ "The next startup:", "luc.html#luc_startup", null ]
    ] ],
    [ "Mainloop concept", "mainl.html", [
      [ "Mainloop", "mainl.html#mconcept", null ],
      [ "Using the Mainloop", "mainl.html#sec", null ],
      [ "Utilizing The Mainloop as Threadsafe Call Method", "mainl.html#util", [
        [ "Asynchronous calls", "mainl.html#async", null ],
        [ "Synchronous calls", "mainl.html#sync", null ]
      ] ]
    ] ],
    [ "The watchdog", "watchd.html", [
      [ "The watchdog concept", "watchd.html#watchdconcept", null ],
      [ "Watchdog configuration", "watchd.html#configwatch", null ],
      [ "Integration with systemd", "watchd.html#winteg", null ]
    ] ],
    [ "Startup and Rundown", "start.html", [
      [ "Startup", "start.html#start_Start", null ],
      [ "Rundown", "start.html#start_Rundown", null ],
      [ "Cancelled Rundown", "start.html#start_Cancel", null ]
    ] ],
    [ "CommandLineParsing", "cmdline.html", [
      [ "TCLAP", "cmdline.html#tclap", null ],
      [ "CommandLine Parsing in the Plugins", "cmdline.html#cmdplugins", null ]
    ] ],
    [ "Dlt support", "dlt.html", [
      [ "Compilerswitch", "dlt.html#compile", null ]
    ] ],
    [ "Download Compile Debug", "eclip.html", [
      [ "Get the source", "eclip.html#dw", null ],
      [ "Compile", "eclip.html#build", null ],
      [ "Using Eclipse", "eclip.html#ec", null ],
      [ "Debugging with eclipse", "eclip.html#deb", null ]
    ] ],
    [ "Compiling & Co", "comp.html", null ],
    [ "Namespaces", null, [
      [ "Namespace List", "namespaces.html", "namespaces" ],
      [ "Namespace Members", "namespacemembers.html", [
        [ "All", "namespacemembers.html", null ],
        [ "Functions", "namespacemembers_func.html", null ],
        [ "Variables", "namespacemembers_vars.html", null ],
        [ "Typedefs", "namespacemembers_type.html", null ],
        [ "Enumerations", "namespacemembers_enum.html", null ],
        [ "Enumerator", "namespacemembers_eval.html", null ]
      ] ]
    ] ],
    [ "Classes", null, [
      [ "Class List", "annotated.html", "annotated" ],
      [ "Class Index", "classes.html", null ],
      [ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
      [ "Class Members", "functions.html", [
        [ "All", "functions.html", "functions_dup" ],
        [ "Functions", "functions_func.html", "functions_func" ],
        [ "Variables", "functions_vars.html", null ],
        [ "Typedefs", "functions_type.html", null ],
        [ "Enumerations", "functions_enum.html", null ],
        [ "Enumerator", "functions_eval.html", null ]
      ] ]
    ] ],
    [ "Files", null, [
      [ "File List", "files.html", "files" ],
      [ "File Members", "globals.html", [
        [ "All", "globals.html", null ],
        [ "Functions", "globals_func.html", null ],
        [ "Variables", "globals_vars.html", null ],
        [ "Enumerations", "globals_enum.html", null ],
        [ "Enumerator", "globals_eval.html", null ],
        [ "Macros", "globals_defs.html", null ]
      ] ]
    ] ]
  ] ]
];

var NAVTREEINDEX =
[
"AudioManagerCore_2include_2TAmPluginTemplate_8h.html",
"audiomanagertypes_8h.html#a58a230b5da10699a7ce1b1f2a1c550e6",
"classam_1_1CAmControlReceiver.html#a9d6eae2312f5629f748ec293ef8ef118",
"classam_1_1CAmDatabaseObserver.html#a3ab11ede15d50e01ed57d135192cc05d",
"classam_1_1CAmRoutingSender_1_1handleDisconnect.html#aca4d52488579bf52e45e313c7e6b351a",
"classam_1_1IAmControlReceive.html#a55b0c17d87150f44659bf2bb8a668408",
"classam_1_1IAmDatabaseHandler.html#af7e0be6ef2f4261a28b5eccc40202342",
"main_8cpp.html#acc628ca4f61759495f09289b8418d358",
"ver.html#new_ver"
];

var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';
var navTreeSubIndices = new Array();

function getData(varName)
{
  var i = varName.lastIndexOf('/');
  var n = i>=0 ? varName.substring(i+1) : varName;
  return eval(n.replace(/\-/g,'_'));
}

function stripPath(uri)
{
  return uri.substring(uri.lastIndexOf('/')+1);
}

function stripPath2(uri)
{
  var i = uri.lastIndexOf('/');
  var s = uri.substring(i+1);
  var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
  return m ? uri.substring(i-6) : s;
}

function localStorageSupported()
{
  try {
    return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
  }
  catch(e) {
    return false;
  }
}


function storeLink(link)
{
  if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
      window.localStorage.setItem('navpath',link);
  }
}

function deleteLink()
{
  if (localStorageSupported()) {
    window.localStorage.setItem('navpath','');
  } 
}

function cachedLink()
{
  if (localStorageSupported()) {
    return window.localStorage.getItem('navpath');
  } else {
    return '';
  }
}

function getScript(scriptName,func,show)
{
  var head = document.getElementsByTagName("head")[0]; 
  var script = document.createElement('script');
  script.id = scriptName;
  script.type = 'text/javascript';
  script.onload = func; 
  script.src = scriptName+'.js'; 
  if ($.browser.msie && $.browser.version<=8) { 
    // script.onload does not work with older versions of IE
    script.onreadystatechange = function() {
      if (script.readyState=='complete' || script.readyState=='loaded') { 
        func(); if (show) showRoot(); 
      }
    }
  }
  head.appendChild(script); 
}

function createIndent(o,domNode,node,level)
{
  var level=-1;
  var n = node;
  while (n.parentNode) { level++; n=n.parentNode; }
  if (node.childrenData) {
    var imgNode = document.createElement("img");
    imgNode.style.paddingLeft=(16*level).toString()+'px';
    imgNode.width  = 16;
    imgNode.height = 22;
    imgNode.border = 0;
    node.plus_img = imgNode;
    node.expandToggle = document.createElement("a");
    node.expandToggle.href = "javascript:void(0)";
    node.expandToggle.onclick = function() {
      if (node.expanded) {
        $(node.getChildrenUL()).slideUp("fast");
        node.plus_img.src = node.relpath+"ftv2pnode.png";
        node.expanded = false;
      } else {
        expandNode(o, node, false, false);
      }
    }
    node.expandToggle.appendChild(imgNode);
    domNode.appendChild(node.expandToggle);
    imgNode.src = node.relpath+"ftv2pnode.png";
  } else {
    var span = document.createElement("span");
    span.style.display = 'inline-block';
    span.style.width   = 16*(level+1)+'px';
    span.style.height  = '22px';
    span.innerHTML = '&#160;';
    domNode.appendChild(span);
  } 
}

var animationInProgress = false;

function gotoAnchor(anchor,aname,updateLocation)
{
  var pos, docContent = $('#doc-content');
  if (anchor.parent().attr('class')=='memItemLeft' ||
      anchor.parent().attr('class')=='fieldtype' ||
      anchor.parent().is(':header')) 
  {
    pos = anchor.parent().position().top;
  } else if (anchor.position()) {
    pos = anchor.position().top;
  }
  if (pos) {
    var dist = Math.abs(Math.min(
               pos-docContent.offset().top,
               docContent[0].scrollHeight-
               docContent.height()-docContent.scrollTop()));
    animationInProgress=true;
    docContent.animate({
      scrollTop: pos + docContent.scrollTop() - docContent.offset().top
    },Math.max(50,Math.min(500,dist)),function(){
      if (updateLocation) window.location.href=aname;
      animationInProgress=false;
    });
  }
}

function newNode(o, po, text, link, childrenData, lastNode)
{
  var node = new Object();
  node.children = Array();
  node.childrenData = childrenData;
  node.depth = po.depth + 1;
  node.relpath = po.relpath;
  node.isLast = lastNode;

  node.li = document.createElement("li");
  po.getChildrenUL().appendChild(node.li);
  node.parentNode = po;

  node.itemDiv = document.createElement("div");
  node.itemDiv.className = "item";

  node.labelSpan = document.createElement("span");
  node.labelSpan.className = "label";

  createIndent(o,node.itemDiv,node,0);
  node.itemDiv.appendChild(node.labelSpan);
  node.li.appendChild(node.itemDiv);

  var a = document.createElement("a");
  node.labelSpan.appendChild(a);
  node.label = document.createTextNode(text);
  node.expanded = false;
  a.appendChild(node.label);
  if (link) {
    var url;
    if (link.substring(0,1)=='^') {
      url = link.substring(1);
      link = url;
    } else {
      url = node.relpath+link;
    }
    a.className = stripPath(link.replace('#',':'));
    if (link.indexOf('#')!=-1) {
      var aname = '#'+link.split('#')[1];
      var srcPage = stripPath($(location).attr('pathname'));
      var targetPage = stripPath(link.split('#')[0]);
      a.href = srcPage!=targetPage ? url : "javascript:void(0)"; 
      a.onclick = function(){
        storeLink(link);
        if (!$(a).parent().parent().hasClass('selected'))
        {
          $('.item').removeClass('selected');
          $('.item').removeAttr('id');
          $(a).parent().parent().addClass('selected');
          $(a).parent().parent().attr('id','selected');
        }
        var anchor = $(aname);
        gotoAnchor(anchor,aname,true);
      };
    } else {
      a.href = url;
      a.onclick = function() { storeLink(link); }
    }
  } else {
    if (childrenData != null) 
    {
      a.className = "nolink";
      a.href = "javascript:void(0)";
      a.onclick = node.expandToggle.onclick;
    }
  }

  node.childrenUL = null;
  node.getChildrenUL = function() {
    if (!node.childrenUL) {
      node.childrenUL = document.createElement("ul");
      node.childrenUL.className = "children_ul";
      node.childrenUL.style.display = "none";
      node.li.appendChild(node.childrenUL);
    }
    return node.childrenUL;
  };

  return node;
}

function showRoot()
{
  var headerHeight = $("#top").height();
  var footerHeight = $("#nav-path").height();
  var windowHeight = $(window).height() - headerHeight - footerHeight;
  (function (){ // retry until we can scroll to the selected item
    try {
      var navtree=$('#nav-tree');
      navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
    } catch (err) {
      setTimeout(arguments.callee, 0);
    }
  })();
}

function expandNode(o, node, imm, showRoot)
{
  if (node.childrenData && !node.expanded) {
    if (typeof(node.childrenData)==='string') {
      var varName    = node.childrenData;
      getScript(node.relpath+varName,function(){
        node.childrenData = getData(varName);
        expandNode(o, node, imm, showRoot);
      }, showRoot);
    } else {
      if (!node.childrenVisited) {
        getNode(o, node);
      } if (imm || ($.browser.msie && $.browser.version>8)) { 
        // somehow slideDown jumps to the start of tree for IE9 :-(
        $(node.getChildrenUL()).show();
      } else {
        $(node.getChildrenUL()).slideDown("fast");
      }
      if (node.isLast) {
        node.plus_img.src = node.relpath+"ftv2mlastnode.png";
      } else {
        node.plus_img.src = node.relpath+"ftv2mnode.png";
      }
      node.expanded = true;
    }
  }
}

function glowEffect(n,duration)
{
  n.addClass('glow').delay(duration).queue(function(next){
    $(this).removeClass('glow');next();
  });
}

function highlightAnchor()
{
  var aname = $(location).attr('hash');
  var anchor = $(aname);
  if (anchor.parent().attr('class')=='memItemLeft'){
    var rows = $('.memberdecls tr[class$="'+
               window.location.hash.substring(1)+'"]');
    glowEffect(rows.children(),300); // member without details
  } else if (anchor.parents().slice(2).prop('tagName')=='TR') {
    glowEffect(anchor.parents('div.memitem'),1000); // enum value
  } else if (anchor.parent().attr('class')=='fieldtype'){
    glowEffect(anchor.parent().parent(),1000); // struct field
  } else if (anchor.parent().is(":header")) {
    glowEffect(anchor.parent(),1000); // section header
  } else {
    glowEffect(anchor.next(),1000); // normal member
  }
  gotoAnchor(anchor,aname,false);
}

function selectAndHighlight(hash,n)
{
  var a;
  if (hash) {
    var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);
    a=$('.item a[class$="'+link+'"]');
  }
  if (a && a.length) {
    a.parent().parent().addClass('selected');
    a.parent().parent().attr('id','selected');
    highlightAnchor();
  } else if (n) {
    $(n.itemDiv).addClass('selected');
    $(n.itemDiv).attr('id','selected');
  }
  if ($('#nav-tree-contents .item:first').hasClass('selected')) {
    $('#nav-sync').css('top','30px');
  } else {
    $('#nav-sync').css('top','5px');
  }
  showRoot();
}

function showNode(o, node, index, hash)
{
  if (node && node.childrenData) {
    if (typeof(node.childrenData)==='string') {
      var varName    = node.childrenData;
      getScript(node.relpath+varName,function(){
        node.childrenData = getData(varName);
        showNode(o,node,index,hash);
      },true);
    } else {
      if (!node.childrenVisited) {
        getNode(o, node);
      }
      $(node.getChildrenUL()).css({'display':'block'});
      if (node.isLast) {
        node.plus_img.src = node.relpath+"ftv2mlastnode.png";
      } else {
        node.plus_img.src = node.relpath+"ftv2mnode.png";
      }
      node.expanded = true;
      var n = node.children[o.breadcrumbs[index]];
      if (index+1<o.breadcrumbs.length) {
        showNode(o,n,index+1,hash);
      } else {
        if (typeof(n.childrenData)==='string') {
          var varName = n.childrenData;
          getScript(n.relpath+varName,function(){
            n.childrenData = getData(varName);
            node.expanded=false;
            showNode(o,node,index,hash); // retry with child node expanded
          },true);
        } else {
          var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
          if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
            expandNode(o, n, true, true);
          }
          selectAndHighlight(hash,n);
        }
      }
    }
  } else {
    selectAndHighlight(hash);
  }
}

function removeToInsertLater(element) {
  var parentNode = element.parentNode;
  var nextSibling = element.nextSibling;
  parentNode.removeChild(element);
  return function() {
    if (nextSibling) {
      parentNode.insertBefore(element, nextSibling);
    } else {
      parentNode.appendChild(element);
    }
  };
}

function getNode(o, po)
{
  var insertFunction = removeToInsertLater(po.li);
  po.childrenVisited = true;
  var l = po.childrenData.length-1;
  for (var i in po.childrenData) {
    var nodeData = po.childrenData[i];
    po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
      i==l);
  }
  insertFunction();
}

function gotoNode(o,subIndex,root,hash,relpath)
{
  var nti = navTreeSubIndices[subIndex][root+hash];
  o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
  if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
    navTo(o,NAVTREE[0][1],"",relpath);
    $('.item').removeClass('selected');
    $('.item').removeAttr('id');
  }
  if (o.breadcrumbs) {
    o.breadcrumbs.unshift(0); // add 0 for root node
    showNode(o, o.node, 0, hash);
  }
}

function navTo(o,root,hash,relpath)
{
  var link = cachedLink();
  if (link) {
    var parts = link.split('#');
    root = parts[0];
    if (parts.length>1) hash = '#'+parts[1];
    else hash='';
  }
  if (hash.match(/^#l\d+$/)) {
    var anchor=$('a[name='+hash.substring(1)+']');
    glowEffect(anchor.parent(),1000); // line number
    hash=''; // strip line number anchors
    //root=root.replace(/_source\./,'.'); // source link to doc link
  }
  var url=root+hash;
  var i=-1;
  while (NAVTREEINDEX[i+1]<=url) i++;
  if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
  if (navTreeSubIndices[i]) {
    gotoNode(o,i,root,hash,relpath)
  } else {
    getScript(relpath+'navtreeindex'+i,function(){
      navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
      if (navTreeSubIndices[i]) {
        gotoNode(o,i,root,hash,relpath);
      }
    },true);
  }
}

function showSyncOff(n,relpath)
{
    n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
}

function showSyncOn(n,relpath)
{
    n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
}

function toggleSyncButton(relpath)
{
  var navSync = $('#nav-sync');
  if (navSync.hasClass('sync')) {
    navSync.removeClass('sync');
    showSyncOff(navSync,relpath);
    storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
  } else {
    navSync.addClass('sync');
    showSyncOn(navSync,relpath);
    deleteLink();
  }
}

function initNavTree(toroot,relpath)
{
  var o = new Object();
  o.toroot = toroot;
  o.node = new Object();
  o.node.li = document.getElementById("nav-tree-contents");
  o.node.childrenData = NAVTREE;
  o.node.children = new Array();
  o.node.childrenUL = document.createElement("ul");
  o.node.getChildrenUL = function() { return o.node.childrenUL; };
  o.node.li.appendChild(o.node.childrenUL);
  o.node.depth = 0;
  o.node.relpath = relpath;
  o.node.expanded = false;
  o.node.isLast = true;
  o.node.plus_img = document.createElement("img");
  o.node.plus_img.src = relpath+"ftv2pnode.png";
  o.node.plus_img.width = 16;
  o.node.plus_img.height = 22;

  if (localStorageSupported()) {
    var navSync = $('#nav-sync');
    if (cachedLink()) {
      showSyncOff(navSync,relpath);
      navSync.removeClass('sync');
    } else {
      showSyncOn(navSync,relpath);
    }
    navSync.click(function(){ toggleSyncButton(relpath); });
  }

  $(window).load(function(){
    navTo(o,toroot,window.location.hash,relpath);
    showRoot();
  });

  $(window).bind('hashchange', function(){
     if (window.location.hash && window.location.hash.length>1){
       var a;
       if ($(location).attr('hash')){
         var clslink=stripPath($(location).attr('pathname'))+':'+
                               $(location).attr('hash').substring(1);
         a=$('.item a[class$="'+clslink+'"]');
       }
       if (a==null || !$(a).parent().parent().hasClass('selected')){
         $('.item').removeClass('selected');
         $('.item').removeAttr('id');
       }
       var link=stripPath2($(location).attr('pathname'));
       navTo(o,link,$(location).attr('hash'),relpath);
     } else if (!animationInProgress) {
       $('#doc-content').scrollTop(0);
       $('.item').removeClass('selected');
       $('.item').removeAttr('id');
       navTo(o,toroot,window.location.hash,relpath);
     }
  })
}