summaryrefslogtreecommitdiff
path: root/html/wb/template_wb_tree.html
blob: 4e4516311c095feec564b6dac7916ec271ea3502 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
  <meta http-equiv="Content-Language" content="en-us" >
  <title>Tree</title>
  <base target="wb_cont">
  <style type="text/css">
  .tree { font-family: helvetica, sans-serif; font-size: 10pt; }
  .tree h3 {
    margin: 5px 0px 0px 0px;
    font-size: 12pt;
  }
  .tree p { margin: 0px; white-space: nowrap; }
  .tree p.sep { margin: 0px; white-space: nowrap; line-height: 8px; font-size: 5px; }
  .tree div { display: none; margin: 0px; }
  .tree img { vertical-align: middle; }
  .tree a.el { text-decoration: none; margin-left: 4px; color: #003366; }
  .tree a:hover { text-decoration: none; background-color: #e0e0ff }
  </style>
  <script type="text/javascript">
  lastLink = null;
  
  function hideFolder(folder, id) 
  {
    var imageNode = document.images["img" + id];
    if (imageNode != null) 
    {
      var len = imageNode.src.length;
      if (imageNode.src.substring(len-8,len-4) == "last")
        imageNode.src = "wb_img/plusnodelast.png";
      else if (imageNode.src.substring(len-8,len-4) == "node")
        imageNode.src = "wb_img/plusnode.png";
    }                          
    folder.style.display = "none";
  }
  
  function showFolder(folder, id) 
  {
    var imageNode = document.images["img" + id];
    if (imageNode != null) 
    {
      var len = imageNode.src.length;
      if (imageNode.src.substring(len-8,len-4) == "last")
        imageNode.src = "wb_img/minusnodelast.png";
      else if (imageNode.src.substring(len-8,len-4) == "node")
        imageNode.src = "wb_img/minusnode.png";
    }
    folder.style.display = "block";
  }    

  function toggleFolder(id) 
  {
    var folder = document.getElementById(id);
    if (folder.style.display == "block") 
      hideFolder(folder, id);
    else 
      showFolder(folder, id);
  }
  
  function setFoldersAtLevel(level, show) 
  {                                    
    var i = 1;
    do
    {
      var folder_id = level + "." + i;
      var id = "folder" + folder_id;
      var folder = document.getElementById(id);
      if (folder != null)
      {
        setFoldersAtLevel(folder_id, show);
        
        if (show)
          showFolder(folder, id);
        else
          hideFolder(folder, id);
      }
      i++;
    } while(folder != null);
  }
    
  function showAllFolders() 
  {                                    
    setFoldersAtLevel("", true); 
  }
  
  function hideAllFolders() 
  {                                    
    setFoldersAtLevel("", false); 
  }
  
  function getFolderId(name)
  {  
    return name.substring(name.indexOf("folder"), name.length);
  }
  
  function showFolderRec(id)
  {
    var folder = document.getElementById(id);
    if (folder != null)
    {
      showFolder(folder, id);
      
      var parent_id = id.substring(0, id.lastIndexOf("."))
      if (parent_id != null && parent_id != "folder")
      {
         showFolderRec(parent_id)
      }
    }
  }           
  
  function clearLastLink()
  {
    if (lastLink != null)
    {
      lastLink.style.color = ""  
      lastLink = null;
    }
  }                 
  
  function goToLink(link)
  {                  
    var id = getFolderId(link.name);
    showFolderRec(id);
    location.hash = "#" + link.name;
    link.style.color = "#ff0000";  
    
    clearLastLink();
    lastLink = link;
  }

  function syncContents()
  {
    var cur_topic = parent.wb_cont.location.href 
    
    for (var i = 0; i < document.links.length; i++) 
    {      
      var link = document.links[i];
      if (cur_topic == link.href)
      {                  
        goToLink(link)
        return
      }
    }                                 
  }
  
  function nextContents()
  {
    var cur_topic = parent.wb_cont.location.href 
                                                
    for (var i = 0; i < document.links.length; i++) 
    {      
      var link = document.links[i];
      if (cur_topic == link.href)
      {        
        if (i == document.links.length-1)
          link = document.links[0];
        else
          link = document.links[i+1];  
          
        goToLink(link)
        parent.wb_cont.location.href = link.href;
        return
      }
    }                                 
  }
  
  function prevContents()
  {
    var cur_topic = parent.wb_cont.location.href 
    var prev_link = document.links[document.links.length-1]
    
    for (var i = 0; i < document.links.length; i++) 
    {      
      var link = document.links[i];
      if (cur_topic == link.href)
      {        
        if (i == 0)
          link = document.links[document.links.length-1];
        else
          link = document.links[i-1];
          
        goToLink(link)
        parent.wb_cont.location.href = link.href;
        return
      }
    }                                 
  }
    
  function showStartPage()
  {
    var full_url = parent.document.URL;
    if (full_url == null)
      return; 
      
    var param = full_url.substring(full_url.indexOf("?") + 1, full_url.length);
    if (param == null)
      return;
      
    var param_url = param.substring(param.indexOf("url=") + 4, param.length);
    if (param_url == null)
      return;
                                        
    var param_len = param_url.length;                                    
    for (var i = 0; i < document.links.length; i++) 
    {      
      var link = document.links[i];
      var link_url = link.href.substring(link.href.length-param_len, link.href.length)
      if (link_url == param_url)
      {
        goToLink(link)
        parent.wb_cont.location.href = link.href;
        return
      }
    }                                 
  }
  </script>
</head>

<body style="margin: 2px; background-color: #F1F1F1" onload="showStartPage()"> 
  <div class="tree" onmouseout="clearLastLink()">