OLD | NEW |
| (Empty) |
1 <HTML><!-- (c) jSh:Services --> | |
2 <HEAD> | |
3 <TITLE>UDT Documentation</TITLE> | |
4 <LINK REL=StyleSheet TYPE="text/css" HREF="doc/treeview.css"> | |
5 <META NAME="robots" CONTENT="noindex,follow"> | |
6 <base target="main"> | |
7 </HEAD> | |
8 <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#CC0000" VLINK="#990066" ALINK="#CC
0000" ONLOAD="window.onerror=myError; loaded=true;"> | |
9 <NULL SPACE TAG (NS2 BUGFIX)> | |
10 | |
11 <SCRIPT LANGUAGE="JavaScript"> /* | |
12 This page requires a JavaScript- enabled browser. Yours isn't. | |
13 (Für diese Seite muss JavaScript einsetzbar sein!) */ <!-- hide | |
14 function myError(msg, url, line) { return true; } // error 'handler' | |
15 window.onerror = myError; loaded = false; xImgs = new Array(10); | |
16 | |
17 /* This is TreeView, Copyright (c) Simon Harston <jSh@jSh.de> | |
18 * It may be used as freeware, but please give credit. Please | |
19 * also tell me an URL where I can look at what you made with | |
20 * it. Get the documentation at <http://www.jsh.de/treeview/> | |
21 */ | |
22 | |
23 /* ### LOCAL DEFINITIONS ### */ | |
24 UniqueID = "UDT"; | |
25 DocRoot = "doc/"; | |
26 ImgRoot = "hlp/"; | |
27 FrameSet = "index.htm"; | |
28 ImgWidth = 14; | |
29 ImgHeight = 18; | |
30 EntryHeight = ImgHeight; | |
31 InitialKey = ""; | |
32 CurrPageBG = "#000099"; | |
33 CurrPageFG = "#FFFFFF"; | |
34 LinkCurrPage = true; | |
35 TreeRootHint = ""; | |
36 NormalPageHint = ""; | |
37 LinkedPageHint = ""; | |
38 OpenBookHint = "close"; // "schließen"; | |
39 ClosedBookHint = "open"; // "öffnen"; | |
40 OpenBookStatus = "Close sub-list"; // "Ebene ausblenden"; | |
41 ClosedBookStatus = "Open sub-list"; // "Ebene einblenden"; | |
42 window.defaultStatus = "UDT Documentation"; | |
43 navExplain = "\nThis page normally belongs inside a navigation" + " frame.\n\nIs
it OK to reload the page as designed ?"; | |
44 // navExplain = "Wenn ihr Browser Frames und JavaScript unterst" | |
45 // +unescape("%FC")+"tzt,\nempfehlen wir die Nutzung der deutlich " | |
46 // +"komfortableren\nFrameset-Version dieser Homepage." | |
47 // waitText = "Baumstruktur wird aktualisiert. Bitte warten ..."; | |
48 FontFace = "'Garamond Condensed','Times New Roman',Times,serif"; | |
49 compactTree = false; | |
50 viewMatchCnt = 0; | |
51 singleBranch = false; | |
52 checkFrames = true; | |
53 | |
54 /* ### ENTER YOUR TREEVIEW INDEX HERE ### | |
55 * Note for TEXT: Use \" for quotes, NOT " ! */ | |
56 | |
57 initTree("<B>UDT Documentation<\/B>","*", "intro.htm"); | |
58 sub_Page("Introduction|Introduction to UDT", "a", "intro.htm"); | |
59 sub_Page("Installation|Make and Install UDT", "b", "make.htm"); | |
60 sub_Book("Tutorial", "c", "tutorial.htm"); | |
61 sub_Page("Transition from UDT3|Transition from UDT3", "ca","t-udt3.h
tm"); | |
62 sub_Page("Introduction|Introduction to UDT programming", "cb","t-intro.
htm"); | |
63 sub_Page("Hello World|A simple UDT example", "cc","t-hello.
htm"); | |
64 sub_Page("Configuration|Read and set UDT options", "cd","t-config
.htm"); | |
65 sub_Page("Transfer Data|Sending / Receiving data", "ce","t-data.h
tm"); | |
66 sub_Page("Messaging with Partial Reliability|Messaging with partial reliabilit
y", "cf","t-msg.htm"); | |
67 sub_Page("Transfer File|Sending / Receiving files", "cg","t-file.h
tm"); | |
68 sub_Page("Handling Firewalls|Handling Firewalls", "ch","t-firewa
ll.htm"); | |
69 sub_Page("Error Handling|Handle error and exceptions", "ci","t-error.
htm"); | |
70 lastPage("User-defined Congestion Control|Add user-defined congestion control
clgorithm", "cj","t-cc.htm"); | |
71 end_Book(); | |
72 sub_Book("Reference", "d", "reference.htm"); | |
73 sub_Book("UDT Functions", "da", "function.htm"); | |
74 sub_Page("accept|accept", "daa","accept.htm"); | |
75 sub_Page("bind|bind", "dab","bind.htm"); | |
76 sub_Page("cleanup|cleanup", "dac","cleanup.htm"); | |
77 sub_Page("close|close", "dad","close.htm"); | |
78 sub_Page("connect|connect", "dae","connect.htm"); | |
79 sub_Page("epoll|epoll", "daf","epoll.htm"); | |
80 sub_Page("getlasterror|getlasterror", "dag","error.htm"); | |
81 sub_Page("getpeername|getpeername", "dah","peername.htm"); | |
82 sub_Page("getsockname|getsockname", "dai","sockname.htm"); | |
83 sub_Page("getsockopt|getsockopt", "daj","opt.htm"); | |
84 sub_Page("listen|listen", "dak","listen.htm"); | |
85 sub_Page("perfmon|perfmon", "dal","trace.htm"); | |
86 sub_Page("recv|recv", "dam","recv.htm"); | |
87 sub_Page("recvfile|recvfile", "dan","recvfile.htm"); | |
88 sub_Page("recvmsg|recvmsg", "dao","recvmsg.htm"); | |
89 sub_Page("select|select", "dap","select.htm"); | |
90 sub_Page("selectEx|selectEx", "daq","selectex.htm"); | |
91 sub_Page("send|send", "dar","send.htm"); | |
92 sub_Page("sendfile|sendfile", "das","sendfile.htm"); | |
93 sub_Page("sendmsg|sendmsg", "dat","sendmsg.htm"); | |
94 sub_Page("setsockopt|setsockopt", "dau","opt.htm"); | |
95 sub_Page("socket|socket", "dav","socket.htm"); | |
96 lastPage("startup|startup", "daw","startup.htm"); | |
97 end_Book(); | |
98 sub_Page("UDT Structures", "db","structure.htm"); | |
99 sub_Page("Congestion Control Class", "dc","ccc.htm"); | |
100 lastPage("Error Code List", "dd","ecode.htm"); | |
101 end_Book(); | |
102 lastPage("COPYRIGHT", "e", "copy.htm"); | |
103 idx(); | |
104 end_Tree(); | |
105 | |
106 /* ############################################################ * | |
107 * Note: You won't need to change anything below here, I think. */ | |
108 | |
109 function TVversion() { /* print version info */ | |
110 return "TreeView v.3.3 BETA (2001-04-01) [http://www.jSh.de/treeview/]"; } | |
111 | |
112 /* read params, split key and viewKey etc. */ | |
113 function initTreeView () { if (self.TVinitd) return; | |
114 if (self.checkFrames && (""+window.innerWidth != "0")) { // not printing | |
115 tmpTopName = top.name; cutPos = UniqueID.length; | |
116 if (tmpTopName.length > cutPos) | |
117 tmpTopName = tmpTopName.substring(0, cutPos); | |
118 if ((tmpTopName == UniqueID && top.frames.length == 0) | |
119 || (tmpTopName != UniqueID)) // check we're feeling at home ... | |
120 if (confirm(navExplain)) { if (window.stop) window.stop(); | |
121 if (document.images) top.location.replace(FrameSet); | |
122 else top.location.href = FrameSet; }} | |
123 isOpera = (myIndexOf(navigator.userAgent, "Opera") > -1); | |
124 if ((navigator.appName == "Netscape") | |
125 && (navigator.appVersion.charAt(0) == "2")) // Doesn't know | |
126 CurrPageFG = "#339933\"><B><CurrPage=\"YES"; // TD with BGCOLOR | |
127 isDHTML = (document.all || document.layers); | |
128 if ((navigator.appName == "Netscape") // Mac display refresh | |
129 && (navigator.appVersion.charAt(0) == "4") // bug workaround | |
130 && (myIndexOf(navigator.userAgent, "Macintosh") > -1)) isDHTML = false; | |
131 if (document.layers && document.preamble) | |
132 TVtop = document.preamble.clip.bottom; | |
133 else if (document.all && document.all.preamble) | |
134 TVtop = document.all.preamble.offsetHeight; else TVtop = 0; | |
135 if (!self.waitText) waitText = "Rendering tree, please wait..."; | |
136 currPosY = TVtop; TVentries = new Array(); TVkeys = new Array(); | |
137 TVcount = 0; showKey = printBuffer = ""; splitPrm(); TVinitd = true; } | |
138 | |
139 /* split input to prm and viewKey */ | |
140 function splitPrm() { input = ""; if (top.key) input = ""+ top.key; | |
141 if ((input == "") || (myIndexOf(input, "<object") > -1)) input = InitialKey; | |
142 pos = myIndexOf(input, "+"); if (pos < 0) viewKey = ""; | |
143 else { viewKey = input.substring(pos+1); input = input.substring(0, pos); } | |
144 if (input == "") input = ".+."; prm = input; dontVKey = false; } | |
145 | |
146 /* set visibility if isDHTML */ | |
147 function DHTMLTreeView(currKey) { // must return true ... | |
148 if (!isDHTML) return false; // ... only if display handled. | |
149 // TVentries[count](status{0=final,1=redraw}, text, key, link, TreePfx, | |
150 // prefix, code, isCurrVisible, currTop); TVkeys[key](showSubs); | |
151 TVkeys[currKey] = newVis = (!TVkeys[currKey]); | |
152 if (self.singleBranch) for (var i = 1; i <= TVcount; i++) | |
153 if (TVkeys[TVentries[i][2]] && (myIndexOf(currKey, TVentries[i][2]) != 0)) | |
154 TVkeys[TVentries[i][2]] = TVentries[i][0] = false; | |
155 currPosY = TVtop; TVelemTop = TVelemBtm = 0; | |
156 for (var j = 1; j < viewKey.length; j++) if (!dontVKey) { | |
157 var viewSub = viewKey.substring(0, j); | |
158 for (var i = 1; i <= TVcount; i++) if (!TVkeys[viewSub]) | |
159 TVentries[i][0] &= (TVentries[i][2] != viewSub); | |
160 TVkeys[viewSub] = true; } | |
161 if (TVkeys[currKey] != newVis) dontVKey = true; | |
162 TVkeys[currKey] = newVis; | |
163 for (var i = 1; i <= TVcount; i++) { | |
164 var tmpKey = TVentries[i][2]; var isVisible = true; | |
165 for (var j = 1; j < tmpKey.length; j++) | |
166 isVisible &= TVkeys[tmpKey.substring(0, j)]; | |
167 if (self.viewMatchCnt && tmpKey != "*") isVisible | |
168 &= (tmpKey.substring(0, viewMatchCnt) | |
169 == viewKey.substring(0, viewMatchCnt)); | |
170 if (isVisible) { | |
171 TVentries[i][0] &= ((tmpKey != currKey) && (tmpKey != viewKey)); | |
172 if (TVentries[i][8] != currPosY) { TVentries[i][8] = currPosY; | |
173 if (document.layers) document.layers["TV"+i].top = currPosY; | |
174 else document.all["TV"+i].style.top = currPosY; } | |
175 if (tmpKey == showKey) TVelemTop = TVelemBtm = currPosY; | |
176 if ((tmpKey.substring(0, showKey.length) == showKey) | |
177 && (currPosY > TVelemBtm)) TVelemBtm = currPosY; | |
178 currPosY += EntryHeight; | |
179 if (!TVentries[i][0]) { treePfx = TVentries[i][4]; | |
180 prm = (TVkeys[tmpKey] ? tmpKey : tmpKey.substring(0, tmpKey.length-1)); | |
181 var retVal = wrtIdx(TVentries[i][1], tmpKey, | |
182 TVentries[i][3], TVentries[i][5], TVentries[i][6]); | |
183 if (document.all) document.all["TV"+i].innerHTML = retVal; else | |
184 with (document.layers["TV"+i].document) { clear(); write(retVal); close();
} | |
185 TVentries[i][0] = (tmpKey != viewKey); }} | |
186 if (TVentries[i][7] != isVisible) { TVentries[i][7] = isVisible; | |
187 if (document.layers) | |
188 document.layers["TV"+i].visibility = (isVisible ? "show" : "hide"); | |
189 else document.all["TV"+i].style.display = (isVisible ? "block" : "none"); | |
190 }} // scroll new entry into view | |
191 if (TVelemTop > 0) { TVelemBtm += EntryHeight; | |
192 if (document.layers) { var ScreenTop = window.pageYOffset; | |
193 var ScreenBtm = ScreenTop + window.innerHeight; } | |
194 else { var ScreenTop = document.body.scrollTop; | |
195 var ScreenBtm = ScreenTop + document.body.clientHeight; } | |
196 if ((TVelemBtm > ScreenBtm) || (TVelemTop < ScreenTop)) { | |
197 var scrollTo = ScreenTop + TVelemBtm - ScreenBtm; | |
198 if (TVelemTop < scrollTo) scrollTo = TVelemTop; | |
199 window.scrollTo(0, scrollTo); } | |
200 } return true; } | |
201 | |
202 /* expands an image */ | |
203 function img (image, hint) { return "<IMG SRC=\"" | |
204 + ImgRoot +"ix_"+ image +".gif\" ALT=\""+ hint +"\" BORDER=\"0\"" | |
205 +" WIDTH=\""+ ImgWidth +"\" HEIGHT=\""+ ImgHeight +"\">"; } | |
206 | |
207 /* expands a tree-code */ | |
208 function tree (code) { var ret = ""; | |
209 if (myIndexOf(code, "null") > -1) return ""; | |
210 for (var i = 0; i < code.length; i++) { var c = code.charAt(i); | |
211 if (c == '.') ret += img("space",""); if (c == '/') ret += img("line",""); | |
212 if (c >= '0' && c <= '9') ret += img(xImgs[c],""); if (!self.compactTree) { | |
213 if (c == 'l') ret += img("list",""); if (c == 'L') ret += img("end", ""); | |
214 if (c == '+') ret += img("listp",ClosedBookHint); | |
215 if (c == '*') ret += img("endp", ClosedBookHint); | |
216 if (c == '-') ret += img("listm",OpenBookHint); | |
217 if (c == '_') ret += img("endm", OpenBookHint); } | |
218 if (c == 'r') ret += img("open", TreeRootHint); | |
219 if (c == 'R') ret += img("link", TreeRootHint); | |
220 if (c == '#') ret += img("leaf", NormalPageHint); | |
221 if (c == 'x') ret += img("link", LinkedPageHint); | |
222 if (c == 'b') ret += img("book", ClosedBookHint); | |
223 if (c == 'o') ret += img("open", OpenBookHint); | |
224 } return ret; } | |
225 | |
226 /* removes quotes and HTML-Tags in status-text. */ | |
227 function unquote (text) { | |
228 var pos = myIndexOf(text, "\""); | |
229 while (pos > -1) { text = text.substring(0, pos) +"``"+ | |
230 text.substring(pos+1); pos = myIndexOf(text, "\""); } | |
231 var pos = myIndexOf(text, "'"); | |
232 while (pos > -1) { text = text.substring(0, pos) +"`"+ | |
233 text.substring(pos+1); pos = myIndexOf(text, "'"); } | |
234 var pos = myIndexOf(text, "<"); var pos2 = myIndexOf(text, ">"); | |
235 while ((pos > -1) && (pos2 > -1) && (pos < pos2)) { | |
236 text = text.substring(0, pos) + text.substring(pos2+1); | |
237 pos = myIndexOf(text, "<"); pos2 = myIndexOf(text, ">"); | |
238 } return text; } | |
239 | |
240 /* expands a link */ | |
241 function lnk (xHref, onOver, misc, xText) { return "<A H"+"REF=\"" | |
242 + xHref +"\" ONMOUSEOVER=\"window.status='"+ onOver +"'; return true\" " | |
243 +"ONMOUSEOUT=\"window.status=''; return true\""+ misc +">"+ xText +"<\/A>"; } | |
244 | |
245 /* writes tree code, marks active doc, adds link and text */ | |
246 function wrtEntry (tree, key, link, text) { | |
247 var split = myIndexOf(text, "|"); // split text and status | |
248 if (split < 0) { var statusText = unquote(text); var tipText = ""; } | |
249 else { var statusText = unquote(text.substring(split+1)); | |
250 var tipText = " TITLE=\""+ statusText +"\""; | |
251 text = text.substring(0, split); } | |
252 var pos = myIndexOf(text, " "); // make text non-breaking | |
253 while (pos > -1) { text = text.substring(0, pos) +" "+ | |
254 text.substring(pos+1); pos = myIndexOf(text, " "); } | |
255 var isCurr = (viewKey == key); if (link) | |
256 link = (link.charAt(0) == "|" ? link.substring(1) : DocRoot + link); | |
257 if (link && !(isCurr && (isOpera || !LinkCurrPage))) text = lnk(link, | |
258 statusText, (isCurr ? " STYLE=\"color:"+ CurrPageFG +";\"" : "") + tipText, | |
259 (isCurr ? "<FONT COLOR=\""+ CurrPageFG +"\">"+ text +"<\/FONT>" : text)); | |
260 tableBeg = "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR>"; | |
261 return tableBeg +"<TD><FONT SIZE=\"1\"> <\/TD><TD NOWRAP><NOBR>"+ tree | |
262 +"<\/NOBR><\/TD><TD><FONT SIZE=\"1\"> <\/TD><TD NOWRAP>"+ tableBeg | |
263 + (!isCurr ? "<TD NOWRAP><NOBR><FONT FACE=\""+ FontFace +"\" SIZE=\"-1\">" | |
264 : "<TD BGCOLOR=\""+ CurrPageBG +"\" NOWRAP><NOBR><FONT FACE=\""+ FontFace | |
265 +"\" SIZE=\"-1\" COLOR=\""+ CurrPageFG +"\">") +" "+ text | |
266 +" <\/FONT><\/NOBR><\/TD><\/TR><\/TABLE><\/TD><\/TR><\/TABLE>"; } | |
267 | |
268 /* performs a reload-index-instruction with the new key */ | |
269 function index (newKey, currKey, doneMouse) { window.status = waitText; | |
270 if (document.all && document.all.waitMsg && !doneMouse) { | |
271 document.all.waitMsg.style.top = document.body.scrollTop + 5; | |
272 document.all.waitMsg.style.display = "block"; | |
273 window.setTimeout("index('"+newKey+"','"+currKey+"','true');", 50); | |
274 return; } if (!self.currKey) showKey = ""; else showKey = currKey; | |
275 if ((!self.currKey && (""+ currKey == "undefined")) || !isDHTML) { | |
276 var pos = myIndexOf(newKey, "+"); | |
277 if (pos < 0) newHash = newKey +"+"+ viewKey; // missing viewKey | |
278 else { if (pos > 0) newHash = newKey; // new prm & viewKey | |
279 else { // keep prm, new viewKey | |
280 var KeyAdd = newKey.substring(1); showKey = KeyAdd; | |
281 if (myIndexOf(":"+prm+":", ":"+KeyAdd+":") > -1) newHash = prm + newKey; | |
282 else // newKey needs to be added to prm | |
283 newHash = ((prm == ".+.") ? "" : prm +":") + KeyAdd + newKey; | |
284 }} top.key = newHash; splitPrm(); currKey = ""; TVkeys[viewKey] = true; } | |
285 if (!DHTMLTreeView(currKey)) { // need to redisplay | |
286 if (isOpera) location.reload(); else | |
287 if (document.images) location.replace(location.href); | |
288 else location.href = location.href; | |
289 } else if (document.all && document.all.waitMsg) { | |
290 document.all.waitMsg.style.display = "none"; } window.status = ""; } | |
291 | |
292 /* compute the new prm for a book */ | |
293 function makePrm (currPrm, add, sub) { | |
294 if (myIndexOf(currPrm, " ") > -1) currPrm = ".+."; // catch NS2-bug | |
295 if (add != "") // put in a key | |
296 var newPrm = ((currPrm == ".+.") ? "" : currPrm +":") + add; | |
297 if (sub != "") { // take out a key _and_it's_children_ | |
298 var newPrm = ":"+currPrm+":"; var cutPos = myIndexOf(newPrm, ":"+sub); | |
299 while(cutPos > -1) { newPrm = newPrm.substring(0, cutPos) + | |
300 newPrm.substring(myIndexOf(newPrm, ":", cutPos+1)); | |
301 cutPos = myIndexOf(newPrm, ":"+sub); } if (newPrm == ":") newPrm = ":*:"; | |
302 newPrm = newPrm.substring(1, newPrm.length-1); | |
303 } if (myIndexOf(newPrm, " ") > -1) newPrm = currPrm; | |
304 return newPrm; } | |
305 | |
306 /* expands a reload-index-instruction with new prm */ | |
307 function rld (currKey, newPrm, treecode, hint) { | |
308 return lnk("#\" ONCLICK=\"index('"+ newPrm +"+"+ viewKey +"', '" | |
309 + currKey +"');return false\" TARGET=\"_self", hint, "", treecode); } | |
310 | |
311 /* generate the HTML tables */ | |
312 function wrtIdx (text, key, link, prefix, code) { var idxRet = ""; | |
313 var pos = myIndexOf(key, " "); if (pos > -1) key = key.substring(0, pos); | |
314 var subKey = (key.length > 1 ? key.substring(0, key.length-1) : ""); | |
315 currIsVisible = (myIndexOf(":"+prm+":", ":"+subKey) > -1); | |
316 if (self.viewMatchCnt && subKey != "") currIsVisible | |
317 &= (subKey.substring(0, viewMatchCnt) | |
318 == viewKey.substring(0, viewMatchCnt)); | |
319 if (currIsVisible || isDHTML) { var codePos = myIndexOf(code, "|"); | |
320 if (codePos > -1) { var prefixPos = myIndexOf(prefix, "|"); // isBook | |
321 if (myIndexOf(":"+prm+":", ":"+key) < 0) // isCollapsed | |
322 idxRet = tree(treePfx + (prefixPos < 0 ? prefix : | |
323 prefix.substring(prefixPos+1))) + rld(key, makePrm(prm, key, ""), | |
324 tree(code.substring(codePos+1)), ClosedBookStatus); | |
325 else idxRet = tree(treePfx + (prefixPos < 0 ? prefix : | |
326 prefix.substring(0, prefixPos))) + rld(key, makePrm(prm, "", key), | |
327 tree(code.substring(0, codePos)), OpenBookStatus); | |
328 } else idxRet = tree(treePfx + prefix + code); // isLeaf | |
329 return wrtEntry(idxRet, key, link, text); | |
330 } else return ""; } | |
331 | |
332 /* adds the initial TreeView entries */ | |
333 function idx (text, key, link, prefix, code, opts) { | |
334 if (!key) key = "*"; if (!text) text = ""; | |
335 if (link) link += "\" TARGET=\""+ xTarget(opts); TVcount++; | |
336 var retVal = wrtIdx(text, key, link, prefix, code); | |
337 if (document.layers) retVal = "<LAYER ID=\"TV"+ TVcount | |
338 +"\" TOP=\""+ currPosY +"\" LEFT=\"0\" VISIBILITY=\"" | |
339 + (currIsVisible ? "show" : "hide") +"\">"+ retVal +"<\/LAYER>"; | |
340 if (document.all) retVal = "<DIV ID=\"TV"+ TVcount +"\"" | |
341 +" STYLE=\"position:absolute; top:"+ currPosY +"px; left:0px; display:" | |
342 + (currIsVisible ? "block" : "none") +";\">"+ retVal +"<\/DIV>"; | |
343 if (isDHTML) { TVkeys[key] = false; TVentries[TVcount] = new Array | |
344 ((viewKey != key), text, key, link, treePfx, prefix, code, currIsVisible, | |
345 currPosY); TVkeys[key.substring(0, key.length-1)] = currIsVisible; } | |
346 wrt(retVal); if (currIsVisible) currPosY += EntryHeight; } | |
347 | |
348 /* a 'clean' version of indexOf */ | |
349 function myIndexOf(text, srch, start) { | |
350 if (!start) start = 0; var pos = (""+ text).indexOf(srch, start); | |
351 return (""+ pos != "" ? pos : -1); } | |
352 | |
353 /* write to prnBuffer */ | |
354 function wrt (text) { printBuffer += text +"\n"; } | |
355 | |
356 /* writes the printBuffer */ | |
357 function flush () { document.writeln(printBuffer); printBuffer = ""; } | |
358 | |
359 /* test for option */ | |
360 function is (opts, keyword) { return (myIndexOf(""+ opts, keyword) > -1); } | |
361 | |
362 /* get custom target */ | |
363 function xTarget (opts) { if (opts && is(opts, "target")) { | |
364 opts += ","; startPos = myIndexOf(opts, "target=") + 7; | |
365 return opts.substring(startPos, myIndexOf(opts, ",", startPos)); } | |
366 else return "main"; } | |
367 | |
368 /* get custom image */ | |
369 function xImg (opts) { return (opts ? opts.substring | |
370 (myIndexOf(opts, "img") + 3, myIndexOf(opts, "img") + 4) : ""); } | |
371 | |
372 /* functions for building the tree with */ | |
373 function initTree (text, key, link, opts) { initTreeView(); treePfx = ""; | |
374 idx(text, key, link, (is(opts, "cntd.") ? "/" : (is(opts, "img") | |
375 ? xImg(opts) : (is(opts, "link") ? "R":"r") ) ), "", opts); } | |
376 function sub_Book (text, key, link, opts) { | |
377 if (is(opts, "cntd.")) idx(text, key, link, "/|.", "|", opts); | |
378 else { idx(text, key, link, "", (is(opts, "img") ? (is(opts, "last") | |
379 ? "_"+xImg(opts)+"|*"+xImg(opts):"-"+xImg(opts)+"|+"+xImg(opts)) | |
380 : (is(opts, "last") ? "_o|*b":"-o|+b") ), opts ); | |
381 treePfx += (is(opts, "last") ? ".":"/"); }} | |
382 function lastBook (text, key, link, opts) { | |
383 sub_Book(text, key, link, "last,"+ opts); } | |
384 function end_Book () { treePfx = treePfx.substring(0, treePfx.length-1); } | |
385 function sub_Page (text, key, link, opts) { | |
386 idx(text, key, link, "", (is(opts, "cntd.") ? (is(opts, "last") | |
387 ? "..":"/.") : (is(opts, "last") ? "L":"l") + (is(opts, "img") | |
388 ? xImg(opts) : (is(opts, "link") ? "x":"#") ) ), opts); } | |
389 function lastPage (text, key, link, opts) { | |
390 sub_Page(text, key, link, "last,"+ opts); } | |
391 function end_Tree () { idx(); if (document.layers) wrt("<LAYER ID=\"bottom\"" | |
392 +" TOP=\""+ (TVtop + EntryHeight * (TVcount-1)) +"\"> <\/LAYER>"); | |
393 wrt("<INFO TEXT=\""+ TVversion() +"\">"); flush(); treePfx = ""; } | |
394 | |
395 /* close all subtrees */ | |
396 function closeAll() { if (isDHTML) { | |
397 for (var i = 1; i <= TVcount; i++) if (TVkeys[TVentries[i][2]]) { | |
398 TVkeys[TVentries[i][2]] = TVentries[i][0] = false; } index(); | |
399 if (document.layers) { ScreenTop = window.pageYOffset; scrollMax = 50 | |
400 + document.layers["TV"+TVcount].pageY - window.innerHeight; | |
401 } else { ScreenTop = document.body.scrollTop; scrollMax = 50 | |
402 + document.all["TV"+TVcount].offsetTop - document.body.clientHeight; | |
403 } if (ScreenTop > scrollMax) window.scrollTo(0, scrollMax); }} | |
404 | |
405 /* open all subtrees */ | |
406 function openAll() { if (isDHTML) { for (var i = 1; i <= TVcount; i++) | |
407 if ((myIndexOf(TVentries[i][6], "|") > -1) && (!TVkeys[TVentries[i][2]])) { | |
408 TVkeys[TVentries[i][2]] = true; TVentries[i][0] = false; } index(); }} | |
409 | |
410 // end-hide --> | |
411 </SCRIPT> | |
412 <DIV ID="waitMsg" STYLE="cursor:wait; position:absolute; left:1; height:80; widt
h:204; display:none; top:3"> | |
413 <TABLE HEIGHT="100%" WIDTH="100%"><TR><TD width="100%" height="100%">¡¡</TD></TR
></TABLE> | |
414 </DIV> | |
415 </BODY> | |
416 </HTML> | |
OLD | NEW |