blob: 37bc8903dc0d89ee0d752cd32fc9b6c9bcf3eeef [file] [log] [blame]
miloyip28df04d2014-08-08 13:48:11 +00001var NAVTREE =
2[
3 [ "RapidJSON", "index.html", [
4 [ "Features", "md_doc_features.html", null ],
5 [ "Tutorial", "md_doc_tutorial.html", [
6 [ "Value & Document", "md_doc_tutorial.html#ValueDocument", null ],
7 [ "Query Value", "md_doc_tutorial.html#QueryValue", [
8 [ "Query Array", "md_doc_tutorial.html#QueryArray", null ],
9 [ "Query Object", "md_doc_tutorial.html#QueryObject", null ],
10 [ "Querying Number", "md_doc_tutorial.html#QueryNumber", null ],
11 [ "Query String", "md_doc_tutorial.html#QueryString", null ]
12 ] ],
13 [ "Create/Modify Values", "md_doc_tutorial.html#CreateModifyValues", [
14 [ "Change Value Type", "md_doc_tutorial.html#ChangeValueType", null ],
15 [ "Move Semantics", "md_doc_tutorial.html#MoveSemantics", [
16 [ "Move semantics and temporary values", "md_doc_tutorial.html#TemporaryValues", null ]
17 ] ],
18 [ "Create String", "md_doc_tutorial.html#CreateString", null ],
19 [ "Modify Array", "md_doc_tutorial.html#ModifyArray", null ],
20 [ "Modify Object", "md_doc_tutorial.html#ModifyObject", null ],
21 [ "Deep Copy Value", "md_doc_tutorial.html#DeepCopyValue", null ],
22 [ "Swap Values", "md_doc_tutorial.html#SwapValues", null ]
23 ] ],
24 [ "What's next", "md_doc_tutorial.html#WhatsNext", null ]
25 ] ],
26 [ "Stream", "md_doc_stream.html", [
27 [ "Memory Streams", "md_doc_stream.html#MemoryStreams", [
28 [ "StringStream (Input)", "md_doc_stream.html#StringStream", null ],
29 [ "StringBuffer (Output)", "md_doc_stream.html#StringBuffer", null ]
30 ] ],
31 [ "File Streams", "md_doc_stream.html#FileStreams", [
32 [ "FileReadStream (Input)", "md_doc_stream.html#FileReadStream", null ],
33 [ "FileWriteStream (Output)", "md_doc_stream.html#FileWriteStream", null ]
34 ] ],
35 [ "Encoded Streams", "md_doc_stream.html#EncodedStreams", [
36 [ "EncodedInputStream", "md_doc_stream.html#EncodedInputStream", null ],
37 [ "EncodedOutputStream", "md_doc_stream.html#EncodedOutputStream", null ],
38 [ "AutoUTFInputStream", "md_doc_stream.html#AutoUTFInputStream", null ],
39 [ "AutoUTFOutputStream", "md_doc_stream.html#AutoUTFOutputStream", null ]
40 ] ],
41 [ "Custom Stream", "md_doc_stream.html#CustomStream", [
42 [ "Example: istream wrapper", "md_doc_stream.html#ExampleIStreamWrapper", null ],
43 [ "Example: ostream wrapper", "md_doc_stream.html#ExampleOStreamWrapper", null ]
44 ] ],
45 [ "Summary", "md_doc_stream.html#Summary", null ]
46 ] ],
47 [ "Encoding", "md_doc_encoding.html", [
48 [ "Unicode", "md_doc_encoding.html#Unicode", [
49 [ "Unicode Transformation Format", "md_doc_encoding.html#UTF", null ],
50 [ "Character Type", "md_doc_encoding.html#CharacterType", null ],
51 [ "AutoUTF", "md_doc_encoding.html#AutoUTF", null ],
52 [ "ASCII", "md_doc_encoding.html#ASCII", null ]
53 ] ],
54 [ "Validation & Transcoding", "md_doc_encoding.html#ValidationTranscoding", [
55 [ "Transcoder", "md_doc_encoding.html#Transcoder", null ]
56 ] ]
57 ] ],
58 [ "DOM", "md_doc_dom.html", [
59 [ "Template", "md_doc_dom.html#Template", [
60 [ "Encoding", "md_doc_dom.html#Encoding", null ],
61 [ "Allocator", "md_doc_dom.html#Allocator", null ]
62 ] ],
63 [ "Parsing", "md_doc_dom.html#Parsing", [
64 [ "Parse Error", "md_doc_dom.html#ParseError", null ],
65 [ "In Situ Parsing", "md_doc_dom.html#InSituParsing", null ],
66 [ "Transcoding and Validation", "md_doc_dom.html#TranscodingAndValidation", null ]
67 ] ],
68 [ "Techniques", "md_doc_dom.html#Techniques", [
69 [ "User Buffer", "md_doc_dom.html#UserBuffer", null ]
70 ] ]
71 ] ],
72 [ "SAX", "md_doc_sax.html", [
73 [ "Reader", "md_doc_sax.html#Reader", [
74 [ "Handler", "md_doc_sax.html#Handler", null ],
75 [ "GenericReader", "md_doc_sax.html#GenericReader", null ]
76 ] ],
77 [ "Writer", "md_doc_sax.html#Writer", [
78 [ "PrettyWriter", "md_doc_sax.html#PrettyWriter", null ],
79 [ "Completeness and Reset", "md_doc_sax.html#CompletenessReset", null ],
80 [ "Parsing JSON to Custom Data Structure", "md_doc_sax.html#CustomDataStructure", null ],
81 [ "Filtering of JSON", "md_doc_sax.html#Filtering", null ]
82 ] ]
83 ] ],
84 [ "Performance", "md_doc_performance.html", null ],
85 [ "Internals", "md_doc_internals.html", [
miloyipaa96ef22015-04-03 02:09:27 +000086 [ "Architecture", "md_doc_internals.html#Architecture", null ],
miloyip28df04d2014-08-08 13:48:11 +000087 [ "Value", "md_doc_internals.html#Value", [
88 [ "Data Layout", "md_doc_internals.html#DataLayout", null ],
89 [ "Flags", "md_doc_internals.html#Flags", null ],
miloyipaa96ef22015-04-03 02:09:27 +000090 [ "Short-String Optimization", "md_doc_internals.html#ShortString", null ],
miloyip28df04d2014-08-08 13:48:11 +000091 [ "MemoryPoolAllocator", "md_doc_internals.html#MemoryPoolAllocator", null ]
92 ] ],
93 [ "Parsing Optimization", "md_doc_internals.html#ParsingOptimization", [
miloyipaa96ef22015-04-03 02:09:27 +000094 [ "Skip Whitespaces with SIMD", "md_doc_internals.html#SkipwhitespaceWithSIMD", null ],
95 [ "Local Stream Copy", "md_doc_internals.html#LocalStreamCopy", null ],
96 [ "Parsing to Double", "md_doc_internals.html#ParsingDouble", null ]
97 ] ],
98 [ "Generation Optimizatoin", "md_doc_internals.html#GenerationOptimization", [
99 [ "Integer-to-String conversion", "md_doc_internals.html#itoa", null ],
100 [ "Double-to-String conversion", "md_doc_internals.html#dtoa", null ]
miloyip28df04d2014-08-08 13:48:11 +0000101 ] ],
102 [ "Parser", "md_doc_internals.html#Parser", [
103 [ "Iterative Parser", "md_doc_internals.html#IterativeParser", [
104 [ "Grammar", "md_doc_internals.html#IterativeParserGrammar", null ],
105 [ "Parsing Table", "md_doc_internals.html#IterativeParserParsingTable", null ],
106 [ "Implementation", "md_doc_internals.html#IterativeParserImplementation", null ]
107 ] ]
108 ] ]
109 ] ],
110 [ "FAQ", "md_doc_faq.html", null ],
miloyip22ee6ef2014-08-20 01:22:05 +0000111 [ "Modules", "modules.html", "modules" ],
miloyip28df04d2014-08-08 13:48:11 +0000112 [ "Namespace Members", "namespacemembers.html", [
113 [ "All", "namespacemembers.html", null ],
114 [ "Functions", "namespacemembers_func.html", null ],
115 [ "Typedefs", "namespacemembers_type.html", null ],
116 [ "Enumerations", "namespacemembers_enum.html", null ],
117 [ "Enumerator", "namespacemembers_eval.html", null ]
118 ] ],
119 [ "Classes", null, [
120 [ "Class List", "annotated.html", "annotated" ],
121 [ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
122 [ "Class Members", "functions.html", [
123 [ "All", "functions.html", null ],
124 [ "Functions", "functions_func.html", null ],
125 [ "Variables", "functions_vars.html", null ],
126 [ "Typedefs", "functions_type.html", null ],
127 [ "Related Functions", "functions_rela.html", null ]
128 ] ]
129 ] ],
130 [ "Files", null, [
131 [ "File List", "files.html", "files" ],
132 [ "File Members", "globals.html", [
133 [ "All", "globals.html", null ],
134 [ "Macros", "globals_defs.html", null ]
135 ] ]
136 ] ]
137 ] ]
138];
139
140var NAVTREEINDEX =
141[
142"allocators_8h_source.html",
miloyipec8d87f2015-03-13 14:06:09 +0000143"classrapidjson_1_1_generic_value.html#aca0cff58ccd1d50ddce2eb2182e322c2",
miloyipaa96ef22015-04-03 02:09:27 +0000144"md_doc_internals.html#MemoryPoolAllocator"
miloyip28df04d2014-08-08 13:48:11 +0000145];
146
147var SYNCONMSG = 'click to disable panel synchronisation';
148var SYNCOFFMSG = 'click to enable panel synchronisation';
149var navTreeSubIndices = new Array();
150
151function getData(varName)
152{
153 var i = varName.lastIndexOf('/');
154 var n = i>=0 ? varName.substring(i+1) : varName;
155 return eval(n.replace(/\-/g,'_'));
156}
157
158function stripPath(uri)
159{
160 return uri.substring(uri.lastIndexOf('/')+1);
161}
162
163function stripPath2(uri)
164{
165 var i = uri.lastIndexOf('/');
166 var s = uri.substring(i+1);
167 var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
168 return m ? uri.substring(i-6) : s;
169}
170
171function hashValue()
172{
173 return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,'');
174}
175
176function hashUrl()
177{
178 return '#'+hashValue();
179}
180
181function pathName()
182{
183 return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, '');
184}
185
186function localStorageSupported()
187{
188 try {
189 return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
190 }
191 catch(e) {
192 return false;
193 }
194}
195
196
197function storeLink(link)
198{
199 if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
200 window.localStorage.setItem('navpath',link);
201 }
202}
203
204function deleteLink()
205{
206 if (localStorageSupported()) {
207 window.localStorage.setItem('navpath','');
208 }
209}
210
211function cachedLink()
212{
213 if (localStorageSupported()) {
214 return window.localStorage.getItem('navpath');
215 } else {
216 return '';
217 }
218}
219
220function getScript(scriptName,func,show)
221{
222 var head = document.getElementsByTagName("head")[0];
223 var script = document.createElement('script');
224 script.id = scriptName;
225 script.type = 'text/javascript';
226 script.onload = func;
227 script.src = scriptName+'.js';
228 if ($.browser.msie && $.browser.version<=8) {
229 // script.onload does not work with older versions of IE
230 script.onreadystatechange = function() {
231 if (script.readyState=='complete' || script.readyState=='loaded') {
232 func(); if (show) showRoot();
233 }
234 }
235 }
236 head.appendChild(script);
237}
238
239function createIndent(o,domNode,node,level)
240{
241 var level=-1;
242 var n = node;
243 while (n.parentNode) { level++; n=n.parentNode; }
244 if (node.childrenData) {
245 var imgNode = document.createElement("img");
246 imgNode.style.paddingLeft=(16*level).toString()+'px';
247 imgNode.width = 16;
248 imgNode.height = 22;
249 imgNode.border = 0;
250 node.plus_img = imgNode;
251 node.expandToggle = document.createElement("a");
252 node.expandToggle.href = "javascript:void(0)";
253 node.expandToggle.onclick = function() {
254 if (node.expanded) {
255 $(node.getChildrenUL()).slideUp("fast");
256 node.plus_img.src = node.relpath+"ftv2pnode.png";
257 node.expanded = false;
258 } else {
259 expandNode(o, node, false, false);
260 }
261 }
262 node.expandToggle.appendChild(imgNode);
263 domNode.appendChild(node.expandToggle);
264 imgNode.src = node.relpath+"ftv2pnode.png";
265 } else {
266 var span = document.createElement("span");
267 span.style.display = 'inline-block';
268 span.style.width = 16*(level+1)+'px';
269 span.style.height = '22px';
270 span.innerHTML = '&#160;';
271 domNode.appendChild(span);
272 }
273}
274
275var animationInProgress = false;
276
277function gotoAnchor(anchor,aname,updateLocation)
278{
279 var pos, docContent = $('#doc-content');
280 var ancParent = $(anchor.parent());
281 if (ancParent.hasClass('memItemLeft') ||
282 ancParent.hasClass('fieldname') ||
283 ancParent.hasClass('fieldtype') ||
284 ancParent.is(':header'))
285 {
286 pos = ancParent.position().top;
287 } else if (anchor.position()) {
288 pos = anchor.position().top;
289 }
290 if (pos) {
291 var dist = Math.abs(Math.min(
292 pos-docContent.offset().top,
293 docContent[0].scrollHeight-
294 docContent.height()-docContent.scrollTop()));
295 animationInProgress=true;
296 docContent.animate({
297 scrollTop: pos + docContent.scrollTop() - docContent.offset().top
298 },Math.max(50,Math.min(500,dist)),function(){
299 if (updateLocation) window.location.href=aname;
300 animationInProgress=false;
301 });
302 }
303}
304
305function newNode(o, po, text, link, childrenData, lastNode)
306{
307 var node = new Object();
308 node.children = Array();
309 node.childrenData = childrenData;
310 node.depth = po.depth + 1;
311 node.relpath = po.relpath;
312 node.isLast = lastNode;
313
314 node.li = document.createElement("li");
315 po.getChildrenUL().appendChild(node.li);
316 node.parentNode = po;
317
318 node.itemDiv = document.createElement("div");
319 node.itemDiv.className = "item";
320
321 node.labelSpan = document.createElement("span");
322 node.labelSpan.className = "label";
323
324 createIndent(o,node.itemDiv,node,0);
325 node.itemDiv.appendChild(node.labelSpan);
326 node.li.appendChild(node.itemDiv);
327
328 var a = document.createElement("a");
329 node.labelSpan.appendChild(a);
330 node.label = document.createTextNode(text);
331 node.expanded = false;
332 a.appendChild(node.label);
333 if (link) {
334 var url;
335 if (link.substring(0,1)=='^') {
336 url = link.substring(1);
337 link = url;
338 } else {
339 url = node.relpath+link;
340 }
341 a.className = stripPath(link.replace('#',':'));
342 if (link.indexOf('#')!=-1) {
343 var aname = '#'+link.split('#')[1];
344 var srcPage = stripPath(pathName());
345 var targetPage = stripPath(link.split('#')[0]);
346 a.href = srcPage!=targetPage ? url : "javascript:void(0)";
347 a.onclick = function(){
348 storeLink(link);
349 if (!$(a).parent().parent().hasClass('selected'))
350 {
351 $('.item').removeClass('selected');
352 $('.item').removeAttr('id');
353 $(a).parent().parent().addClass('selected');
354 $(a).parent().parent().attr('id','selected');
355 }
356 var anchor = $(aname);
357 gotoAnchor(anchor,aname,true);
358 };
359 } else {
360 a.href = url;
361 a.onclick = function() { storeLink(link); }
362 }
363 } else {
364 if (childrenData != null)
365 {
366 a.className = "nolink";
367 a.href = "javascript:void(0)";
368 a.onclick = node.expandToggle.onclick;
369 }
370 }
371
372 node.childrenUL = null;
373 node.getChildrenUL = function() {
374 if (!node.childrenUL) {
375 node.childrenUL = document.createElement("ul");
376 node.childrenUL.className = "children_ul";
377 node.childrenUL.style.display = "none";
378 node.li.appendChild(node.childrenUL);
379 }
380 return node.childrenUL;
381 };
382
383 return node;
384}
385
386function showRoot()
387{
388 var headerHeight = $("#top").height();
389 var footerHeight = $("#nav-path").height();
390 var windowHeight = $(window).height() - headerHeight - footerHeight;
391 (function (){ // retry until we can scroll to the selected item
392 try {
393 var navtree=$('#nav-tree');
394 navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
395 } catch (err) {
396 setTimeout(arguments.callee, 0);
397 }
398 })();
399}
400
401function expandNode(o, node, imm, showRoot)
402{
403 if (node.childrenData && !node.expanded) {
404 if (typeof(node.childrenData)==='string') {
405 var varName = node.childrenData;
406 getScript(node.relpath+varName,function(){
407 node.childrenData = getData(varName);
408 expandNode(o, node, imm, showRoot);
409 }, showRoot);
410 } else {
411 if (!node.childrenVisited) {
412 getNode(o, node);
413 } if (imm || ($.browser.msie && $.browser.version>8)) {
414 // somehow slideDown jumps to the start of tree for IE9 :-(
415 $(node.getChildrenUL()).show();
416 } else {
417 $(node.getChildrenUL()).slideDown("fast");
418 }
419 if (node.isLast) {
420 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
421 } else {
422 node.plus_img.src = node.relpath+"ftv2mnode.png";
423 }
424 node.expanded = true;
425 }
426 }
427}
428
429function glowEffect(n,duration)
430{
431 n.addClass('glow').delay(duration).queue(function(next){
432 $(this).removeClass('glow');next();
433 });
434}
435
436function highlightAnchor()
437{
438 var aname = hashUrl();
439 var anchor = $(aname);
440 if (anchor.parent().attr('class')=='memItemLeft'){
441 var rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
442 glowEffect(rows.children(),300); // member without details
443 } else if (anchor.parent().attr('class')=='fieldname'){
444 glowEffect(anchor.parent().parent(),1000); // enum value
445 } else if (anchor.parent().attr('class')=='fieldtype'){
446 glowEffect(anchor.parent().parent(),1000); // struct field
447 } else if (anchor.parent().is(":header")) {
448 glowEffect(anchor.parent(),1000); // section header
449 } else {
450 glowEffect(anchor.next(),1000); // normal member
451 }
452 gotoAnchor(anchor,aname,false);
453}
454
455function selectAndHighlight(hash,n)
456{
457 var a;
458 if (hash) {
459 var link=stripPath(pathName())+':'+hash.substring(1);
460 a=$('.item a[class$="'+link+'"]');
461 }
462 if (a && a.length) {
463 a.parent().parent().addClass('selected');
464 a.parent().parent().attr('id','selected');
465 highlightAnchor();
466 } else if (n) {
467 $(n.itemDiv).addClass('selected');
468 $(n.itemDiv).attr('id','selected');
469 }
470 if ($('#nav-tree-contents .item:first').hasClass('selected')) {
471 $('#nav-sync').css('top','30px');
472 } else {
473 $('#nav-sync').css('top','5px');
474 }
475 showRoot();
476}
477
478function showNode(o, node, index, hash)
479{
480 if (node && node.childrenData) {
481 if (typeof(node.childrenData)==='string') {
482 var varName = node.childrenData;
483 getScript(node.relpath+varName,function(){
484 node.childrenData = getData(varName);
485 showNode(o,node,index,hash);
486 },true);
487 } else {
488 if (!node.childrenVisited) {
489 getNode(o, node);
490 }
491 $(node.getChildrenUL()).css({'display':'block'});
492 if (node.isLast) {
493 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
494 } else {
495 node.plus_img.src = node.relpath+"ftv2mnode.png";
496 }
497 node.expanded = true;
498 var n = node.children[o.breadcrumbs[index]];
499 if (index+1<o.breadcrumbs.length) {
500 showNode(o,n,index+1,hash);
501 } else {
502 if (typeof(n.childrenData)==='string') {
503 var varName = n.childrenData;
504 getScript(n.relpath+varName,function(){
505 n.childrenData = getData(varName);
506 node.expanded=false;
507 showNode(o,node,index,hash); // retry with child node expanded
508 },true);
509 } else {
510 var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
511 if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
512 expandNode(o, n, true, true);
513 }
514 selectAndHighlight(hash,n);
515 }
516 }
517 }
518 } else {
519 selectAndHighlight(hash);
520 }
521}
522
523function removeToInsertLater(element) {
524 var parentNode = element.parentNode;
525 var nextSibling = element.nextSibling;
526 parentNode.removeChild(element);
527 return function() {
528 if (nextSibling) {
529 parentNode.insertBefore(element, nextSibling);
530 } else {
531 parentNode.appendChild(element);
532 }
533 };
534}
535
536function getNode(o, po)
537{
538 var insertFunction = removeToInsertLater(po.li);
539 po.childrenVisited = true;
540 var l = po.childrenData.length-1;
541 for (var i in po.childrenData) {
542 var nodeData = po.childrenData[i];
543 po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
544 i==l);
545 }
546 insertFunction();
547}
548
549function gotoNode(o,subIndex,root,hash,relpath)
550{
551 var nti = navTreeSubIndices[subIndex][root+hash];
552 o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
553 if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
554 navTo(o,NAVTREE[0][1],"",relpath);
555 $('.item').removeClass('selected');
556 $('.item').removeAttr('id');
557 }
558 if (o.breadcrumbs) {
559 o.breadcrumbs.unshift(0); // add 0 for root node
560 showNode(o, o.node, 0, hash);
561 }
562}
563
564function navTo(o,root,hash,relpath)
565{
566 var link = cachedLink();
567 if (link) {
568 var parts = link.split('#');
569 root = parts[0];
570 if (parts.length>1) hash = '#'+parts[1].replace(/[^\w\-]/g,'');
571 else hash='';
572 }
573 if (hash.match(/^#l\d+$/)) {
574 var anchor=$('a[name='+hash.substring(1)+']');
575 glowEffect(anchor.parent(),1000); // line number
576 hash=''; // strip line number anchors
577 }
578 var url=root+hash;
579 var i=-1;
580 while (NAVTREEINDEX[i+1]<=url) i++;
581 if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
582 if (navTreeSubIndices[i]) {
583 gotoNode(o,i,root,hash,relpath)
584 } else {
585 getScript(relpath+'navtreeindex'+i,function(){
586 navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
587 if (navTreeSubIndices[i]) {
588 gotoNode(o,i,root,hash,relpath);
589 }
590 },true);
591 }
592}
593
594function showSyncOff(n,relpath)
595{
596 n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
597}
598
599function showSyncOn(n,relpath)
600{
601 n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
602}
603
604function toggleSyncButton(relpath)
605{
606 var navSync = $('#nav-sync');
607 if (navSync.hasClass('sync')) {
608 navSync.removeClass('sync');
609 showSyncOff(navSync,relpath);
610 storeLink(stripPath2(pathName())+hashUrl());
611 } else {
612 navSync.addClass('sync');
613 showSyncOn(navSync,relpath);
614 deleteLink();
615 }
616}
617
618function initNavTree(toroot,relpath)
619{
620 var o = new Object();
621 o.toroot = toroot;
622 o.node = new Object();
623 o.node.li = document.getElementById("nav-tree-contents");
624 o.node.childrenData = NAVTREE;
625 o.node.children = new Array();
626 o.node.childrenUL = document.createElement("ul");
627 o.node.getChildrenUL = function() { return o.node.childrenUL; };
628 o.node.li.appendChild(o.node.childrenUL);
629 o.node.depth = 0;
630 o.node.relpath = relpath;
631 o.node.expanded = false;
632 o.node.isLast = true;
633 o.node.plus_img = document.createElement("img");
634 o.node.plus_img.src = relpath+"ftv2pnode.png";
635 o.node.plus_img.width = 16;
636 o.node.plus_img.height = 22;
637
638 if (localStorageSupported()) {
639 var navSync = $('#nav-sync');
640 if (cachedLink()) {
641 showSyncOff(navSync,relpath);
642 navSync.removeClass('sync');
643 } else {
644 showSyncOn(navSync,relpath);
645 }
646 navSync.click(function(){ toggleSyncButton(relpath); });
647 }
648
649 $(window).load(function(){
650 navTo(o,toroot,hashUrl(),relpath);
651 showRoot();
652 });
653
654 $(window).bind('hashchange', function(){
655 if (window.location.hash && window.location.hash.length>1){
656 var a;
657 if ($(location).attr('hash')){
658 var clslink=stripPath(pathName())+':'+hashValue();
659 a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
660 }
661 if (a==null || !$(a).parent().parent().hasClass('selected')){
662 $('.item').removeClass('selected');
663 $('.item').removeAttr('id');
664 }
665 var link=stripPath2(pathName());
666 navTo(o,link,hashUrl(),relpath);
667 } else if (!animationInProgress) {
668 $('#doc-content').scrollTop(0);
669 $('.item').removeClass('selected');
670 $('.item').removeAttr('id');
671 navTo(o,toroot,hashUrl(),relpath);
672 }
673 })
674}
675