Debian Codegraph @

manuals/en/js/bmanual.js

raw
1 function log(msg) {
2 setTimeout(function() {
3 throw new Error(msg);
4 }, 0);
5 }
6 function basename(path) {
7 var forwin = path.replace(/\\/g,'/') ;
8 var fornux = forwin.replace(/.*\//, '' );
9 return fornux ;
10 }
11 function menuonload(self) {
12 var myatag = "";
13 var mytag = "" ;
14 var x = 0 ;
15 var atag = document.getElementsByTagName("a") ;
16 var filename = basename(document.location.href) ;
17 for (x=0;x<atag.length;x=x+1) {
18 if (basename(atag[x].href) == filename) {
19 myatag = atag[x] ;
20 break ;
21 }
22 }
23 openmenus(self,myatag) ;
24 }
25
26 function openmenus(self,myatag) {
27 x = 0 ;
28 var breadcrumbstext = new Array() ;
29 var breadcrumbsrefs = new Array() ;
30 breadcrumbsrefs[x] = myatag.href ;
31 breadcrumbstext[x] = myatag.innerHTML ;
32 mytag = myatag.parentNode.parentNode ;
33 while (mytag.tagName != "DIV") {
34 x++ ;
35 //
36 // Change arrow from "right" to "down"
37 myatag = mytag.parentNode.getElementsByTagName("a")[0] ;
38 //
39 // Keep all needed informations
40 breadcrumbsrefs[x] = myatag.href ;
41 breadcrumbstext[x] = myatag.innerHTML ;
42 //
43 // Find upper level
44 mytag = mytag.parentNode.parentNode ;
45 }
46 //
47 // Find the breadcrumbs part
48 mytag = document.getElementById("b_breadcrumbscontentid") ;
49 //
50 // Build breadcrumbs content
51 var thebreadcrumbs = "<ul>" ;
52 for (y=x-1;y>=0;y--) {
53 thebreadcrumbs = thebreadcrumbs + "<li><a href='" + breadcrumbsrefs[y] + "' onclick=\"menuonclick(this,'');\">" + breadcrumbstext[y] + "</a></li>" ;
54 }
55 thebreadcrumbs = thebreadcrumbs + "</ul>"
56 mytag.innerHTML = thebreadcrumbs ;
57 }
58 function menuonclick(self) {
59 //
60 // find the *other* <A> tag which contains the same HREF
61 var myatag = "";
62 var x ;
63 var atags = document.getElementsByTagName("a") ;
64 var filename = basename(self.href) ;
65 var firstone = 0 ;
66 for (x=0;x<atags.length;x=x+1) {
67 if ((basename(atags[x].href) == filename) && (atags[x].name != "")) {
68 myatag = atags[x] ;
69 break ;
70 }
71 }
72 openmenus(self,myatag) ;
73 }
74 function click_expandingMenuHeader(obj,uniqid)
75 {
76 var x=document.getElementById(uniqid).className;
77 x=x.replace("expandingMenuNotSelected","expandingMenuSelected");
78 obj.style.listStyleImage = "url(\'../../images/down.png\')" ;
79 document.getElementById(uniqid).className=x;
80 document.getElementById(uniqid).style.display="block";
81 linode = obj.parentNode ;
82 linode.onmouseout="" ;
83 }
84 function over_expandingMenuHeader(obj,uniqid)
85 {
86 var x=document.getElementById(uniqid).className;
87 if (x.indexOf("expandingMenuNotSelected")>-1)
88 {
89 x=x.replace("expandingMenuNotSelected","expandingMenuSelected");
90 obj.style.listStyleImage = "url(\'../../images/down.png\')" ;
91 document.getElementById(uniqid).className=x;
92 document.getElementById(uniqid).style.display="block";
93 }
94 }
95 function out_expandingMenuHeader(obj,uniqid)
96 {
97 var x=document.getElementById(uniqid).className;
98 if (x.indexOf("expandingMenuSelected")>-1)
99 {
100 x=x.replace("expandingMenuSelected","expandingMenuNotSelected");
101 document.getElementById(uniqid).className=x;
102 obj.style.listStyleImage = "url(\'../../images/right.png\')" ;
103 document.getElementById(uniqid).style.display="none";
104 }
105 }