-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpp-rust.html
More file actions
692 lines (692 loc) · 238 KB
/
pp-rust.html
File metadata and controls
692 lines (692 loc) · 238 KB
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
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<meta name="author" content="Martin Sulzmann" />
<title>The Rust programming language</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; }
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.at { color: #7d9029; }
code span.bn { color: #40a070; }
code span.bu { color: #008000; }
code span.cf { color: #007020; font-weight: bold; }
code span.ch { color: #4070a0; }
code span.cn { color: #880000; }
code span.co { color: #60a0b0; font-style: italic; }
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.do { color: #ba2121; font-style: italic; }
code span.dt { color: #902000; }
code span.dv { color: #40a070; }
code span.er { color: #ff0000; font-weight: bold; }
code span.ex { }
code span.fl { color: #40a070; }
code span.fu { color: #06287e; }
code span.im { color: #008000; font-weight: bold; }
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.kw { color: #007020; font-weight: bold; }
code span.op { color: #666666; }
code span.ot { color: #007020; }
code span.pp { color: #bc7a00; }
code span.sc { color: #4070a0; }
code span.ss { color: #bb6688; }
code span.st { color: #4070a0; }
code span.va { color: #19177c; }
code span.vs { color: #4070a0; }
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; }
</style>
<link href="data:text/css; charset=utf-8;charset=utf-8,%0Abody%0A%7B%0Amargin%3A%200%200%200%200%3B%0Apadding%3A%200%200%200%200%3B%0Awidth%3A%20100%25%3B%0Aheight%3A%20100%25%3B%0Acolor%3A%20black%3B%0Abackground%2Dcolor%3A%20white%3B%0Afont%2Dfamily%3A%20%22Gill%20Sans%20MT%22%2C%20%22Gill%20Sans%22%2C%20GillSans%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014pt%3B%0A%7D%0Adiv%2Etoolbar%20%7B%0Aposition%3A%20fixed%3B%20z%2Dindex%3A%20200%3B%0Atop%3A%20auto%3B%20bottom%3A%200%3B%20left%3A%200%3B%20right%3A%200%3B%0Aheight%3A%201%2E2em%3B%20text%2Dalign%3A%20right%3B%0Apadding%2Dleft%3A%201em%3B%0Apadding%2Dright%3A%201em%3B%20font%2Dsize%3A%2060%25%3B%0Acolor%3A%20red%3B%0Abackground%2Dcolor%3A%20rgb%28240%2C240%2C240%29%3B%0Aborder%2Dtop%3A%20solid%201px%20rgb%28180%2C180%2C180%29%3B%0A%7D%0Adiv%2Etoolbar%20span%2Ecopyright%20%7B%0Acolor%3A%20black%3B%0Amargin%2Dleft%3A%200%2E5em%3B%0A%7D%0Adiv%2Einitial%5Fprompt%20%7B%0Aposition%3A%20absolute%3B%0Az%2Dindex%3A%201000%3B%0Abottom%3A%201%2E2em%3B%0Awidth%3A%20100%25%3B%0Abackground%2Dcolor%3A%20rgb%28200%2C200%2C200%29%3B%0Aopacity%3A%200%2E35%3B%0Abackground%2Dcolor%3A%20rgba%28200%2C200%2C200%2C%200%2E35%29%3B%0Acursor%3A%20pointer%3B%0A%7D%0Adiv%2Einitial%5Fprompt%20p%2Ehelp%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Adiv%2Einitial%5Fprompt%20p%2Eclose%20%7B%0Atext%2Dalign%3A%20right%3B%0Afont%2Dstyle%3A%20italic%3B%0A%7D%0Adiv%2Eslidy%5Ftoc%20%7B%0Aposition%3A%20absolute%3B%0Az%2Dindex%3A%20300%3B%0Awidth%3A%2060%25%3B%0Amax%2Dwidth%3A%2030em%3B%0Aheight%3A%2030em%3B%0Aoverflow%3A%20auto%3B%0Atop%3A%20auto%3B%0Aright%3A%20auto%3B%0Aleft%3A%204em%3B%0Abottom%3A%204em%3B%0Apadding%3A%201em%3B%0Abackground%3A%20rgb%28240%2C240%2C240%29%3B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%2Dwidth%3A%202px%3B%0Afont%2Dsize%3A%2060%25%3B%0A%7D%0Adiv%2Eslidy%5Ftoc%20%2Etoc%5Fheading%20%7B%0Atext%2Dalign%3A%20center%3B%0Awidth%3A%20100%25%3B%0Amargin%3A%200%3B%0Amargin%2Dbottom%3A%201em%3B%0Aborder%2Dbottom%2Dstyle%3A%20solid%3B%0Aborder%2Dbottom%2Dcolor%3A%20rgb%28180%2C180%2C180%29%3B%0Aborder%2Dbottom%2Dwidth%3A%201px%3B%0A%7D%0Adiv%2Eslide%20%7B%0Az%2Dindex%3A%2020%3B%0Amargin%3A%200%200%200%200%3B%0Apadding%2Dtop%3A%200%3B%0Apadding%2Dbottom%3A%200%3B%0Apadding%2Dleft%3A%2020px%3B%0Apadding%2Dright%3A%2020px%3B%0Aborder%2Dwidth%3A%200%3B%0Aclear%3A%20both%3B%0Atop%3A%200%3B%0Abottom%3A%200%3B%0Aleft%3A%200%3B%0Aright%3A%200%3B%0Aline%2Dheight%3A%20120%25%3B%0Abackground%2Dcolor%3A%20transparent%3B%0A%7D%0Adiv%2Ebackground%20%7B%0Adisplay%3A%20none%3B%0A%7D%0Adiv%2Ehandout%20%7B%0Amargin%2Dleft%3A%2020px%3B%0Amargin%2Dright%3A%2020px%3B%0A%7D%0Adiv%2Eslide%2Etitlepage%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Adiv%2Eslide%2Etitlepage%20h1%20%7B%0Apadding%2Dtop%3A%2010%25%3B%0Amargin%2Dright%3A%200%3B%0A%7D%0Adiv%2Eslide%20h1%20%7B%0Apadding%2Dleft%3A%200%3B%0Apadding%2Dright%3A%2020pt%3B%0Apadding%2Dtop%3A%204pt%3B%0Apadding%2Dbottom%3A%204pt%3B%0Amargin%2Dtop%3A%200%3B%0Amargin%2Dleft%3A%200%3B%0Amargin%2Dright%3A%2060pt%3B%0Amargin%2Dbottom%3A%200%2E5em%3B%0Adisplay%3A%20block%3B%20font%2Dsize%3A%20160%25%3B%0Aline%2Dheight%3A%201%2E2em%3B%0Abackground%3A%20transparent%3B%0A%7D%0A%40media%20screen%20and%20%28max%2Ddevice%2Dwidth%3A%201024px%29%0A%7B%0Adiv%2Eslide%20%7B%20font%2Dsize%3A%20100%25%3B%20%7D%0A%7D%0A%40media%20screen%20and%20%28max%2Ddevice%2Dwidth%3A%20800px%29%0A%7B%0Adiv%2Eslide%20%7B%20font%2Dsize%3A%20200%25%3B%20%7D%0Adiv%2Eslidy%5Ftoc%20%7B%0Atop%3A%201em%3B%0Aleft%3A%201em%3B%0Aright%3A%20auto%3B%0Awidth%3A%2080%25%3B%0Afont%2Dsize%3A%20180%25%3B%0A%7D%0A%7D%0Adiv%2Etoc%2Dheading%20%7B%0Awidth%3A%20100%25%3B%0Aborder%2Dbottom%3A%20solid%201px%20rgb%28180%2C180%2C180%29%3B%0Amargin%2Dbottom%3A%201em%3B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Aimage%2Drendering%3A%20optimize%2Dquality%3B%0A%7D%0Apre%20%7B%0Afont%2Dsize%3A%2080%25%3B%0Afont%2Dweight%3A%20bold%3B%0Aline%2Dheight%3A%20120%25%3B%0Apadding%2Dtop%3A%200%2E2em%3B%0Apadding%2Dbottom%3A%200%2E2em%3B%0Apadding%2Dleft%3A%201em%3B%0Apadding%2Dright%3A%201em%3B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%2Dleft%2Dwidth%3A%201em%3B%0Aborder%2Dtop%2Dwidth%3A%20thin%3B%0Aborder%2Dright%2Dwidth%3A%20thin%3B%0Aborder%2Dbottom%2Dwidth%3A%20thin%3B%0Aborder%2Dcolor%3A%20%2395ABD0%3B%0Acolor%3A%20%2300428C%3B%0Abackground%2Dcolor%3A%20%23E4E5E7%3B%0A%7D%0Ali%20pre%20%7B%20margin%2Dleft%3A%200%3B%20%7D%0Ablockquote%20%7B%20font%2Dstyle%3A%20italic%20%7D%0Aimg%20%7B%20background%2Dcolor%3A%20transparent%20%7D%0Ap%2Ecopyright%20%7B%20font%2Dsize%3A%20smaller%20%7D%0A%2Ecenter%20%7B%20text%2Dalign%3A%20center%20%7D%0A%2Efootnote%20%7B%20font%2Dsize%3A%20smaller%3B%20margin%2Dleft%3A%202em%3B%20%7D%0Aa%20img%20%7B%20border%2Dwidth%3A%200%3B%20border%2Dstyle%3A%20none%20%7D%0Aa%3Avisited%20%7B%20color%3A%20navy%20%7D%0Aa%3Alink%20%7B%20color%3A%20navy%20%7D%0Aa%3Ahover%20%7B%20color%3A%20red%3B%20text%2Ddecoration%3A%20underline%20%7D%0Aa%3Aactive%20%7B%20color%3A%20red%3B%20text%2Ddecoration%3A%20underline%20%7D%0Aa%20%7Btext%2Ddecoration%3A%20none%7D%0A%2Etoolbar%20a%3Alink%20%7Bcolor%3A%20blue%7D%0A%2Etoolbar%20a%3Avisited%20%7Bcolor%3A%20blue%7D%0A%2Etoolbar%20a%3Aactive%20%7Bcolor%3A%20red%7D%0A%2Etoolbar%20a%3Ahover%20%7Bcolor%3A%20red%7D%0Aul%20%7B%20list%2Dstyle%2Dtype%3A%20square%3B%20%7D%0Aul%20ul%20%7B%20list%2Dstyle%2Dtype%3A%20disc%3B%20%7D%0Aul%20ul%20ul%20%7B%20list%2Dstyle%2Dtype%3A%20circle%3B%20%7D%0Aul%20ul%20ul%20ul%20%7B%20list%2Dstyle%2Dtype%3A%20disc%3B%20%7D%0Ali%20%7B%20margin%2Dleft%3A%200%2E5em%3B%20margin%2Dtop%3A%200%2E5em%3B%20%7D%0Ali%20li%20%7B%20font%2Dsize%3A%2085%25%3B%20font%2Dstyle%3A%20italic%20%7D%0Ali%20li%20li%20%7B%20font%2Dsize%3A%2085%25%3B%20font%2Dstyle%3A%20normal%20%7D%0Adiv%20dt%0A%7B%0Amargin%2Dleft%3A%200%3B%0Amargin%2Dtop%3A%201em%3B%0Amargin%2Dbottom%3A%200%2E5em%3B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Adiv%20dd%0A%7B%0Amargin%2Dleft%3A%202em%3B%0Amargin%2Dbottom%3A%200%2E5em%3B%0A%7D%0Ap%2Cpre%2Cul%2Col%2Cblockquote%2Ch2%2Ch3%2Ch4%2Ch5%2Ch6%2Cdl%2Ctable%20%7B%0Amargin%2Dleft%3A%201em%3B%0Amargin%2Dright%3A%201em%3B%0A%7D%0Ap%2Esubhead%20%7B%20font%2Dweight%3A%20bold%3B%20margin%2Dtop%3A%202em%3B%20%7D%0A%2Esmaller%20%7B%20font%2Dsize%3A%20smaller%20%7D%0A%2Ebigger%20%7B%20font%2Dsize%3A%20130%25%20%7D%0Atd%2Cth%20%7B%20padding%3A%200%2E2em%20%7D%0Aul%20%7B%0Amargin%3A%200%2E5em%201%2E5em%200%2E5em%201%2E5em%3B%0Apadding%3A%200%3B%0A%7D%0Aol%20%7B%0Amargin%3A%200%2E5em%201%2E5em%200%2E5em%201%2E5em%3B%0Apadding%3A%200%3B%0A%7D%0Aul%20%7B%20list%2Dstyle%2Dtype%3A%20square%3B%20%7D%0Aul%20ul%20%7B%20list%2Dstyle%2Dtype%3A%20disc%3B%20%7D%0Aul%20ul%20ul%20%7B%20list%2Dstyle%2Dtype%3A%20circle%3B%20%7D%0Aul%20ul%20ul%20ul%20%7B%20list%2Dstyle%2Dtype%3A%20disc%3B%20%7D%0Aul%20li%20%7B%20list%2Dstyle%3A%20square%3B%0Amargin%3A%200%2E1em%200em%200%2E6em%200%3B%0Apadding%3A%200%200%200%200%3B%0Aline%2Dheight%3A%20140%25%3B%0A%7D%0Aol%20li%20%7B%20margin%3A%200%2E1em%200em%200%2E6em%201%2E5em%3B%0Apadding%3A%200%200%200%200px%3B%0Aline%2Dheight%3A%20140%25%3B%0Alist%2Dstyle%2Dtype%3A%20decimal%3B%0A%7D%0Ali%20ul%20li%20%7B%20font%2Dsize%3A%2085%25%3B%20font%2Dstyle%3A%20italic%3B%0Alist%2Dstyle%2Dtype%3A%20disc%3B%0Abackground%3A%20transparent%3B%0Apadding%3A%200%200%200%200%3B%0A%7D%0Ali%20li%20ul%20li%20%7B%20font%2Dsize%3A%2085%25%3B%20font%2Dstyle%3A%20normal%3B%0Alist%2Dstyle%2Dtype%3A%20circle%3B%0Abackground%3A%20transparent%3B%0Apadding%3A%200%200%200%200%3B%0A%7D%0Ali%20li%20li%20ul%20li%20%7B%0Alist%2Dstyle%2Dtype%3A%20disc%3B%0Abackground%3A%20transparent%3B%0Apadding%3A%200%200%200%200%3B%0A%7D%0Ali%20ol%20li%20%7B%0Alist%2Dstyle%2Dtype%3A%20decimal%3B%0A%7D%0Ali%20li%20ol%20li%20%7B%0Alist%2Dstyle%2Dtype%3A%20decimal%3B%0A%7D%0A%0Aol%2Eoutline%20li%3Ahover%20%7B%20cursor%3A%20pointer%20%7D%0Aol%2Eoutline%20li%2Enofold%3Ahover%20%7B%20cursor%3A%20default%20%7D%0Aul%2Eoutline%20li%3Ahover%20%7B%20cursor%3A%20pointer%20%7D%0Aul%2Eoutline%20li%2Enofold%3Ahover%20%7B%20cursor%3A%20default%20%7D%0Aol%2Eoutline%20%7B%20list%2Dstyle%3Adecimal%3B%20%7D%0Aol%2Eoutline%20ol%20%7B%20list%2Dstyle%2Dtype%3Alower%2Dalpha%20%7D%0Aol%2Eoutline%20li%2Enofold%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAIACAMzMzOvr%2FywAAAAACQAJAAACD4SPoRvG614Dctb4MEMcFAA7%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aol%2Eoutline%20li%2Eunfolded%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAMPD%2F8zMzOvr%2F%2F%2F%2F%2FywAAAAACQAJAAACEYyPoivG614LAlg7ZZbxoR8UADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aol%2Eoutline%20li%2Efolded%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAMPD%2F8zMzOvr%2F%2F%2F%2F%2FywAAAAACQAJAAACFIyPoiu2sJyCyoF7W3hxz850CFIAADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aol%2Eoutline%20li%2Eunfolded%3Ahover%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAAAAAAAA%2F8PD%2F%2F%2F%2F%2FywAAAAACQAJAAACEYSPoivG614DIlg7ZZbxoQ8UADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aol%2Eoutline%20li%2Efolded%3Ahover%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAAAAAAAA%2F8PD%2F%2F%2F%2F%2FywAAAAACQAJAAACFISPoiu2sZyCyoV7G3hxz850CFIAADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aul%2Eoutline%20li%2Enofold%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAIACAMzMzOvr%2FywAAAAACQAJAAACD4SPoRvG614Dctb4MEMcFAA7%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aul%2Eoutline%20li%2Eunfolded%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAMPD%2F8zMzOvr%2F%2F%2F%2F%2FywAAAAACQAJAAACEYyPoivG614LAlg7ZZbxoR8UADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aul%2Eoutline%20li%2Efolded%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAMPD%2F8zMzOvr%2F%2F%2F%2F%2FywAAAAACQAJAAACFIyPoiu2sJyCyoF7W3hxz850CFIAADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aul%2Eoutline%20li%2Eunfolded%3Ahover%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAAAAAAAA%2F8PD%2F%2F%2F%2F%2FywAAAAACQAJAAACEYSPoivG614DIlg7ZZbxoQ8UADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0Aul%2Eoutline%20li%2Efolded%3Ahover%20%7B%0Apadding%3A%200%200%200%2020px%3B%0Abackground%3A%20transparent%20url%28data%3Aimage%2Fgif%3B%20qs%3D0%2E5%3Bbase64%2CR0lGODdhCQAJAKEDAAAAAAAA%2F8PD%2F%2F%2F%2F%2FywAAAAACQAJAAACFISPoiu2sZyCyoV7G3hxz850CFIAADs%3D%29%20no%2Drepeat%200px%200%2E5em%3B%0A%7D%0A%0Aa%2Etitleslide%20%7B%20font%2Dweight%3A%20bold%3B%20font%2Dstyle%3A%20italic%20%7D%0A%0Aimg%2Ehidden%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%20%7D%0Adiv%2Einitial%5Fprompt%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%20%7D%0Adiv%2Eslide%20%7B%0Avisibility%3A%20visible%3B%0Aposition%3A%20inherit%3B%0A%7D%0Adiv%2Ehandout%20%7B%0Aborder%2Dtop%2Dstyle%3A%20solid%3B%0Aborder%2Dtop%2Dwidth%3A%20thin%3B%0Aborder%2Dtop%2Dcolor%3A%20black%3B%0A%7D%0A%40media%20screen%20%7B%0A%2Ehidden%20%7B%20display%3A%20none%3B%20visibility%3A%20visible%20%7D%0Adiv%2Eslide%2Ehidden%20%7B%20display%3A%20block%3B%20visibility%3A%20visible%20%7D%0Adiv%2Ehandout%2Ehidden%20%7B%20display%3A%20block%3B%20visibility%3A%20visible%20%7D%0Adiv%2Ebackground%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%20%7D%0Abody%2Esingle%5Fslide%20div%2Einitial%5Fprompt%20%7B%20display%3A%20block%3B%20visibility%3A%20visible%20%7D%0Abody%2Esingle%5Fslide%20div%2Ebackground%20%7B%20display%3A%20block%3B%20visibility%3A%20visible%20%7D%0Abody%2Esingle%5Fslide%20div%2Ebackground%2Ehidden%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%20%7D%0Abody%2Esingle%5Fslide%20%2Einvisible%20%7B%20visibility%3A%20hidden%20%7D%0Abody%2Esingle%5Fslide%20%2Ehidden%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%20%7D%0Abody%2Esingle%5Fslide%20div%2Eslide%20%7B%20position%3A%20absolute%20%7D%0Abody%2Esingle%5Fslide%20div%2Ehandout%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%20%7D%0A%7D%0A%40media%20print%20%7B%0A%2Ehidden%20%7B%20display%3A%20block%3B%20visibility%3A%20visible%20%7D%0Adiv%2Eslide%20pre%20%7B%20font%2Dsize%3A%2060%25%3B%20padding%2Dleft%3A%200%2E5em%3B%20%7D%0Adiv%2Etoolbar%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%3B%20%7D%0Adiv%2Eslidy%5Ftoc%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%3B%20%7D%0Adiv%2Ebackground%20%7B%20display%3A%20none%3B%20visibility%3A%20hidden%3B%20%7D%0Adiv%2Eslide%20%7B%20page%2Dbreak%2Dbefore%3A%20always%20%7D%0A%0Adiv%2Eslide%2Efirst%2Dslide%20%7B%20page%2Dbreak%2Dbefore%3A%20avoid%20%7D%0A%7D%0A" rel="stylesheet" type="text/css" media="screen, projection, print" />
<script src="data:text/javascript; charset=utf-8;charset=utf-8,%2F%2A%20slidy%2Ejs%0A%0A%20%20%20Copyright%20%28c%29%202005%2D2013%20W3C%20%28MIT%2C%20ERCIM%2C%20Keio%29%2C%20All%20Rights%20Reserved%2E%0A%20%20%20W3C%20liability%2C%20trademark%2C%20document%20use%20and%20software%20licensing%0A%20%20%20rules%20apply%2C%20see%3A%0A%0A%20%20%20http%3A%2F%2Fwww%2Ew3%2Eorg%2FConsortium%2FLegal%2Fcopyright%2Ddocuments%0A%20%20%20http%3A%2F%2Fwww%2Ew3%2Eorg%2FConsortium%2FLegal%2Fcopyright%2Dsoftware%0A%0A%20%20%20Defines%20single%20name%20%22w3c%5Fslidy%22%20in%20global%20namespace%0A%20%20%20Adds%20event%20handlers%20without%20trampling%20on%20any%20others%0A%2A%2F%0A%0A%2F%2F%20the%20slidy%20object%20implementation%0Avar%20w3c%5Fslidy%20%3D%20%7B%0A%20%20%2F%2F%20classify%20which%20kind%20of%20browser%20we%27re%20running%20under%0A%20%20ns%5Fpos%3A%20%28typeof%20window%2EpageYOffset%21%3D%27undefined%27%29%2C%0A%20%20khtml%3A%20%28%28navigator%2EuserAgent%29%2EindexOf%28%22KHTML%22%29%20%3E%3D%200%20%3F%20true%20%3A%20false%29%2C%0A%20%20opera%3A%20%28%28navigator%2EuserAgent%29%2EindexOf%28%22Opera%22%29%20%3E%3D%200%20%3F%20true%20%3A%20false%29%2C%0A%20%20ipad%3A%20%28%28navigator%2EuserAgent%29%2EindexOf%28%22iPad%22%29%20%3E%3D%200%20%3F%20true%20%3A%20false%29%2C%0A%20%20iphone%3A%20%28%28navigator%2EuserAgent%29%2EindexOf%28%22iPhone%22%29%20%3E%3D%200%20%3F%20true%20%3A%20false%29%2C%0A%20%20android%3A%20%28%28navigator%2EuserAgent%29%2EindexOf%28%22Android%22%29%20%3E%3D%200%20%3F%20true%20%3A%20false%29%2C%0A%20%20ie%3A%20%28typeof%20document%2Eall%20%21%3D%20%22undefined%22%20%26%26%20%21this%2Eopera%29%2C%0A%20%20ie6%3A%20%28%21this%2Ens%5Fpos%20%26%26%20navigator%2EuserAgent%2EindexOf%28%22MSIE%206%22%29%20%21%3D%20%2D1%29%2C%0A%20%20ie7%3A%20%28%21this%2Ens%5Fpos%20%26%26%20navigator%2EuserAgent%2EindexOf%28%22MSIE%207%22%29%20%21%3D%20%2D1%29%2C%0A%20%20ie8%3A%20%28%21this%2Ens%5Fpos%20%26%26%20navigator%2EuserAgent%2EindexOf%28%22MSIE%208%22%29%20%21%3D%20%2D1%29%2C%0A%20%20ie9%3A%20%28%21this%2Ens%5Fpos%20%26%26%20navigator%2EuserAgent%2EindexOf%28%22MSIE%209%22%29%20%21%3D%20%2D1%29%2C%0A%0A%20%20%2F%2F%20data%20for%20swipe%20and%20double%20tap%20detection%20on%20touch%20screens%0A%20%20last%5Ftap%3A%200%2C%0A%20%20prev%5Ftap%3A%200%2C%0A%20%20start%5Fx%3A%200%2C%0A%20%20start%5Fy%3A%200%2C%0A%20%20delta%5Fx%3A%200%2C%0A%20%20delta%5Fy%3A%200%2C%0A%0A%20%20%2F%2F%20are%20we%20running%20as%20XHTML%3F%20%28doesn%27t%20work%20on%20Opera%29%0A%20%20is%5Fxhtml%3A%20%2Fxml%2F%2Etest%28document%2EcontentType%29%2C%0A%0A%20%20slide%5Fnumber%3A%200%2C%20%2F%2F%20integer%20slide%20count%3A%200%2C%201%2C%202%2C%20%2E%2E%2E%0A%20%20slide%5Fnumber%5Felement%3A%20null%2C%20%2F%2F%20element%20containing%20slide%20number%0A%20%20slides%3A%20%5B%5D%2C%20%2F%2F%20set%20to%20array%20of%20slide%20div%27s%0A%20%20notes%3A%20%5B%5D%2C%20%2F%2F%20set%20to%20array%20of%20handout%20div%27s%0A%20%20backgrounds%3A%20%5B%5D%2C%20%2F%2F%20set%20to%20array%20of%20background%20div%27s%0A%20%20observers%3A%20%5B%5D%2C%20%2F%2F%20list%20of%20observer%20functions%0A%20%20toolbar%3A%20null%2C%20%2F%2F%20element%20containing%20toolbar%0A%20%20title%3A%20null%2C%20%2F%2F%20document%20title%0A%20%20last%5Fshown%3A%20null%2C%20%2F%2F%20last%20incrementally%20shown%20item%0A%20%20eos%3A%20null%2C%20%20%2F%2F%20span%20element%20for%20end%20of%20slide%20indicator%0A%20%20toc%3A%20null%2C%20%2F%2F%20table%20of%20contents%0A%20%20outline%3A%20null%2C%20%2F%2F%20outline%20element%20with%20the%20focus%0A%20%20selected%5Ftext%5Flen%3A%200%2C%20%2F%2F%20length%20of%20drag%20selection%20on%20document%0A%20%20view%5Fall%3A%200%2C%20%20%2F%2F%201%20to%20view%20all%20slides%20%2B%20handouts%0A%20%20want%5Ftoolbar%3A%20true%2C%20%20%2F%2F%20user%20preference%20to%20show%2Fhide%20toolbar%0A%20%20mouse%5Fclick%5Fenabled%3A%20true%2C%20%2F%2F%20enables%20left%20click%20for%20next%20slide%0A%20%20scroll%5Fhack%3A%200%2C%20%2F%2F%20IE%20work%20around%20for%20position%3A%20fixed%0A%20%20disable%5Fslide%5Fclick%3A%20false%2C%20%20%2F%2F%20used%20by%20clicked%20anchors%0A%0A%20%20lang%3A%20%22en%22%2C%20%2F%2F%20updated%20to%20language%20specified%20by%20html%20file%0A%0A%20%20help%5Fanchor%3A%20null%2C%20%2F%2F%20used%20for%20keyboard%20focus%20hack%20in%20showToolbar%28%29%0A%20%20help%5Fpage%3A%20%22http%3A%2F%2Fwww%2Ew3%2Eorg%2FTalks%2FTools%2FSlidy2%2Fhelp%2Fhelp%2Ehtml%22%2C%0A%20%20help%5Ftext%3A%20%22Navigate%20with%20mouse%20click%2C%20space%20bar%2C%20Cursor%20Left%2FRight%2C%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22or%20Pg%20Up%20and%20Pg%20Dn%2E%20Use%20S%20and%20B%20to%20change%20font%20size%2E%22%2C%0A%0A%20%20size%5Findex%3A%200%2C%0A%20%20size%5Fadjustment%3A%200%2C%0A%20%20sizes%3A%20%20new%20Array%28%2210pt%22%2C%20%2212pt%22%2C%20%2214pt%22%2C%20%2216pt%22%2C%20%2218pt%22%2C%20%2220pt%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2222pt%22%2C%20%2224pt%22%2C%20%2226pt%22%2C%20%2228pt%22%2C%20%2230pt%22%2C%20%2232pt%22%29%2C%0A%0A%20%20%2F%2F%20needed%20for%20efficient%20resizing%0A%20%20last%5Fwidth%3A%200%2C%0A%20%20last%5Fheight%3A%200%2C%0A%0A%0A%20%20%2F%2F%20Needed%20for%20cross%20browser%20support%20for%20relative%20width%2Fheight%20on%0A%20%20%2F%2F%20object%20elements%2E%20The%20work%20around%20is%20to%20save%20width%2Fheight%20attributes%0A%20%20%2F%2F%20and%20then%20to%20recompute%20absolute%20width%2Fheight%20dimensions%20on%20resizing%0A%20%20%20objects%3A%20%5B%5D%2C%0A%0A%20%20%2F%2F%20attach%20initialiation%20event%20handlers%0A%20%20set%5Fup%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20init%20%3D%20function%28%29%20%7B%20w3c%5Fslidy%2Einit%28%29%3B%20%7D%3B%0A%20%20%20%20if%20%28typeof%20window%2EaddEventListener%20%21%3D%20%22undefined%22%29%0A%20%20%20%20%20%20window%2EaddEventListener%28%22load%22%2C%20init%2C%20false%29%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20window%2EattachEvent%28%22onload%22%2C%20init%29%3B%0A%20%20%7D%2C%0A%0A%20%20hide%5Fslides%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28document%2Ebody%20%26%26%20%21w3c%5Fslidy%2Einitialized%29%0A%20%20%20%20%20%20document%2Ebody%2Estyle%2Evisibility%20%3D%20%22hidden%22%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20setTimeout%28w3c%5Fslidy%2Ehide%5Fslides%2C%2050%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20hack%20to%20persuade%20IE%20to%20compute%20correct%20document%20height%0A%20%20%2F%2F%20as%20needed%20for%20simulating%20fixed%20positioning%20of%20toolbar%0A%20%20ie%5Fhack%3A%20function%20%28%29%20%7B%0A%20%20%20%20window%2EresizeBy%280%2C%2D1%29%3B%0A%20%20%20%20window%2EresizeBy%280%2C%201%29%3B%0A%20%20%7D%2C%0A%0A%20%20init%3A%20function%20%28%29%20%7B%0A%20%20%20%20%2F%2Falert%28%22slidy%20starting%20test%2010%22%29%3B%0A%20%20%20%20document%2Ebody%2Estyle%2Evisibility%20%3D%20%22visible%22%3B%0A%20%20%20%20this%2Einit%5Flocalization%28%29%3B%0A%20%20%20%20this%2Eadd%5Ftoolbar%28%29%3B%0A%20%20%20%20this%2Ewrap%5Fimplicit%5Fslides%28%29%3B%0A%20%20%20%20this%2Ecollect%5Fslides%28%29%3B%0A%20%20%20%20this%2Ecollect%5Fnotes%28%29%3B%0A%20%20%20%20this%2Ecollect%5Fbackgrounds%28%29%3B%0A%20%20%20%20this%2Eobjects%20%3D%20document%2Ebody%2EgetElementsByTagName%28%22object%22%29%3B%0A%20%20%20%20this%2Epatch%5Fanchors%28%29%3B%0A%20%20%20%20this%2Eslide%5Fnumber%20%3D%20this%2Efind%5Fslide%5Fnumber%28location%2Ehref%29%3B%0A%20%20%20%20window%2Eoffscreenbuffering%20%3D%20true%3B%0A%20%20%20%20this%2Esize%5Fadjustment%20%3D%20this%2Efind%5Fsize%5Fadjust%28%29%3B%0A%20%20%20%20this%2Etime%5Fleft%20%3D%20this%2Efind%5Fduration%28%29%3B%0A%20%20%20%20this%2Ehide%5Fimage%5Ftoolbar%28%29%3B%20%20%2F%2F%20suppress%20IE%20image%20toolbar%20popup%0A%20%20%20%20this%2Einit%5Foutliner%28%29%3B%20%20%2F%2F%20activate%20fold%2Funfold%20support%0A%20%20%20%20this%2Etitle%20%3D%20document%2Etitle%3B%0A%20%20%20%20this%2Ekeyboardless%20%3D%20%28this%2Eipad%7C%7Cthis%2Eiphone%7C%7Cthis%2Eandroid%29%3B%0A%0A%20%20%20%20if%20%28this%2Ekeyboardless%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Eremove%5Fclass%28w3c%5Fslidy%2Etoolbar%2C%20%22hidden%22%29%0A%20%20%20%20%20%20this%2Ewant%5Ftoolbar%20%3D%200%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20work%20around%20for%20opera%20bug%0A%20%20%20%20this%2Eis%5Fxhtml%20%3D%20%28document%2Ebody%2EtagName%20%3D%3D%20%22BODY%22%20%3F%20false%20%3A%20true%29%3B%0A%0A%20%20%20%20if%20%28this%2Eslides%2Elength%20%3E%200%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20slide%20%3D%20this%2Eslides%5Bthis%2Eslide%5Fnumber%5D%3B%0A%20%20%20%0A%20%20%20%20%20%20if%20%28this%2Eslide%5Fnumber%20%3E%200%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20this%2Eset%5Fvisibility%5Fall%5Fincremental%28%22visible%22%29%3B%0A%20%20%20%20%20%20%20%20this%2Elast%5Fshown%20%3D%20this%2Eprevious%5Fincremental%5Fitem%28null%29%3B%0A%20%20%20%20%20%20%20%20this%2Eset%5Feos%5Fstatus%28true%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20this%2Elast%5Fshown%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20this%2Eset%5Fvisibility%5Fall%5Fincremental%28%22hidden%22%29%3B%0A%20%20%20%20%20%20%20%20this%2Eset%5Feos%5Fstatus%28%21this%2Enext%5Fincremental%5Fitem%28this%2Elast%5Fshown%29%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this%2Eset%5Flocation%28%29%3B%0A%20%20%20%20%20%20this%2Eadd%5Fclass%28this%2Eslides%5B0%5D%2C%20%22first%2Dslide%22%29%3B%0A%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20this%2Etoc%20%3D%20this%2Etable%5Fof%5Fcontents%28%29%3B%0A%0A%20%20%20%20this%2Eadd%5Finitial%5Fprompt%28%29%3B%0A%0A%20%20%20%20%2F%2F%20bind%20event%20handlers%20without%20interfering%20with%20custom%20page%20scripts%0A%20%20%20%20%2F%2F%20Tap%20events%20behave%20too%20weirdly%20to%20support%20clicks%20reliably%20on%0A%20%20%20%20%2F%2F%20iPhone%20and%20iPad%2C%20so%20exclude%20these%20from%20click%20handler%0A%0A%20%20%20%20if%20%28%21this%2Ekeyboardless%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Eadd%5Flistener%28document%2Ebody%2C%20%22click%22%2C%20this%2Emouse%5Fbutton%5Fclick%29%3B%0A%20%20%20%20%20%20this%2Eadd%5Flistener%28document%2Ebody%2C%20%22mousedown%22%2C%20this%2Emouse%5Fbutton%5Fdown%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20this%2Eadd%5Flistener%28document%2C%20%22keydown%22%2C%20this%2Ekey%5Fdown%29%3B%0A%20%20%20%20this%2Eadd%5Flistener%28document%2C%20%22keypress%22%2C%20this%2Ekey%5Fpress%29%3B%0A%20%20%20%20this%2Eadd%5Flistener%28window%2C%20%22resize%22%2C%20this%2Eresized%29%3B%0A%20%20%20%20this%2Eadd%5Flistener%28window%2C%20%22scroll%22%2C%20this%2Escrolled%29%3B%0A%20%20%20%20this%2Eadd%5Flistener%28window%2C%20%22unload%22%2C%20this%2Eunloaded%29%3B%0A%0A%20%20%20%20this%2Eadd%5Flistener%28document%2C%20%22gesturechange%22%2C%20function%20%28%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%29%3B%0A%0A%20%20%20%20this%2Eattach%5Ftouch%5Fhanders%28this%2Eslides%29%3B%0A%0A%20%20%20%20%2F%2F%20this%20seems%20to%20be%20a%20debugging%20hack%0A%20%20%20%20%2F%2Fif%20%28%21document%2Ebody%2Eonclick%29%0A%20%20%20%20%2F%2F%20%20document%2Ebody%2Eonclick%20%3D%20function%20%28%29%20%7B%20%7D%3B%0A%0A%20%20%20%20this%2Esingle%5Fslide%5Fview%28%29%3B%0A%0A%20%20%20%20%2F%2Fthis%2Eset%5Flocation%28%29%3B%0A%0A%20%20%20%20this%2Eresized%28%29%3B%0A%0A%20%20%20%20if%20%28this%2Eie7%29%0A%20%20%20%20%20%20setTimeout%28w3c%5Fslidy%2Eie%5Fhack%2C%20100%29%3B%0A%0A%20%20%20%20this%2Eshow%5Ftoolbar%28%29%3B%0A%0A%20%20%20%20%2F%2F%20for%20back%20button%20detection%0A%20%20%20%20setInterval%28function%20%28%29%20%7B%20w3c%5Fslidy%2Echeck%5Flocation%28%29%3B%20%7D%2C%20200%29%3B%0A%20%20%20%20w3c%5Fslidy%2Einitialized%20%3D%20true%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20create%20div%20element%20with%20links%20to%20each%20slide%0A%20%20table%5Fof%5Fcontents%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20toc%20%3D%20this%2Ecreate%5Felement%28%22div%22%29%3B%0A%20%20%20%20this%2Eadd%5Fclass%28toc%2C%20%22slidy%5Ftoc%20hidden%22%29%3B%0A%20%20%20%20%2F%2Ftoc%2EsetAttribute%28%22tabindex%22%2C%20%220%22%29%3B%0A%0A%20%20%20%20var%20heading%20%3D%20this%2Ecreate%5Felement%28%22div%22%29%3B%0A%20%20%20%20this%2Eadd%5Fclass%28heading%2C%20%22toc%2Dheading%22%29%3B%0A%20%20%20%20heading%2EinnerHTML%20%3D%20this%2Elocalize%28%22Table%20of%20Contents%22%29%3B%0A%0A%20%20%20%20toc%2EappendChild%28heading%29%3B%0A%20%20%20%20var%20previous%20%3D%20null%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20this%2Eslides%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20title%20%3D%20this%2Ehas%5Fclass%28this%2Eslides%5Bi%5D%2C%20%22title%22%29%3B%0A%20%20%20%20%20%20var%20num%20%3D%20document%2EcreateTextNode%28%28i%20%2B%201%29%20%2B%20%22%2E%20%22%29%3B%0A%0A%20%20%20%20%20%20toc%2EappendChild%28num%29%3B%0A%0A%20%20%20%20%20%20var%20a%20%3D%20this%2Ecreate%5Felement%28%22a%22%29%3B%0A%20%20%20%20%20%20a%2EsetAttribute%28%22href%22%2C%20%22%23%28%22%20%2B%20%28i%2B1%29%20%2B%20%22%29%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28title%29%0A%20%20%20%20%20%20%20%20this%2Eadd%5Fclass%28a%2C%20%22titleslide%22%29%3B%0A%0A%20%20%20%20%20%20var%20name%20%3D%20document%2EcreateTextNode%28this%2Eslide%5Fname%28i%29%29%3B%0A%20%20%20%20%20%20a%2EappendChild%28name%29%3B%0A%20%20%20%20%20%20a%2Eonclick%20%3D%20w3c%5Fslidy%2Etoc%5Fclick%3B%0A%20%20%20%20%20%20a%2Eonkeydown%20%3D%20w3c%5Fslidy%2Etoc%5Fkey%5Fdown%3B%0A%20%20%20%20%20%20a%2Eprevious%20%3D%20previous%3B%0A%0A%20%20%20%20%20%20if%20%28previous%29%0A%20%20%20%20%20%20%20%20previous%2Enext%20%3D%20a%3B%0A%0A%20%20%20%20%20%20toc%2EappendChild%28a%29%3B%0A%0A%20%20%20%20%20%20if%20%28i%20%3D%3D%200%29%0A%20%20%20%20%20%20%20%20toc%2Efirst%20%3D%20a%3B%0A%0A%20%20%20%20%20%20if%20%28i%20%3C%20this%2Eslides%2Elength%20%2D%201%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20var%20br%20%3D%20this%2Ecreate%5Felement%28%22br%22%29%3B%0A%20%20%20%20%20%20%20%20toc%2EappendChild%28br%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20previous%20%3D%20a%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20toc%2Efocus%20%3D%20function%20%28%29%20%7B%0A%20%20%20%20%20%20if%20%28this%2Efirst%29%0A%20%20%20%20%20%20%20%20this%2Efirst%2Efocus%28%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20toc%2Eonmouseup%20%3D%20w3c%5Fslidy%2Emouse%5Fbutton%5Fup%3B%0A%0A%20%20%20%20toc%2Eonclick%20%3D%20function%20%28e%29%20%7B%0A%20%20%20%20%20%20e%7C%7C%28e%3Dwindow%2Eevent%29%3B%0A%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Eselected%5Ftext%5Flen%20%3C%3D%200%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Ftable%5Fof%5Fcontents%28true%29%3B%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28e%29%3B%0A%20%20%20%20%0A%20%20%20%20%20%20if%20%28e%2Ecancel%20%21%3D%20undefined%29%0A%20%20%20%20%20%20%20%20e%2Ecancel%20%3D%20true%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%20%28e%2EreturnValue%20%21%3D%20undefined%29%0A%20%20%20%20%20%20%20%20e%2EreturnValue%20%3D%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20document%2Ebody%2EinsertBefore%28toc%2C%20document%2Ebody%2EfirstChild%29%3B%0A%20%20%20%20return%20toc%3B%0A%20%20%7D%2C%0A%0A%20%20is%5Fshown%5Ftoc%3A%20function%20%28%29%20%7B%0A%20%20%20%20return%20%21w3c%5Fslidy%2Ehas%5Fclass%28w3c%5Fslidy%2Etoc%2C%20%22hidden%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20show%5Ftable%5Fof%5Fcontents%3A%20function%20%28%29%20%7B%0A%20%20%20%20w3c%5Fslidy%2Eremove%5Fclass%28w3c%5Fslidy%2Etoc%2C%20%22hidden%22%29%3B%0A%20%20%20%20var%20toc%20%3D%20w3c%5Fslidy%2Etoc%3B%0A%20%20%20%20toc%2Efocus%28%29%3B%0A%0A%20%20%20%20if%20%28w3c%5Fslidy%2Eie7%20%26%26%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%3D%200%29%0A%20%20%20%20%20%20setTimeout%28w3c%5Fslidy%2Eie%5Fhack%2C%20100%29%3B%0A%20%20%7D%2C%0A%0A%20%20hide%5Ftable%5Fof%5Fcontents%3A%20function%20%28focus%29%20%7B%0A%20%20%20%20w3c%5Fslidy%2Eadd%5Fclass%28w3c%5Fslidy%2Etoc%2C%20%22hidden%22%29%3B%0A%0A%20%20%20%20if%20%28focus%20%26%26%20%21w3c%5Fslidy%2Eopera%20%26%26%0A%20%20%20%20%20%20%20%20%21w3c%5Fslidy%2Ehas%5Fclass%28w3c%5Fslidy%2Etoc%2C%20%22hidden%22%29%29%0A%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Ffocus%28%29%3B%0A%20%20%7D%2C%0A%0A%20%20toggle%5Ftable%5Fof%5Fcontents%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28w3c%5Fslidy%2Eis%5Fshown%5Ftoc%28%29%29%0A%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Ftable%5Fof%5Fcontents%28true%29%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Ftable%5Fof%5Fcontents%28%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20called%20on%20clicking%20toc%20entry%0A%20%20toc%5Fclick%3A%20function%20%28e%29%20%7B%0A%20%20%20%20if%20%28%21e%29%0A%20%20%20%20%20%20e%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20var%20target%20%3D%20w3c%5Fslidy%2Eget%5Ftarget%28e%29%3B%0A%0A%20%20%20%20if%20%28target%20%26%26%20target%2EnodeType%20%3D%3D%201%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20uri%20%3D%20target%2EgetAttribute%28%22href%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28uri%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2Falert%28%22going%20to%20%22%20%2B%20uri%29%3B%0A%20%20%20%20%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%20w3c%5Fslidy%2Efind%5Fslide%5Fnumber%28uri%29%3B%0A%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Flocation%28%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22hidden%22%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28%21w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28w3c%5Fslidy%2Elast%5Fshown%29%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20%2F%2Ftarget%2Efocus%28%29%3B%0A%0A%20%20%20%20%20%20%20%20try%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20%28%21w3c%5Fslidy%2Eopera%29%0A%20%20%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Ffocus%28%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20catch%20%28e%29%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20w3c%5Fslidy%2Ehide%5Ftable%5Fof%5Fcontents%28true%29%3B%0A%20%20%20%20if%20%28w3c%5Fslidy%2Eie7%29%20w3c%5Fslidy%2Eie%5Fhack%28%29%3B%0A%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28e%29%3B%0A%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28e%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20called%20onkeydown%20for%20toc%20entry%0A%20%20toc%5Fkey%5Fdown%3A%20function%20%28event%29%20%7B%0A%20%20%20%20var%20key%3B%0A%0A%20%20%20%20if%20%28%21event%29%0A%20%20%20%20%20%20var%20event%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20%2F%2F%20kludge%20around%20NS%2FIE%20differences%20%0A%20%20%20%20if%20%28window%2Eevent%29%0A%20%20%20%20%20%20key%20%3D%20window%2Eevent%2EkeyCode%3B%0A%20%20%20%20else%20if%20%28event%2Ewhich%29%0A%20%20%20%20%20%20key%20%3D%20event%2Ewhich%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20return%20true%3B%20%2F%2F%20Yikes%21%20unknown%20browser%0A%0A%20%20%20%20%2F%2F%20ignore%20event%20if%20key%20value%20is%20zero%0A%20%20%20%20%2F%2F%20as%20for%20alt%20on%20Opera%20and%20Konqueror%0A%20%20%20%20if%20%28%21key%29%0A%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%2F%2F%20check%20for%20concurrent%20control%2Fcommand%2Falt%20key%0A%20%20%20%20%2F%2F%20but%20are%20these%20only%20present%20on%20mouse%20events%3F%0A%0A%20%20%20%20if%20%28event%2EctrlKey%20%7C%7C%20event%2EaltKey%29%0A%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20if%20%28key%20%3D%3D%2013%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20uri%20%3D%20this%2EgetAttribute%28%22href%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28uri%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2Falert%28%22going%20to%20%22%20%2B%20uri%29%3B%0A%20%20%20%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%20w3c%5Fslidy%2Efind%5Fslide%5Fnumber%28uri%29%3B%0A%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Flocation%28%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22hidden%22%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28%21w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28w3c%5Fslidy%2Elast%5Fshown%29%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20%2F%2Ftarget%2Efocus%28%29%3B%0A%0A%20%20%20%20%20%20%20%20try%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20%28%21w3c%5Fslidy%2Eopera%29%0A%20%20%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Ffocus%28%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20catch%20%28e%29%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Ftable%5Fof%5Fcontents%28true%29%3B%0A%0A%20%20%20%20%20%20if%20%28self%2Eie7%29%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Eie%5Fhack%28%29%3B%0A%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28key%20%3D%3D%2040%20%26%26%20this%2Enext%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Enext%2Efocus%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28key%20%3D%3D%2038%20%26%26%20this%2Eprevious%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Eprevious%2Efocus%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20true%3B%0A%20%20%7D%2C%0A%0A%20%20touchstart%3A%20function%20%28e%29%0A%20%20%7B%0A%20%20%20%20%2F%2F%20a%20double%20touch%20often%20starts%20with%20a%0A%20%20%20%20%2F%2F%20single%20touch%20due%20to%20fingers%20touching%0A%20%20%20%20%2F%2F%20down%20at%20slightly%20different%20times%0A%20%20%20%20%2F%2F%20thus%20avoid%20calling%20preventDefault%20here%0A%20%20%20%20this%2Eprev%5Ftap%20%3D%20this%2Elast%5Ftap%3B%0A%20%20%20%20this%2Elast%5Ftap%20%3D%20%28new%20Date%29%2EgetTime%28%29%3B%0A%0A%20%20%20%20var%20tap%5Fdelay%20%3D%20this%2Elast%5Ftap%20%2D%20this%2Eprev%5Ftap%3B%0A%0A%20%20%20%20if%20%28tap%5Fdelay%20%3C%3D%20200%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%2F%2F%20double%20tap%0A%20%20%20%20%7D%0A%0A%20%20%20%20var%20touch%20%3D%20e%2Etouches%5B0%5D%3B%0A%0A%20%20%20%20this%2EpageX%20%3D%20touch%2EpageX%3B%0A%20%20%20%20this%2EpageY%20%3D%20touch%2EpageY%3B%0A%20%20%20%20this%2EscreenX%20%3D%20touch%2EscreenX%3B%0A%20%20%20%20this%2EscreenY%20%3D%20touch%2EscreenY%3B%0A%20%20%20%20this%2EclientX%20%3D%20touch%2EclientX%3B%0A%20%20%20%20this%2EclientY%20%3D%20touch%2EclientY%3B%0A%0A%20%20%20%20this%2Edelta%5Fx%20%3D%20this%2Edelta%5Fy%20%3D%200%3B%0A%20%20%7D%2C%0A%0A%20%20touchmove%3A%20function%20%28e%29%0A%20%20%7B%0A%20%20%20%20%2F%2F%20override%20native%20gestures%20for%20single%20touch%0A%20%20%20%20if%20%28e%2Etouches%2Elength%20%3E%201%29%0A%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20e%2EpreventDefault%28%29%3B%0A%20%20%20%20var%20touch%20%3D%20e%2Etouches%5B0%5D%3B%0A%20%20%20%20this%2Edelta%5Fx%20%3D%20touch%2EpageX%20%2D%20this%2EpageX%3B%0A%20%20%20%20this%2Edelta%5Fy%20%3D%20touch%2EpageY%20%2D%20this%2EpageY%3B%0A%20%20%7D%2C%0A%0A%20%20touchend%3A%20function%20%28e%29%0A%20%20%7B%0A%20%20%20%20%2F%2F%20default%20behavior%20for%20multi%2Dtouch%0A%20%20%20%20if%20%28e%2Etouches%2Elength%20%3E%201%29%0A%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20var%20delay%20%3D%20%28new%20Date%29%2EgetTime%28%29%20%2D%20this%2Elast%5Ftap%3B%0A%20%20%20%20var%20dx%20%3D%20this%2Edelta%5Fx%3B%0A%20%20%20%20var%20dy%20%3D%20this%2Edelta%5Fy%3B%0A%20%20%20%20var%20abs%5Fdx%20%3D%20Math%2Eabs%28dx%29%3B%0A%20%20%20%20var%20abs%5Fdy%20%3D%20Math%2Eabs%28dy%29%3B%0A%0A%20%20%20%20if%20%28delay%20%3C%20500%20%26%26%20%28abs%5Fdx%20%3E%20100%20%7C%7C%20abs%5Fdy%20%3E%20100%29%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28abs%5Fdx%20%3E%200%2E5%20%2A%20abs%5Fdy%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20e%2EpreventDefault%28%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28dx%20%3C%200%29%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Enext%5Fslide%28true%29%3B%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eprevious%5Fslide%28true%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if%20%28abs%5Fdy%20%3E%202%20%2A%20abs%5Fdx%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20e%2EpreventDefault%28%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Etoggle%5Ftable%5Fof%5Fcontents%28%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20OBSOLETE%20%23%23%23%0A%20%20before%5Fprint%3A%20function%20%28%29%20%7B%0A%20%20%20%20this%2Eshow%5Fall%5Fslides%28%29%3B%0A%20%20%20%20this%2Ehide%5Ftoolbar%28%29%3B%0A%20%20%20%20alert%28%22before%20print%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20OBSOLETE%20%23%23%23%0A%20%20after%5Fprint%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28%21this%2Eview%5Fall%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Esingle%5Fslide%5Fview%28%29%3B%0A%20%20%20%20%20%20this%2Eshow%5Ftoolbar%28%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20alert%28%22after%20print%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20OBSOLETE%20%23%23%23%0A%20%20print%5Fslides%3A%20function%20%28%29%20%7B%0A%20%20%20%20this%2Ebefore%5Fprint%28%29%3B%0A%20%20%20%20window%2Eprint%28%29%3B%0A%20%20%20%20this%2Eafter%5Fprint%28%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20OBSOLETE%20%3F%3F%20%23%23%23%0A%20%20toggle%5Fview%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28this%2Eview%5Fall%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Esingle%5Fslide%5Fview%28%29%3B%0A%20%20%20%20%20%20this%2Eshow%5Ftoolbar%28%29%3B%0A%20%20%20%20%20%20this%2Eview%5Fall%20%3D%200%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Eshow%5Fall%5Fslides%28%29%3B%0A%20%20%20%20%20%20this%2Ehide%5Ftoolbar%28%29%3B%0A%20%20%20%20%20%20this%2Eview%5Fall%20%3D%201%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20prepare%20for%20printing%20%20%23%23%23%20OBSOLETE%20%23%23%23%0A%20%20show%5Fall%5Fslides%3A%20function%20%28%29%20%7B%0A%20%20%20%20this%2Eremove%5Fclass%28document%2Ebody%2C%20%22single%5Fslide%22%29%3B%0A%20%20%20%20this%2Eset%5Fvisibility%5Fall%5Fincremental%28%22visible%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20restore%20after%20printing%20%20%23%23%23%20OBSOLETE%20%23%23%23%0A%20%20single%5Fslide%5Fview%3A%20function%20%28%29%20%7B%0A%20%20%20%20this%2Eadd%5Fclass%28document%2Ebody%2C%20%22single%5Fslide%22%29%3B%0A%20%20%20%20this%2Eset%5Fvisibility%5Fall%5Fincremental%28%22visible%22%29%3B%0A%20%20%20%20this%2Elast%5Fshown%20%3D%20this%2Eprevious%5Fincremental%5Fitem%28null%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20suppress%20IE%27s%20image%20toolbar%20pop%20up%0A%20%20hide%5Fimage%5Ftoolbar%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28%21this%2Ens%5Fpos%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20images%20%3D%20document%2EgetElementsByTagName%28%22IMG%22%29%3B%0A%0A%20%20%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20images%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%20%20%20%20images%5Bi%5D%2EsetAttribute%28%22galleryimg%22%2C%20%22no%22%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20unloaded%3A%20function%20%28e%29%20%7B%0A%20%20%20%20%2F%2Falert%28%22unloaded%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20Safari%20and%20Konqueror%20don%27t%20yet%20support%20getComputedStyle%28%29%0A%20%20%2F%2F%20and%20they%20always%20reload%20page%20when%20location%2Ehref%20is%20updated%0A%20%20is%5FKHTML%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20agent%20%3D%20navigator%2EuserAgent%3B%0A%20%20%20%20return%20%28agent%2EindexOf%28%22KHTML%22%29%20%3E%3D%200%20%3F%20true%20%3A%20false%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20find%20slide%20name%20from%20first%20h1%20element%0A%20%20%2F%2F%20default%20to%20document%20title%20%2B%20slide%20number%0A%20%20slide%5Fname%3A%20function%20%28index%29%20%7B%0A%20%20%20%20var%20name%20%3D%20null%3B%0A%20%20%20%20var%20slide%20%3D%20this%2Eslides%5Bindex%5D%3B%0A%0A%20%20%20%20var%20heading%20%3D%20this%2Efind%5Fheading%28slide%29%3B%0A%0A%20%20%20%20if%20%28heading%29%0A%20%20%20%20%20%20name%20%3D%20this%2Eextract%5Ftext%28heading%29%3B%0A%0A%20%20%20%20if%20%28%21name%29%0A%20%20%20%20%20%20name%20%3D%20this%2Etitle%20%2B%20%22%28%22%20%2B%20%28index%20%2B%201%29%20%2B%20%22%29%22%3B%0A%0A%20%20%20%20name%2Ereplace%28%2F%5C%26%2Fg%2C%20%22%26amp%3B%22%29%3B%0A%20%20%20%20name%2Ereplace%28%2F%5C%3C%2Fg%2C%20%22%26lt%3B%22%29%3B%0A%20%20%20%20name%2Ereplace%28%2F%5C%3E%2Fg%2C%20%22%26gt%3B%22%29%3B%0A%0A%20%20%20%20return%20name%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20find%20first%20h1%20element%20in%20DOM%20tree%0A%20%20find%5Fheading%3A%20function%20%28node%29%20%7B%0A%20%20%20%20if%20%28%21node%20%7C%7C%20node%2EnodeType%20%21%3D%201%29%0A%20%20%20%20%20%20return%20null%3B%0A%0A%20%20%20%20if%20%28node%2EnodeName%20%3D%3D%20%22H1%22%20%7C%7C%20node%2EnodeName%20%3D%3D%20%22h1%22%29%0A%20%20%20%20%20%20return%20node%3B%0A%0A%20%20%20%20var%20child%20%3D%20node%2EfirstChild%3B%0A%0A%20%20%20%20while%20%28child%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20node%20%3D%20this%2Efind%5Fheading%28child%29%3B%0A%0A%20%20%20%20%20%20if%20%28node%29%0A%20%20%20%20%20%20%20%20return%20node%3B%0A%0A%20%20%20%20%20%20child%20%3D%20child%2EnextSibling%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20null%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20recursively%20extract%20text%20from%20DOM%20tree%0A%20%20extract%5Ftext%3A%20function%20%28node%29%20%7B%0A%20%20%20%20if%20%28%21node%29%0A%20%20%20%20%20%20return%20%22%22%3B%0A%0A%20%20%20%20%2F%2F%20text%20nodes%0A%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%203%29%0A%20%20%20%20%20%20return%20node%2EnodeValue%3B%0A%0A%20%20%20%20%2F%2F%20elements%0A%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20node%20%3D%20node%2EfirstChild%3B%0A%20%20%20%20%20%20var%20text%20%3D%20%22%22%3B%0A%0A%20%20%20%20%20%20while%20%28node%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20text%20%3D%20text%20%2B%20this%2Eextract%5Ftext%28node%29%3B%0A%20%20%20%20%20%20%20%20node%20%3D%20node%2EnextSibling%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20text%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20%22%22%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20find%20copyright%20text%20from%20meta%20element%0A%20%20find%5Fcopyright%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20name%2C%20content%3B%0A%20%20%20%20var%20meta%20%3D%20document%2EgetElementsByTagName%28%22meta%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20meta%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20name%20%3D%20meta%5Bi%5D%2EgetAttribute%28%22name%22%29%3B%0A%20%20%20%20%20%20content%20%3D%20meta%5Bi%5D%2EgetAttribute%28%22content%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28name%20%3D%3D%20%22copyright%22%29%0A%20%20%20%20%20%20%20%20return%20content%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20null%3B%0A%20%20%7D%2C%0A%0A%20%20find%5Fsize%5Fadjust%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20name%2C%20content%2C%20offset%3B%0A%20%20%20%20var%20meta%20%3D%20document%2EgetElementsByTagName%28%22meta%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20meta%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20name%20%3D%20meta%5Bi%5D%2EgetAttribute%28%22name%22%29%3B%0A%20%20%20%20%20%20content%20%3D%20meta%5Bi%5D%2EgetAttribute%28%22content%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28name%20%3D%3D%20%22font%2Dsize%2Dadjustment%22%29%0A%20%20%20%20%20%20%20%20return%201%20%2A%20content%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%201%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%3Cmeta%20name%3D%22duration%22%20content%3D%2220%22%20%2F%3E%20%20for%2020%20minutes%0A%20%20find%5Fduration%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20name%2C%20content%2C%20offset%3B%0A%20%20%20%20var%20meta%20%3D%20document%2EgetElementsByTagName%28%22meta%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20meta%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20name%20%3D%20meta%5Bi%5D%2EgetAttribute%28%22name%22%29%3B%0A%20%20%20%20%20%20content%20%3D%20meta%5Bi%5D%2EgetAttribute%28%22content%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28name%20%3D%3D%20%22duration%22%29%0A%20%20%20%20%20%20%20%20return%2060000%20%2A%20content%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20null%3B%0A%20%20%7D%2C%0A%0A%20%20replace%5Fby%5Fnon%5Fbreaking%5Fspace%3A%20function%20%28str%29%20%7B%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20str%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%20%20str%5Bi%5D%20%3D%20160%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20CHECK%20ME%20%23%23%23%20is%20use%20of%20%22li%22%20okay%20for%20text%2Fhtml%3F%0A%20%20%2F%2F%20for%20XHTML%20do%20we%20also%20need%20to%20specify%20namespace%3F%0A%20%20init%5Foutliner%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20items%20%3D%20document%2EgetElementsByTagName%28%22li%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20items%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20target%20%3D%20items%5Bi%5D%3B%0A%0A%20%20%20%20%20%20if%20%28%21this%2Ehas%5Fclass%28target%2EparentNode%2C%20%22outline%22%29%29%0A%20%20%20%20%20%20%20%20continue%3B%0A%0A%20%20%20%20%20%20target%2Eonclick%20%3D%20this%2Eoutline%5Fclick%3B%0A%2F%2A%20%23%23%23%20more%20work%20needed%20for%20IE6%0A%20%20%20%20%20%20if%20%28%21this%2Ens%5Fpos%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20target%2Eonmouseover%20%3D%20this%2Ehover%5Foutline%3B%0A%20%20%20%20%20%20%20%20target%2Eonmouseout%20%3D%20this%2Eunhover%5Foutline%3B%0A%20%20%20%20%20%20%7D%0A%2A%2F%0A%20%20%20%20%20%20if%20%28this%2Efoldable%28target%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20target%2Efoldable%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20target%2Eonfocus%20%3D%20function%20%28%29%20%7Bw3c%5Fslidy%2Eoutline%20%3D%20this%3B%7D%3B%0A%20%20%20%20%20%20%20%20target%2Eonblur%20%3D%20function%20%28%29%20%7Bw3c%5Fslidy%2Eoutline%20%3D%20null%3B%7D%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28%21target%2EgetAttribute%28%22tabindex%22%29%29%0A%20%20%20%20%20%20%20%20%20%20target%2EsetAttribute%28%22tabindex%22%2C%20%220%22%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28this%2Ehas%5Fclass%28target%2C%20%22expand%22%29%29%0A%20%20%20%20%20%20%20%20%20%20this%2Eunfold%28target%29%3B%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20this%2Efold%28target%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20this%2Eadd%5Fclass%28target%2C%20%22nofold%22%29%3B%0A%20%20%20%20%20%20%20%20target%2Evisible%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20target%2Efoldable%20%3D%20false%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20foldable%3A%20function%20%28item%29%20%7B%0A%20%20%20%20if%20%28%21item%20%7C%7C%20item%2EnodeType%20%21%3D%201%29%0A%20%20%20%20%20%20return%20false%3B%0A%0A%20%20%20%20var%20node%20%3D%20item%2EfirstChild%3B%0A%0A%20%20%20%20while%20%28node%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%20%26%26%20this%2Eis%5Fblock%28node%29%29%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%20%20node%20%3D%20node%2EnextSibling%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20false%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20CHECK%20ME%20%23%23%23%20switch%20to%20add%2Fremove%20%22hidden%22%20class%0A%20%20fold%3A%20function%20%28item%29%20%7B%0A%20%20%20%20if%20%28item%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Eremove%5Fclass%28item%2C%20%22unfolded%22%29%3B%0A%20%20%20%20%20%20this%2Eadd%5Fclass%28item%2C%20%22folded%22%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20var%20node%20%3D%20item%20%3F%20item%2EfirstChild%20%3A%20null%3B%0A%0A%20%20%20%20while%20%28node%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%20%26%26%20this%2Eis%5Fblock%28node%29%29%20%2F%2F%20element%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eadd%5Fclass%28node%2C%20%22hidden%22%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20node%20%3D%20node%2EnextSibling%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20item%2Evisible%20%3D%20false%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20CHECK%20ME%20%23%23%23%20switch%20to%20add%2Fremove%20%22hidden%22%20class%0A%20%20unfold%3A%20function%20%28item%29%20%7B%0A%20%20%20%20if%20%28item%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20this%2Eadd%5Fclass%28item%2C%20%22unfolded%22%29%3B%0A%20%20%20%20%20%20this%2Eremove%5Fclass%28item%2C%20%22folded%22%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20var%20node%20%3D%20item%20%3F%20item%2EfirstChild%20%3A%20null%3B%0A%0A%20%20%20%20while%20%28node%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%20%26%26%20this%2Eis%5Fblock%28node%29%29%20%2F%2F%20element%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eremove%5Fclass%28node%2C%20%22hidden%22%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20node%20%3D%20node%2EnextSibling%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20item%2Evisible%20%3D%20true%3B%0A%20%20%7D%2C%0A%0A%20%20outline%5Fclick%3A%20function%20%28e%29%20%7B%0A%20%20%20%20if%20%28%21e%29%0A%20%20%20%20%20%20e%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20var%20rightclick%20%3D%20false%3B%0A%20%20%20%20var%20target%20%3D%20w3c%5Fslidy%2Eget%5Ftarget%28e%29%3B%0A%0A%20%20%20%20while%20%28target%20%26%26%20target%2Evisible%20%3D%3D%20undefined%29%0A%20%20%20%20%20%20target%20%3D%20target%2EparentNode%3B%0A%0A%20%20%20%20if%20%28%21target%29%0A%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20if%20%28e%2Ewhich%29%0A%20%20%20%20%20%20rightclick%20%3D%20%28e%2Ewhich%20%3D%3D%203%29%3B%0A%20%20%20%20else%20if%20%28e%2Ebutton%29%0A%20%20%20%20%20%20rightclick%20%3D%20%28e%2Ebutton%20%3D%3D%202%29%3B%0A%0A%20%20%20%20if%20%28%21rightclick%20%26%26%20target%2Evisible%20%21%3D%20undefined%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28target%2Efoldable%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20%28target%2Evisible%29%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Efold%28target%29%3B%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eunfold%28target%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28e%29%3B%0A%20%20%20%20%20%20e%2Ecancel%20%3D%20true%3B%0A%20%20%20%20%20%20e%2EreturnValue%20%3D%20false%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20false%3B%0A%20%20%7D%2C%0A%0A%20%20add%5Finitial%5Fprompt%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20prompt%20%3D%20this%2Ecreate%5Felement%28%22div%22%29%3B%0A%20%20%20%20prompt%2EsetAttribute%28%22class%22%2C%20%22initial%5Fprompt%22%29%3B%0A%0A%20%20%20%20var%20p1%20%3D%20this%2Ecreate%5Felement%28%22p%22%29%3B%0A%20%20%20%20prompt%2EappendChild%28p1%29%3B%0A%20%20%20%20p1%2EsetAttribute%28%22class%22%2C%20%22help%22%29%3B%0A%0A%20%20%20%20if%20%28this%2Ekeyboardless%29%0A%20%20%20%20%20%20p1%2EinnerHTML%20%3D%20%22swipe%20left%20to%20move%20to%20next%20slide%22%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20p1%2EinnerHTML%20%3D%20%22Space%2C%20Right%20Arrow%20or%20swipe%20left%20to%20move%20to%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22next%20slide%2C%20click%20help%20below%20for%20more%20details%22%3B%0A%0A%20%20%20%20this%2Eadd%5Flistener%28prompt%2C%20%22click%22%2C%20function%20%28e%29%20%7B%0A%20%20%20%20%20%20document%2Ebody%2EremoveChild%28prompt%29%3B%0A%20%20%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28e%29%3B%0A%20%20%20%20%0A%20%20%20%20%20%20if%20%28e%2Ecancel%20%21%3D%20undefined%29%0A%20%20%20%20%20%20%20%20e%2Ecancel%20%3D%20true%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if%20%28e%2EreturnValue%20%21%3D%20undefined%29%0A%20%20%20%20%20%20%20%20e%2EreturnValue%20%3D%20false%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%29%3B%0A%0A%20%20%20%20document%2Ebody%2EappendChild%28prompt%29%3B%0A%20%20%20%20this%2Einitial%5Fprompt%20%3D%20prompt%3B%0A%20%20%20%20setTimeout%28function%28%29%20%7Bdocument%2Ebody%2EremoveChild%28prompt%29%3B%7D%2C%205000%29%3B%0A%20%20%7D%2C%0A%0A%20%20add%5Ftoolbar%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20counter%2C%20page%3B%0A%0A%20%20%20%20%20this%2Etoolbar%20%3D%20this%2Ecreate%5Felement%28%22div%22%29%3B%0A%20%20%20%20%20this%2Etoolbar%2EsetAttribute%28%22class%22%2C%20%22toolbar%22%29%3B%0A%0A%20%20%20%20%20%2F%2F%20a%20reasonably%20behaved%20browser%0A%20%20%20%20%20if%20%28this%2Ens%5Fpos%20%7C%7C%20%21this%2Eie6%29%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20var%20right%20%3D%20this%2Ecreate%5Felement%28%22div%22%29%3B%0A%20%20%20%20%20%20%20right%2EsetAttribute%28%22style%22%2C%20%22float%3A%20right%3B%20text%2Dalign%3A%20right%22%29%3B%0A%0A%20%20%20%20%20%20%20counter%20%3D%20this%2Ecreate%5Felement%28%22span%22%29%0A%20%20%20%20%20%20%20counter%2EinnerHTML%20%3D%20this%2Elocalize%28%22slide%22%29%20%2B%20%22%20n%2Fm%22%3B%0A%20%20%20%20%20%20%20right%2EappendChild%28counter%29%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28right%29%3B%0A%0A%20%20%20%20%20%20%20var%20left%20%3D%20this%2Ecreate%5Felement%28%22div%22%29%3B%0A%20%20%20%20%20%20%20left%2EsetAttribute%28%22style%22%2C%20%22text%2Dalign%3A%20left%22%29%3B%0A%0A%20%20%20%20%20%20%20%2F%2F%20global%20end%20of%20slide%20indicator%0A%20%20%20%20%20%20%20this%2Eeos%20%3D%20this%2Ecreate%5Felement%28%22span%22%29%3B%0A%20%20%20%20%20%20%20this%2Eeos%2EinnerHTML%20%3D%20%22%2A%20%22%3B%0A%20%20%20%20%20%20%20left%2EappendChild%28this%2Eeos%29%3B%0A%0A%20%20%20%20%20%20%20var%20help%20%3D%20this%2Ecreate%5Felement%28%22a%22%29%3B%0A%20%20%20%20%20%20%20help%2EsetAttribute%28%22href%22%2C%20this%2Ehelp%5Fpage%29%3B%0A%20%20%20%20%20%20%20help%2EsetAttribute%28%22title%22%2C%20this%2Elocalize%28this%2Ehelp%5Ftext%29%29%3B%0A%20%20%20%20%20%20%20help%2EinnerHTML%20%3D%20this%2Elocalize%28%22help%3F%22%29%3B%0A%20%20%20%20%20%20%20left%2EappendChild%28help%29%3B%0A%20%20%20%20%20%20%20this%2Ehelp%5Fanchor%20%3D%20help%3B%20%20%2F%2F%20save%20for%20focus%20hack%0A%0A%20%20%20%20%20%20%20var%20gap1%20%3D%20document%2EcreateTextNode%28%22%20%22%29%3B%0A%20%20%20%20%20%20%20left%2EappendChild%28gap1%29%3B%0A%0A%20%20%20%20%20%20%20var%20contents%20%3D%20this%2Ecreate%5Felement%28%22a%22%29%3B%0A%20%20%20%20%20%20%20contents%2EsetAttribute%28%22href%22%2C%20%22javascript%3Aw3c%5Fslidy%2Etoggle%5Ftable%5Fof%5Fcontents%28%29%22%29%3B%0A%20%20%20%20%20%20%20contents%2EsetAttribute%28%22title%22%2C%20this%2Elocalize%28%22table%20of%20contents%22%29%29%3B%0A%20%20%20%20%20%20%20contents%2EinnerHTML%20%3D%20this%2Elocalize%28%22contents%3F%22%29%3B%0A%20%20%20%20%20%20%20left%2EappendChild%28contents%29%3B%0A%0A%20%20%20%20%20%20%20var%20gap2%20%3D%20document%2EcreateTextNode%28%22%20%22%29%3B%0A%20%20%20%20%20%20%20left%2EappendChild%28gap2%29%3B%0A%0A%20%20%20%20%20%20%20var%20copyright%20%3D%20this%2Efind%5Fcopyright%28%29%3B%0A%0A%20%20%20%20%20%20%20if%20%28copyright%29%0A%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20var%20span%20%3D%20this%2Ecreate%5Felement%28%22span%22%29%3B%0A%20%20%20%20%20%20%20%20%20span%2EclassName%20%3D%20%22copyright%22%3B%0A%20%20%20%20%20%20%20%20%20span%2EinnerHTML%20%3D%20copyright%3B%0A%20%20%20%20%20%20%20%20%20left%2EappendChild%28span%29%3B%0A%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20this%2Etoolbar%2EsetAttribute%28%22tabindex%22%2C%20%220%22%29%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28left%29%3B%0A%20%20%20%20%20%7D%0A%20%20%20%20%20else%20%2F%2F%20IE6%20so%20need%20to%20work%20around%20its%20poor%20CSS%20support%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Eposition%20%3D%20%28this%2Eie7%20%3F%20%22fixed%22%20%3A%20%22absolute%22%29%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2EzIndex%20%3D%20%22200%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Ewidth%20%3D%20%2299%2E9%25%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Eheight%20%3D%20%221%2E2em%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Etop%20%3D%20%22auto%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Ebottom%20%3D%20%220%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Eleft%20%3D%20%220%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Eright%20%3D%20%220%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2EtextAlign%20%3D%20%22left%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2EfontSize%20%3D%20%2260%25%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Ecolor%20%3D%20%22red%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EborderWidth%20%3D%200%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EclassName%20%3D%20%22toolbar%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2Estyle%2Ebackground%20%3D%20%22rgb%28240%2C240%2C240%29%22%3B%0A%0A%20%20%20%20%20%20%20%2F%2F%20would%20like%20to%20have%20help%20text%20left%20aligned%0A%20%20%20%20%20%20%20%2F%2F%20and%20page%20counter%20right%20aligned%2C%20floating%0A%20%20%20%20%20%20%20%2F%2F%20div%27s%20don%27t%20work%2C%20so%20instead%20use%20nested%0A%20%20%20%20%20%20%20%2F%2F%20absolutely%20positioned%20div%27s%2E%0A%0A%20%20%20%20%20%20%20var%20sp%20%3D%20this%2Ecreate%5Felement%28%22span%22%29%3B%0A%20%20%20%20%20%20%20sp%2EinnerHTML%20%3D%20%22%26nbsp%3B%26nbsp%3B%2A%26nbsp%3B%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28sp%29%3B%0A%20%20%20%20%20%20%20this%2Eeos%20%3D%20sp%3B%20%20%2F%2F%20end%20of%20slide%20indicator%0A%0A%20%20%20%20%20%20%20var%20help%20%3D%20this%2Ecreate%5Felement%28%22a%22%29%3B%0A%20%20%20%20%20%20%20help%2EsetAttribute%28%22href%22%2C%20this%2Ehelp%5Fpage%29%3B%0A%20%20%20%20%20%20%20help%2EsetAttribute%28%22title%22%2C%20this%2Elocalize%28this%2Ehelp%5Ftext%29%29%3B%0A%20%20%20%20%20%20%20help%2EinnerHTML%20%3D%20this%2Elocalize%28%22help%3F%22%29%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28help%29%3B%0A%20%20%20%20%20%20%20this%2Ehelp%5Fanchor%20%3D%20help%3B%20%20%2F%2F%20save%20for%20focus%20hack%0A%0A%20%20%20%20%20%20%20var%20gap1%20%3D%20document%2EcreateTextNode%28%22%20%22%29%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28gap1%29%3B%0A%0A%20%20%20%20%20%20%20var%20contents%20%3D%20this%2Ecreate%5Felement%28%22a%22%29%3B%0A%20%20%20%20%20%20%20contents%2EsetAttribute%28%22href%22%2C%20%22javascript%3AtoggleTableOfContents%28%29%22%29%3B%0A%20%20%20%20%20%20%20contents%2EsetAttribute%28%22title%22%2C%20this%2Elocalize%28%22table%20of%20contents%22%2Elocalize%29%29%3B%0A%20%20%20%20%20%20%20contents%2EinnerHTML%20%3D%20this%2Elocalize%28%22contents%3F%22%29%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28contents%29%3B%0A%0A%20%20%20%20%20%20%20var%20gap2%20%3D%20document%2EcreateTextNode%28%22%20%22%29%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28gap2%29%3B%0A%0A%20%20%20%20%20%20%20var%20copyright%20%3D%20this%2Efind%5Fcopyright%28%29%3B%0A%0A%20%20%20%20%20%20%20if%20%28copyright%29%0A%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20var%20span%20%3D%20this%2Ecreate%5Felement%28%22span%22%29%3B%0A%20%20%20%20%20%20%20%20%20span%2EinnerHTML%20%3D%20copyright%3B%0A%20%20%20%20%20%20%20%20%20span%2Estyle%2Ecolor%20%3D%20%22black%22%3B%0A%20%20%20%20%20%20%20%20%20span%2Estyle%2EmarginLeft%20%3D%20%220%2E5em%22%3B%0A%20%20%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28span%29%3B%0A%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20counter%20%3D%20this%2Ecreate%5Felement%28%22div%22%29%0A%20%20%20%20%20%20%20counter%2Estyle%2Eposition%20%3D%20%22absolute%22%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2Ewidth%20%3D%20%22auto%22%3B%20%2F%2F%2220%25%22%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2Eheight%20%3D%20%221%2E2em%22%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2Etop%20%3D%20%22auto%22%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2Ebottom%20%3D%200%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2Eright%20%3D%20%220%22%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2EtextAlign%20%3D%20%22right%22%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2Ecolor%20%3D%20%22red%22%3B%0A%20%20%20%20%20%20%20counter%2Estyle%2Ebackground%20%3D%20%22rgb%28240%2C240%2C240%29%22%3B%0A%0A%20%20%20%20%20%20%20counter%2EinnerHTML%20%3D%20this%2Elocalize%28%22slide%22%29%20%2B%20%22%20n%2Fm%22%3B%0A%20%20%20%20%20%20%20this%2Etoolbar%2EappendChild%28counter%29%3B%0A%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%2F%2F%20ensure%20that%20click%20isn%27t%20passed%20through%20to%20the%20page%0A%20%20%20%20%20this%2Etoolbar%2Eonclick%20%3D%0A%20%20%20%20%20%20%20%20%20function%20%28e%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20if%20%28%21e%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20e%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20var%20target%20%3D%20e%2Etarget%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20if%20%28%21target%20%26%26%20e%2EsrcElement%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20target%20%3D%20e%2EsrcElement%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20work%20around%20Safari%20bug%0A%20%20%20%20%20%20%20%20%20%20%20if%20%28target%20%26%26%20target%2EnodeType%20%3D%3D%203%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20target%20%3D%20target%2EparentNode%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28e%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20if%20%28target%20%26%26%20target%2EnodeName%2EtoLowerCase%28%29%20%21%3D%20%22a%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Emouse%5Fbutton%5Fclick%28e%29%3B%0A%20%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20this%2Eslide%5Fnumber%5Felement%20%3D%20counter%3B%0A%20%20%20%20%20this%2Eset%5Feos%5Fstatus%28false%29%3B%0A%20%20%20%20%20document%2Ebody%2EappendChild%28this%2Etoolbar%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20wysiwyg%20editors%20make%20it%20hard%20to%20use%20div%20elements%0A%20%20%2F%2F%20e%2Eg%2E%20amaya%20loses%20the%20div%20when%20you%20copy%20and%20paste%0A%20%20%2F%2F%20this%20function%20wraps%20div%20elements%20around%20implicit%0A%20%20%2F%2F%20slides%20which%20start%20with%20an%20h1%20element%20and%20continue%0A%20%20%2F%2F%20up%20to%20the%20next%20heading%20or%20div%20element%0A%20%20wrap%5Fimplicit%5Fslides%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20i%2C%20heading%2C%20node%2C%20next%2C%20div%3B%0A%20%20%20%20var%20headings%20%3D%20document%2EgetElementsByTagName%28%22h1%22%29%3B%0A%0A%20%20%20%20if%20%28%21headings%29%0A%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20for%20%28i%20%3D%200%3B%20i%20%3C%20headings%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20heading%20%3D%20headings%5Bi%5D%3B%0A%0A%20%20%20%20%20%20if%20%28heading%2EparentNode%20%21%3D%20document%2Ebody%29%0A%20%20%20%20%20%20%20%20continue%3B%0A%0A%20%20%20%20%20%20node%20%3D%20heading%2EnextSibling%3B%0A%0A%20%20%20%20%20%20div%20%3D%20document%2EcreateElement%28%22div%22%29%3B%0A%20%20%20%20%20%20this%2Eadd%5Fclass%28div%2C%20%22slide%22%29%3B%0A%20%20%20%20%20%20document%2Ebody%2EreplaceChild%28div%2C%20heading%29%3B%0A%20%20%20%20%20%20div%2EappendChild%28heading%29%3B%0A%0A%20%20%20%20%20%20while%20%28node%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%29%20%2F%2F%20an%20element%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20if%20%28node%2EnodeName%20%3D%3D%20%22H1%22%20%7C%7C%20node%2EnodeName%20%3D%3D%20%22h1%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20if%20%28node%2EnodeName%20%3D%3D%20%22DIV%22%20%7C%7C%20node%2EnodeName%20%3D%3D%20%22div%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28this%2Ehas%5Fclass%28node%2C%20%22slide%22%29%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28this%2Ehas%5Fclass%28node%2C%20%22handout%22%29%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20next%20%3D%20node%2EnextSibling%3B%0A%20%20%20%20%20%20%20%20node%20%3D%20document%2Ebody%2EremoveChild%28node%29%3B%0A%20%20%20%20%20%20%20%20div%2EappendChild%28node%29%3B%0A%20%20%20%20%20%20%20%20node%20%3D%20next%3B%0A%20%20%20%20%20%20%7D%20%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20attach%5Ftouch%5Fhanders%3A%20function%28slides%29%0A%20%20%7B%0A%20%20%20%20var%20i%2C%20slide%3B%0A%0A%20%20%20%20for%20%28i%20%3D%200%3B%20i%20%3C%20slides%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20slide%20%3D%20slides%5Bi%5D%3B%0A%20%20%20%20%20%20this%2Eadd%5Flistener%28slide%2C%20%22touchstart%22%2C%20this%2Etouchstart%29%3B%0A%20%20%20%20%20%20this%2Eadd%5Flistener%28slide%2C%20%22touchmove%22%2C%20this%2Etouchmove%29%3B%0A%20%20%20%20%20%20this%2Eadd%5Flistener%28slide%2C%20%22touchend%22%2C%20this%2Etouchend%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%2F%2F%20return%20new%20array%20of%20all%20slides%0A%20%20collect%5Fslides%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20slides%20%3D%20new%20Array%28%29%3B%0A%20%20%20%20var%20divs%20%3D%20document%2Ebody%2EgetElementsByTagName%28%22div%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20divs%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20div%20%3D%20divs%2Eitem%28i%29%3B%0A%0A%20%20%20%20%20%20if%20%28this%2Ehas%5Fclass%28div%2C%20%22slide%22%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20add%20slide%20to%20collection%0A%20%20%20%20%20%20%20%20slides%5Bslides%2Elength%5D%20%3D%20div%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20hide%20each%20slide%20as%20it%20is%20found%0A%20%20%20%20%20%20%20%20this%2Eadd%5Fclass%28div%2C%20%22hidden%22%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20add%20dummy%20%3Cbr%2F%3E%20at%20end%20for%20scrolling%20hack%0A%20%20%20%20%20%20%20%20var%20node1%20%3D%20document%2EcreateElement%28%22br%22%29%3B%0A%20%20%20%20%20%20%20%20div%2EappendChild%28node1%29%3B%0A%20%20%20%20%20%20%20%20var%20node2%20%3D%20document%2EcreateElement%28%22br%22%29%3B%0A%20%20%20%20%20%20%20%20div%2EappendChild%28node2%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if%20%28this%2Ehas%5Fclass%28div%2C%20%22background%22%29%29%0A%20%20%20%20%20%20%7B%20%20%2F%2F%20work%20around%20for%20Firefox%20SVG%20reload%20bug%0A%20%20%20%20%20%20%20%20%2F%2F%20which%20otherwise%20replaces%201st%20SVG%20graphic%20with%202nd%0A%20%20%20%20%20%20%20%20div%2Estyle%2Edisplay%20%3D%20%22block%22%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20this%2Eslides%20%3D%20slides%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20return%20new%20array%20of%20all%20%3Cdiv%20class%3D%22handout%22%3E%0A%20%20collect%5Fnotes%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20notes%20%3D%20new%20Array%28%29%3B%0A%20%20%20%20var%20divs%20%3D%20document%2Ebody%2EgetElementsByTagName%28%22div%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20divs%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20div%20%3D%20divs%2Eitem%28i%29%3B%0A%0A%20%20%20%20%20%20if%20%28this%2Ehas%5Fclass%28div%2C%20%22handout%22%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20add%20note%20to%20collection%0A%20%20%20%20%20%20%20%20notes%5Bnotes%2Elength%5D%20%3D%20div%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20and%20hide%20it%0A%20%20%20%20%20%20%20%20this%2Eadd%5Fclass%28div%2C%20%22hidden%22%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20this%2Enotes%20%3D%20notes%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20return%20new%20array%20of%20all%20%3Cdiv%20class%3D%22background%22%3E%0A%20%20%2F%2F%20including%20named%20backgrounds%20e%2Eg%2E%20class%3D%22background%20titlepage%22%0A%20%20collect%5Fbackgrounds%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20backgrounds%20%3D%20new%20Array%28%29%3B%0A%20%20%20%20var%20divs%20%3D%20document%2Ebody%2EgetElementsByTagName%28%22div%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20divs%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20div%20%3D%20divs%2Eitem%28i%29%3B%0A%0A%20%20%20%20%20%20if%20%28this%2Ehas%5Fclass%28div%2C%20%22background%22%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20add%20background%20to%20collection%0A%20%20%20%20%20%20%20%20backgrounds%5Bbackgrounds%2Elength%5D%20%3D%20div%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20and%20hide%20it%0A%20%20%20%20%20%20%20%20this%2Eadd%5Fclass%28div%2C%20%22hidden%22%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20this%2Ebackgrounds%20%3D%20backgrounds%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20set%20click%20handlers%20on%20all%20anchors%0A%20%20patch%5Fanchors%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20self%20%3D%20w3c%5Fslidy%3B%0A%20%20%20%20var%20handler%20%3D%20function%20%28event%29%20%7B%0A%20%20%20%20%20%20%2F%2F%20compare%20this%2Ehref%20with%20location%2Ehref%0A%20%20%20%20%20%20%2F%2F%20for%20link%20to%20another%20slide%20in%20this%20doc%0A%0A%20%20%20%20%20%20if%20%28self%2Epage%5Faddress%28this%2Ehref%29%20%3D%3D%20self%2Epage%5Faddress%28location%2Ehref%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20yes%2C%20so%20find%20new%20slide%20number%0A%20%20%20%20%20%20%20%20var%20newslidenum%20%3D%20self%2Efind%5Fslide%5Fnumber%28this%2Ehref%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28newslidenum%20%21%3D%20self%2Eslide%5Fnumber%29%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20slide%20%3D%20self%2Eslides%5Bself%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20%20self%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20%20%20self%2Eslide%5Fnumber%20%3D%20newslidenum%3B%0A%20%20%20%20%20%20%20%20%20%20slide%20%3D%20self%2Eslides%5Bself%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20%20self%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20%20%20self%2Eset%5Flocation%28%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28event%29%3B%0A%0A%2F%2F%20%20%20%20%20%20else%20if%20%28this%2Etarget%20%3D%3D%20null%29%0A%2F%2F%20%20%20%20%20%20%20%20location%2Ehref%20%3D%20this%2Ehref%3B%0A%0A%20%20%20%20%20%20this%2Eblur%28%29%3B%0A%20%20%20%20%20%20self%2Edisable%5Fslide%5Fclick%20%3D%20true%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20anchors%20%3D%20document%2Ebody%2EgetElementsByTagName%28%22a%22%29%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20anchors%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28window%2EaddEventListener%29%0A%20%20%20%20%20%20%20%20anchors%5Bi%5D%2EaddEventListener%28%22click%22%2C%20handler%2C%20false%29%3B%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20anchors%5Bi%5D%2EattachEvent%28%22onclick%22%2C%20handler%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%23%23%23%20CHECK%20ME%20%23%23%23%20see%20which%20functions%20are%20invoked%20via%20setTimeout%0A%20%20%2F%2F%20either%20directly%20or%20indirectly%20for%20use%20of%20w3c%5Fslidy%20vs%20this%0A%20%20show%5Fslide%5Fnumber%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20timer%20%3D%20w3c%5Fslidy%2Eget%5Ftimer%28%29%3B%0A%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%5Felement%2EinnerHTML%20%3D%20timer%20%2B%20w3c%5Fslidy%2Elocalize%28%22slide%22%29%20%2B%20%22%20%22%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%28w3c%5Fslidy%2Eslide%5Fnumber%20%2B%201%29%20%2B%20%22%2F%22%20%2B%20w3c%5Fslidy%2Eslides%2Elength%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20every%20200mS%20check%20if%20the%20location%20has%20been%20changed%20as%20a%0A%20%20%2F%2F%20result%20of%20the%20user%20activating%20the%20Back%20button%2Fmenu%20item%0A%20%20%2F%2F%20doesn%27t%20work%20for%20Opera%20%3C%209%2E5%0A%20%20check%5Flocation%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20hash%20%3D%20location%2Ehash%3B%0A%0A%20%20%20%20if%20%28w3c%5Fslidy%2Eslide%5Fnumber%20%3E%200%20%26%26%20%28hash%20%3D%3D%20%22%22%20%7C%7C%20hash%20%3D%3D%20%22%23%22%29%29%0A%20%20%20%20%20%20w3c%5Fslidy%2Egoto%5Fslide%280%29%3B%0A%20%20%20%20else%20if%20%28hash%2Elength%20%3E%202%20%26%26%20hash%20%21%3D%20%22%23%28%22%2B%28w3c%5Fslidy%2Eslide%5Fnumber%2B1%29%2B%22%29%22%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20num%20%3D%20parseInt%28location%2Ehash%2Esubstr%282%29%29%3B%0A%0A%20%20%20%20%20%20if%20%28%21isNaN%28num%29%29%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Egoto%5Fslide%28num%2D1%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28w3c%5Fslidy%2Etime%5Fleft%20%26%26%20w3c%5Fslidy%2Eslide%5Fnumber%20%3E%200%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%5Fnumber%28%29%3B%0A%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Etime%5Fleft%20%3E%200%29%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Etime%5Fleft%20%2D%3D%20200%3B%0A%20%20%20%20%7D%20%0A%20%20%7D%2C%0A%0A%20%20get%5Ftimer%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20timer%20%3D%20%22%22%3B%0A%20%20%20%20if%20%28w3c%5Fslidy%2Etime%5Fleft%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20mins%2C%20secs%3B%0A%20%20%20%20%20%20secs%20%3D%20Math%2Efloor%28w3c%5Fslidy%2Etime%5Fleft%2F1000%29%3B%0A%20%20%20%20%20%20mins%20%3D%20Math%2Efloor%28secs%20%2F%2060%29%3B%0A%20%20%20%20%20%20secs%20%3D%20secs%20%25%2060%3B%0A%20%20%20%20%20%20timer%20%3D%20%28mins%20%3F%20mins%2B%22m%22%20%3A%20%22%22%29%20%2B%20secs%20%2B%20%22s%20%22%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20timer%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20this%20doesn%27t%20push%20location%20onto%20history%20stack%20for%20IE%0A%20%20%2F%2F%20for%20which%20a%20hidden%20iframe%20hack%20is%20needed%3A%20load%20page%20into%0A%20%20%2F%2F%20the%20iframe%20with%20script%20that%20set%27s%20parent%27s%20location%2Ehash%0A%20%20%2F%2F%20but%20that%20won%27t%20work%20for%20standalone%20use%20unless%20we%20can%0A%20%20%2F%2F%20create%20the%20page%20dynamically%20via%20a%20javascript%3A%20URL%0A%20%20%2F%2F%20%23%23%23%20use%20history%2EpushState%20if%20available%0A%20%20set%5Flocation%3A%20function%20%28%29%20%7B%0A%20%20%20%20%20var%20uri%20%3D%20w3c%5Fslidy%2Epage%5Faddress%28location%2Ehref%29%3B%0A%20%20%20%20%20var%20hash%20%3D%20%22%23%28%22%20%2B%20%28w3c%5Fslidy%2Eslide%5Fnumber%2B1%29%20%2B%20%22%29%22%3B%0A%0A%20%20%20%20%20if%20%28w3c%5Fslidy%2Eslide%5Fnumber%20%3E%3D%200%29%0A%20%20%20%20%20%20%20uri%20%3D%20uri%20%2B%20hash%3B%0A%0A%20%20%20%20%20if%20%28typeof%28history%2EpushState%29%20%21%3D%20%22undefined%22%29%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20document%2Etitle%20%3D%20w3c%5Fslidy%2Etitle%20%2B%20%22%20%28%22%20%2B%20%28w3c%5Fslidy%2Eslide%5Fnumber%2B1%29%20%2B%20%22%29%22%3B%0A%20%20%20%20%20%20%20history%2EpushState%280%2C%20document%2Etitle%2C%20hash%29%3B%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%5Fnumber%28%29%3B%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Enotify%5Fobservers%28%29%3B%0A%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%7D%0A%0A%20%20%20%20%20if%20%28w3c%5Fslidy%2Eie%20%26%26%20%28w3c%5Fslidy%2Eie6%20%7C%7C%20w3c%5Fslidy%2Eie7%29%29%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Epush%5Fhash%28hash%29%3B%0A%0A%20%20%20%20%20if%20%28uri%20%21%3D%20location%2Ehref%29%20%2F%2F%20%26%26%20%21khtml%0A%20%20%20%20%20%20%20%20location%2Ehref%20%3D%20uri%3B%0A%0A%20%20%20%20%20if%20%28this%2Ekhtml%29%0A%20%20%20%20%20%20%20%20hash%20%3D%20%22%28%22%20%2B%20%28w3c%5Fslidy%2Eslide%5Fnumber%2B1%29%20%2B%20%22%29%22%3B%0A%0A%20%20%20%20%20if%20%28%21this%2Eie%20%26%26%20location%2Ehash%20%21%3D%20hash%20%26%26%20location%2Ehash%20%21%3D%20%22%22%29%0A%20%20%20%20%20%20%20location%2Ehash%20%3D%20hash%3B%0A%0A%20%20%20%20%20document%2Etitle%20%3D%20w3c%5Fslidy%2Etitle%20%2B%20%22%20%28%22%20%2B%20%28w3c%5Fslidy%2Eslide%5Fnumber%2B1%29%20%2B%20%22%29%22%3B%0A%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%5Fnumber%28%29%3B%0A%20%20%20%20%20w3c%5Fslidy%2Enotify%5Fobservers%28%29%3B%0A%20%20%7D%2C%0A%0A%20%20notify%5Fobservers%3A%20function%20%28%29%0A%20%20%7B%0A%20%20%20%20var%20slide%20%3D%20this%2Eslides%5Bthis%2Eslide%5Fnumber%5D%3B%0A%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20this%2Eobservers%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%20%20this%2Eobservers%5Bi%5D%28this%2Eslide%5Fnumber%2B1%2C%20this%2Efind%5Fheading%28slide%29%2EinnerText%2C%20location%2Ehref%29%3B%0A%20%20%7D%2C%0A%0A%20%20add%5Fobserver%3A%20function%20%28observer%29%0A%20%20%7B%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20this%2Eobservers%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28observer%20%3D%3D%20this%2Eobservers%5Bi%5D%29%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20this%2Eobservers%2Epush%28observer%29%3B%0A%20%20%7D%2C%0A%0A%20%20remove%5Fobserver%3A%20function%20%28o%29%0A%20%20%7B%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20this%2Eobservers%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28observer%20%3D%3D%20this%2Eobservers%5Bi%5D%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20this%2Eobservers%2Esplice%28i%2C1%29%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20page%5Faddress%3A%20function%20%28uri%29%20%7B%0A%20%20%20%20var%20i%20%3D%20uri%2EindexOf%28%22%23%22%29%3B%0A%0A%20%20%20%20if%20%28i%20%3C%200%29%0A%20%20%20%20%20%20i%20%3D%20uri%2EindexOf%28%22%2523%22%29%3B%0A%0A%20%20%20%20%2F%2F%20check%20if%20anchor%20is%20entire%20page%0A%0A%20%20%20%20if%20%28i%20%3C%200%29%0A%20%20%20%20%20%20return%20uri%3B%20%20%2F%2F%20yes%0A%0A%20%20%20%20return%20uri%2Esubstr%280%2C%20i%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20only%20used%20for%20IE6%20and%20IE7%0A%20%20on%5Fframe%5Floaded%3A%20function%20%28hash%29%20%7B%0A%20%20%20%20location%2Ehash%20%3D%20hash%3B%0A%20%20%20%20var%20uri%20%3D%20w3c%5Fslidy%2Epage%5Faddress%28location%2Ehref%29%3B%0A%20%20%20%20location%2Ehref%20%3D%20uri%20%2B%20hash%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20history%20hack%20with%20thanks%20to%20Bertrand%20Le%20Roy%0A%20%20push%5Fhash%3A%20function%20%28hash%29%20%7B%0A%20%20%20%20if%20%28hash%20%3D%3D%20%22%22%29%20hash%20%3D%20%22%23%281%29%22%3B%0A%20%20%20%20%20%20window%2Elocation%2Ehash%20%3D%20hash%3B%0A%0A%20%20%20%20var%20doc%20%3D%20document%2EgetElementById%28%22historyFrame%22%29%2EcontentWindow%2Edocument%3B%0A%20%20%20%20doc%2Eopen%28%22javascript%3A%27%3Chtml%3E%3C%2Fhtml%3E%27%22%29%3B%0A%20%20%20%20doc%2Ewrite%28%22%3Chtml%3E%3Chead%3E%3Cscript%20type%3D%5C%22text%2Fjavascript%5C%22%3Ewindow%2Eparent%2Ew3c%5Fslidy%2Eon%5Fframe%5Floaded%28%27%22%2B%0A%20%20%20%20%20%20%28hash%29%20%2B%20%22%27%29%3B%3C%2Fscript%3E%3C%2Fhead%3E%3Cbody%3Ehello%20mum%3C%2Fbody%3E%3C%2Fhtml%3E%22%29%3B%0A%20%20%20%20%20%20doc%2Eclose%28%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20find%20current%20slide%20based%20upon%20location%0A%20%20%2F%2F%20first%20find%20target%20anchor%20and%20then%20look%0A%20%20%2F%2F%20for%20associated%20div%20element%20enclosing%20it%0A%20%20%2F%2F%20finally%20map%20that%20to%20slide%20number%0A%20%20find%5Fslide%5Fnumber%3A%20function%20%28uri%29%20%7B%0A%20%20%20%20%2F%2F%20first%20get%20anchor%20from%20page%20location%0A%0A%20%20%20%20var%20i%20%3D%20uri%2EindexOf%28%22%23%22%29%3B%0A%0A%20%20%20%20%2F%2F%20check%20if%20anchor%20is%20entire%20page%0A%20%20%20%20if%20%28i%20%3C%200%29%0A%20%20%20%20%20%20return%200%3B%20%20%2F%2F%20yes%0A%0A%20%20%20%20var%20anchor%20%3D%20unescape%28uri%2Esubstr%28i%2B1%29%29%3B%0A%0A%20%20%20%20%2F%2F%20now%20use%20anchor%20as%20XML%20ID%20to%20find%20target%0A%20%20%20%20var%20target%20%3D%20document%2EgetElementById%28anchor%29%3B%0A%0A%20%20%20%20if%20%28%21target%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%2F%2F%20does%20anchor%20look%20like%20%22%282%29%22%20for%20slide%202%20%3F%3F%0A%20%20%20%20%20%20%2F%2F%20where%20first%20slide%20is%20%281%29%0A%20%20%20%20%20%20var%20re%20%3D%20%2F%5C%28%28%5Cd%29%2B%5C%29%2F%3B%0A%0A%20%20%20%20%20%20if%20%28anchor%2Ematch%28re%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20var%20num%20%3D%20parseInt%28anchor%2Esubstring%281%2C%20anchor%2Elength%2D1%29%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28num%20%3E%20this%2Eslides%2Elength%29%0A%20%20%20%20%20%20%20%20%20%20num%20%3D%201%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28%2D%2Dnum%20%3C%200%29%0A%20%20%20%20%20%20%20%20%20%20num%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%20return%20num%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20accept%20%5B2%5D%20for%20backwards%20compatibility%0A%20%20%20%20%20%20re%20%3D%20%2F%5C%5B%28%5Cd%29%2B%5C%5D%2F%3B%0A%0A%20%20%20%20%20%20if%20%28anchor%2Ematch%28re%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20var%20num%20%3D%20parseInt%28anchor%2Esubstring%281%2C%20anchor%2Elength%2D1%29%29%3B%0A%0A%20%20%20%20%20%20%20%20%20if%20%28num%20%3E%20this%2Eslides%2Elength%29%0A%20%20%20%20%20%20%20%20%20%20%20%20num%20%3D%201%3B%0A%0A%20%20%20%20%20%20%20%20%20if%20%28%2D%2Dnum%20%3C%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20num%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%20%20return%20num%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20oh%20dear%20unknown%20anchor%0A%20%20%20%20%20%20return%200%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20search%20for%20enclosing%20slide%0A%0A%20%20%20%20while%20%28true%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%2F%2F%20browser%20coerces%20html%20elements%20to%20uppercase%21%0A%20%20%20%20%20%20if%20%28target%2EnodeName%2EtoLowerCase%28%29%20%3D%3D%20%22div%22%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20this%2Ehas%5Fclass%28target%2C%20%22slide%22%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20found%20the%20slide%20element%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20otherwise%20try%20parent%20element%20if%20any%0A%0A%20%20%20%20%20%20target%20%3D%20target%2EparentNode%3B%0A%0A%20%20%20%20%20%20if%20%28%21target%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20return%200%3B%20%20%20%2F%2F%20no%20luck%21%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20for%20%28i%20%3D%200%3B%20i%20%3C%20slides%2Elength%3B%20%2B%2Bi%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28slides%5Bi%5D%20%3D%3D%20target%29%0A%20%20%20%20%20%20%20%20return%20i%3B%20%20%2F%2F%20success%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20oh%20dear%20still%20no%20luck%0A%20%20%20%20return%200%3B%0A%20%20%7D%2C%0A%0A%20%20previous%5Fslide%3A%20function%20%28incremental%29%20%7B%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20slide%3B%0A%0A%20%20%20%20%20%20if%20%28%28incremental%20%7C%7C%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%3D%200%29%20%26%26%20w3c%5Fslidy%2Elast%5Fshown%20%21%3D%20null%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20w3c%5Fslidy%2Ehide%5Fprevious%5Fitem%28w3c%5Fslidy%2Elast%5Fshown%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28false%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if%20%28w3c%5Fslidy%2Eslide%5Fnumber%20%3E%200%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%20w3c%5Fslidy%2Eslide%5Fnumber%20%2D%201%3B%0A%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22visible%22%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20w3c%5Fslidy%2Eprevious%5Fincremental%5Fitem%28null%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28true%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Flocation%28%29%3B%0A%0A%20%20%20%20%20%20if%20%28%21w3c%5Fslidy%2Ens%5Fpos%29%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Erefresh%5Ftoolbar%28200%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20next%5Fslide%3A%20function%20%28incremental%29%20%7B%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20slide%2C%20last%20%3D%20w3c%5Fslidy%2Elast%5Fshown%3B%0A%0A%20%20%20%20%20%20if%20%28incremental%20%7C%7C%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%3D%20w3c%5Fslidy%2Eslides%2Elength%20%2D%201%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20w3c%5Fslidy%2Ereveal%5Fnext%5Fitem%28w3c%5Fslidy%2Elast%5Fshown%29%3B%0A%0A%20%20%20%20%20%20if%20%28%28%21incremental%20%7C%7C%20w3c%5Fslidy%2Elast%5Fshown%20%3D%3D%20null%29%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3C%20w3c%5Fslidy%2Eslides%2Elength%20%2D%201%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%20w3c%5Fslidy%2Eslide%5Fnumber%20%2B%201%3B%0A%20%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22hidden%22%29%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if%20%28%21w3c%5Fslidy%2Elast%5Fshown%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20if%20%28last%20%26%26%20incremental%29%0A%20%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20last%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Flocation%28%29%3B%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28%21w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28w3c%5Fslidy%2Elast%5Fshown%29%29%3B%0A%0A%20%20%20%20%20%20if%20%28%21w3c%5Fslidy%2Ens%5Fpos%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Erefresh%5Ftoolbar%28200%29%3B%0A%20%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20to%20first%20slide%20with%20nothing%20revealed%0A%20%20%2F%2F%20i%2Ee%2E%20state%20at%20start%20of%20presentation%0A%20%20first%5Fslide%3A%20function%20%28%29%20%7B%0A%20%20%20%20%20if%20%28%21w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20var%20slide%3B%0A%0A%20%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Eslide%5Fnumber%20%21%3D%200%29%0A%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%200%3B%0A%20%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22hidden%22%29%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28%0A%20%20%20%20%20%20%20%20%20%21w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28w3c%5Fslidy%2Elast%5Fshown%29%29%3B%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Flocation%28%29%3B%0A%20%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20goto%20last%20slide%20with%20everything%20revealed%0A%20%20%2F%2F%20i%2Ee%2E%20state%20at%20end%20of%20presentation%0A%20%20last%5Fslide%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20slide%3B%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20null%3B%20%2F%2FrevealNextItem%28lastShown%29%3B%0A%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Elast%5Fshown%20%3D%3D%20null%20%26%26%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3C%20w3c%5Fslidy%2Eslides%2Elength%20%2D%201%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%20w3c%5Fslidy%2Eslides%2Elength%20%2D%201%3B%0A%20%20%20%20%20%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22visible%22%29%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20w3c%5Fslidy%2Eprevious%5Fincremental%5Fitem%28null%29%3B%0A%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22visible%22%29%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20w3c%5Fslidy%2Eprevious%5Fincremental%5Fitem%28null%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28true%29%3B%0A%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Flocation%28%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%0A%20%20%2F%2F%20%23%23%23%20check%20this%20and%20consider%20add%2Fremove%20class%0A%20%20set%5Feos%5Fstatus%3A%20function%20%28state%29%20%7B%0A%20%20%20%20if%20%28this%2Eeos%29%0A%20%20%20%20%20%20this%2Eeos%2Estyle%2Ecolor%20%3D%20%28state%20%3F%20%22rgb%28240%2C240%2C240%29%22%20%3A%20%22red%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20first%20slide%20is%200%0A%20%20goto%5Fslide%3A%20function%20%28num%29%20%7B%0A%20%20%20%20%2F%2Falert%28%22going%20to%20slide%20%22%20%2B%20%28num%2B1%29%29%3B%0A%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20w3c%5Fslidy%2Eslide%5Fnumber%20%3D%20num%3B%0A%20%20%20%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20w3c%5Fslidy%2Elast%5Fshown%20%3D%20null%3B%0A%20%20%20%20w3c%5Fslidy%2Eset%5Fvisibility%5Fall%5Fincremental%28%22hidden%22%29%3B%0A%20%20%20%20w3c%5Fslidy%2Eset%5Feos%5Fstatus%28%21w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28w3c%5Fslidy%2Elast%5Fshown%29%29%3B%0A%20%20%20%20document%2Etitle%20%3D%20w3c%5Fslidy%2Etitle%20%2B%20%22%20%28%22%20%2B%20%28w3c%5Fslidy%2Eslide%5Fnumber%2B1%29%20%2B%20%22%29%22%3B%0A%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%5Fnumber%28%29%3B%0A%20%20%7D%2C%0A%0A%0A%20%20show%5Fslide%3A%20function%20%28slide%29%20%7B%0A%20%20%20%20this%2Esync%5Fbackground%28slide%29%3B%0A%20%20%20%20this%2Eremove%5Fclass%28slide%2C%20%22hidden%22%29%3B%0A%0A%20%20%20%20%2F%2F%20work%20around%20IE9%20object%20rendering%20bug%0A%20%20%20%20setTimeout%28%22window%2EscrollTo%280%2C0%29%3B%22%2C%201%29%3B%0A%20%20%7D%2C%0A%0A%20%20hide%5Fslide%3A%20function%20%28slide%29%20%7B%0A%20%20%20%20this%2Eadd%5Fclass%28slide%2C%20%22hidden%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20set%5Ffocus%3A%20function%20%28element%29%0A%20%20%7B%0A%20%20%20%20if%20%28element%29%0A%20%20%20%20%20%20element%2Efocus%28%29%3B%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Ehelp%5Fanchor%2Efocus%28%29%3B%0A%0A%20%20%20%20%20%20setTimeout%28function%28%29%20%7B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehelp%5Fanchor%2Eblur%28%29%3B%0A%20%20%20%20%20%20%7D%2C%201%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20show%20just%20the%20backgrounds%20pertinent%20to%20this%20slide%0A%20%20%2F%2F%20when%20slide%20background%2Dcolor%20is%20transparent%0A%20%20%2F%2F%20this%20should%20now%20work%20with%20rgba%20color%20values%0A%20%20sync%5Fbackground%3A%20function%20%28slide%29%20%7B%0A%20%20%20%20var%20background%3B%0A%20%20%20%20var%20bgColor%3B%0A%0A%20%20%20%20if%20%28slide%2EcurrentStyle%29%0A%20%20%20%20%20%20bgColor%20%3D%20slide%2EcurrentStyle%5B%22backgroundColor%22%5D%3B%0A%20%20%20%20else%20if%20%28document%2EdefaultView%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20styles%20%3D%20document%2EdefaultView%2EgetComputedStyle%28slide%2Cnull%29%3B%0A%0A%20%20%20%20%20%20if%20%28styles%29%0A%20%20%20%20%20%20%20%20bgColor%20%3D%20styles%2EgetPropertyValue%28%22background%2Dcolor%22%29%3B%0A%20%20%20%20%20%20else%20%2F%2F%20broken%20implementation%20probably%20due%20Safari%20or%20Konqueror%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2Falert%28%22defective%20implementation%20of%20getComputedStyle%28%29%22%29%3B%0A%20%20%20%20%20%20%20%20bgColor%20%3D%20%22transparent%22%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%20%20bgColor%20%3D%3D%20%22transparent%22%3B%0A%0A%20%20%20%20if%20%28bgColor%20%3D%3D%20%22transparent%22%20%7C%7C%0A%20%20%20%20%20%20%20%20bgColor%2EindexOf%28%22rgba%22%29%20%3E%3D%200%20%7C%7C%0A%20%20%20%20%20%20%20%20bgColor%2EindexOf%28%22opacity%22%29%20%3E%3D%200%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20slideClass%20%3D%20this%2Eget%5Fclass%5Flist%28slide%29%3B%0A%0A%20%20%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20this%2Ebackgrounds%2Elength%3B%20i%2B%2B%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20background%20%3D%20this%2Ebackgrounds%5Bi%5D%3B%0A%0A%20%20%20%20%20%20%20%20var%20bgClass%20%3D%20this%2Eget%5Fclass%5Flist%28background%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28this%2Ematching%5Fbackground%28slideClass%2C%20bgClass%29%29%0A%20%20%20%20%20%20%20%20%20%20this%2Eremove%5Fclass%28background%2C%20%22hidden%22%29%3B%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20this%2Eadd%5Fclass%28background%2C%20%22hidden%22%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20else%20%2F%2F%20forcibly%20hide%20all%20backgrounds%0A%20%20%20%20%20%20this%2Ehide%5Fbackgrounds%28%29%3B%0A%20%20%7D%2C%0A%0A%20%20hide%5Fbackgrounds%3A%20function%20%28%29%20%7B%0A%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20this%2Ebackgrounds%2Elength%3B%20i%2B%2B%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20background%20%3D%20this%2Ebackgrounds%5Bi%5D%3B%0A%20%20%20%20%20%20this%2Eadd%5Fclass%28background%2C%20%22hidden%22%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20compare%20classes%20for%20slide%20and%20background%0A%20%20matching%5Fbackground%3A%20function%20%28slideClass%2C%20bgClass%29%20%7B%0A%20%20%20%20var%20i%2C%20count%2C%20pattern%2C%20result%3B%0A%0A%20%20%20%20%2F%2F%20define%20pattern%20as%20regular%20expression%0A%20%20%20%20pattern%20%3D%20%2F%5Cw%2B%2Fg%3B%0A%0A%20%20%20%20%2F%2F%20check%20background%20class%20names%0A%20%20%20%20result%20%3D%20bgClass%2Ematch%28pattern%29%3B%0A%0A%20%20%20%20for%20%28i%20%3D%20count%20%3D%200%3B%20i%20%3C%20result%2Elength%3B%20i%2B%2B%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28result%5Bi%5D%20%3D%3D%20%22hidden%22%29%0A%20%20%20%20%20%20%20%20continue%3B%0A%0A%20%20%20%20%20%20if%20%28result%5Bi%5D%20%3D%3D%20%22background%22%29%0A%09continue%3B%0A%0A%20%20%20%20%20%20%2B%2Bcount%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28count%20%3D%3D%200%29%20%20%2F%2F%20default%20match%0A%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%2F%2F%20check%20for%20matches%20and%20place%20result%20in%20array%0A%20%20%20%20result%20%3D%20slideClass%2Ematch%28pattern%29%3B%0A%0A%20%20%20%20%2F%2F%20now%20check%20if%20desired%20name%20is%20present%20for%20background%0A%20%20%20%20for%20%28i%20%3D%20count%20%3D%200%3B%20i%20%3C%20result%2Elength%3B%20i%2B%2B%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28result%5Bi%5D%20%3D%3D%20%22hidden%22%29%0A%20%20%20%20%20%20%20%20continue%3B%0A%0A%20%20%20%20%20%20if%20%28this%2Ehas%5Ftoken%28bgClass%2C%20result%5Bi%5D%29%29%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20false%3B%0A%20%20%7D%2C%0A%0A%20%20resized%3A%20function%20%28%29%20%7B%0A%20%20%20%20%20var%20width%20%3D%200%3B%0A%0A%20%20%20%20%20if%20%28%20typeof%28%20window%2EinnerWidth%20%29%20%3D%3D%20%27number%27%20%29%0A%20%20%20%20%20%20%20width%20%3D%20window%2EinnerWidth%3B%20%20%2F%2F%20Non%20IE%20browser%0A%20%20%20%20%20else%20if%20%28document%2EdocumentElement%20%26%26%20document%2EdocumentElement%2EclientWidth%29%0A%20%20%20%20%20%20%20width%20%3D%20document%2EdocumentElement%2EclientWidth%3B%20%20%2F%2F%20IE6%0A%20%20%20%20%20else%20if%20%28document%2Ebody%20%26%26%20document%2Ebody%2EclientWidth%29%0A%20%20%20%20%20%20%20width%20%3D%20document%2Ebody%2EclientWidth%3B%20%2F%2F%20IE4%0A%0A%20%20%20%20%20var%20height%20%3D%200%3B%0A%0A%20%20%20%20%20if%20%28%20typeof%28%20window%2EinnerHeight%20%29%20%3D%3D%20%27number%27%20%29%0A%20%20%20%20%20%20%20height%20%3D%20window%2EinnerHeight%3B%20%20%2F%2F%20Non%20IE%20browser%0A%20%20%20%20%20else%20if%20%28document%2EdocumentElement%20%26%26%20document%2EdocumentElement%2EclientHeight%29%0A%20%20%20%20%20%20%20height%20%3D%20document%2EdocumentElement%2EclientHeight%3B%20%20%2F%2F%20IE6%0A%20%20%20%20%20else%20if%20%28document%2Ebody%20%26%26%20document%2Ebody%2EclientHeight%29%0A%20%20%20%20%20%20%20height%20%3D%20document%2Ebody%2EclientHeight%3B%20%2F%2F%20IE4%0A%0A%20%20%20%20%20if%20%28height%20%26%26%20%28width%2Fheight%20%3E%201%2E05%2A1024%2F768%29%29%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20width%20%3D%20height%20%2A%201024%2E0%2F768%3B%0A%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%2F%2F%20IE%20fires%20onresize%20even%20when%20only%20font%20size%20is%20changed%21%0A%20%20%20%20%20%2F%2F%20so%20we%20do%20a%20check%20to%20avoid%20blocking%20%3C%20and%20%3E%20actions%0A%20%20%20%20%20if%20%28width%20%21%3D%20w3c%5Fslidy%2Elast%5Fwidth%20%7C%7C%20height%20%21%3D%20w3c%5Fslidy%2Elast%5Fheight%29%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20if%20%28width%20%3E%3D%201100%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Esize%5Findex%20%3D%205%3B%20%20%20%20%2F%2F%204%0A%20%20%20%20%20%20%20else%20if%20%28width%20%3E%3D%201000%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Esize%5Findex%20%3D%204%3B%20%20%20%20%2F%2F%203%0A%20%20%20%20%20%20%20else%20if%20%28width%20%3E%3D%20800%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Esize%5Findex%20%3D%203%3B%20%20%20%20%2F%2F%202%0A%20%20%20%20%20%20%20else%20if%20%28width%20%3E%3D%20600%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Esize%5Findex%20%3D%202%3B%20%20%20%20%2F%2F%201%0A%20%20%20%20%20%20%20else%20if%20%28width%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Esize%5Findex%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%2F%2F%20add%20in%20font%20size%20adjustment%20from%20meta%20element%20e%2Eg%2E%0A%20%20%20%20%20%20%20%2F%2F%20%3Cmeta%20name%3D%22font%2Dsize%2Dadjustment%22%20content%3D%22%2D2%22%20%2F%3E%0A%20%20%20%20%20%20%20%2F%2F%20useful%20when%20slides%20have%20too%20much%20content%20%3B%2D%29%0A%0A%20%20%20%20%20%20%20if%20%280%20%3C%3D%20w3c%5Fslidy%2Esize%5Findex%20%2B%20w3c%5Fslidy%2Esize%5Fadjustment%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Esize%5Findex%20%2B%20w3c%5Fslidy%2Esize%5Fadjustment%20%3C%20w3c%5Fslidy%2Esizes%2Elength%29%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Esize%5Findex%20%3D%20w3c%5Fslidy%2Esize%5Findex%20%2B%20w3c%5Fslidy%2Esize%5Fadjustment%3B%0A%0A%20%20%20%20%20%20%20%2F%2F%20enables%20cross%20browser%20use%20of%20relative%20width%2Fheight%0A%20%20%20%20%20%20%20%2F%2F%20on%20object%20elements%20for%20use%20with%20SVG%20and%20Flash%20media%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Eadjust%5Fobject%5Fdimensions%28width%2C%20height%29%3B%0A%0A%20%20%20%20%20%20%20if%20%28document%2Ebody%2Estyle%2EfontSize%20%21%3D%20w3c%5Fslidy%2Esizes%5Bw3c%5Fslidy%2Esize%5Findex%5D%29%0A%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20document%2Ebody%2Estyle%2EfontSize%20%3D%20w3c%5Fslidy%2Esizes%5Bw3c%5Fslidy%2Esize%5Findex%5D%3B%0A%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fwidth%20%3D%20width%3B%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fheight%20%3D%20height%3B%0A%0A%20%20%20%20%20%20%20%2F%2F%20force%20reflow%20to%20work%20around%20Mozilla%20bug%0A%20%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Ens%5Fpos%29%0A%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%2F%2F%20force%20correct%20positioning%20of%20toolbar%0A%20%20%20%20%20%20%20w3c%5Fslidy%2Erefresh%5Ftoolbar%28200%29%3B%0A%20%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20scrolled%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28w3c%5Fslidy%2Etoolbar%20%26%26%20%21w3c%5Fslidy%2Ens%5Fpos%20%26%26%20%21w3c%5Fslidy%2Eie7%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Ehack%5Foffset%20%3D%20w3c%5Fslidy%2Escroll%5Fx%5Foffset%28%29%3B%0A%20%20%20%20%20%20%2F%2F%20hide%20toolbar%0A%20%20%20%20%20%20w3c%5Fslidy%2Etoolbar%2Estyle%2Edisplay%20%3D%20%22none%22%3B%0A%0A%20%20%20%20%20%20%2F%2F%20make%20it%20reappear%20later%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Escrollhack%20%3D%3D%200%20%26%26%20%21w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20setTimeout%28function%20%28%29%20%7Bw3c%5Fslidy%2Eshow%5Ftoolbar%28%29%3B%20%7D%2C%201000%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Escrollhack%20%3D%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20hide%5Ftoolbar%3A%20function%20%28%29%20%7B%0A%20%20%20%20w3c%5Fslidy%2Eadd%5Fclass%28w3c%5Fslidy%2Etoolbar%2C%20%22hidden%22%29%3B%0A%20%20%20%20window%2Efocus%28%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20used%20to%20ensure%20IE%20refreshes%20toolbar%20in%20correct%20position%0A%20%20refresh%5Ftoolbar%3A%20function%20%28interval%29%20%7B%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Ens%5Fpos%20%26%26%20%21w3c%5Fslidy%2Eie7%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Ftoolbar%28%29%3B%0A%20%20%20%20%20%20setTimeout%28function%20%28%29%20%7Bw3c%5Fslidy%2Eshow%5Ftoolbar%28%29%3B%7D%2C%20interval%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20restores%20toolbar%20after%20short%20delay%0A%20%20show%5Ftoolbar%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28w3c%5Fslidy%2Ewant%5Ftoolbar%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Etoolbar%2Estyle%2Edisplay%20%3D%20%22block%22%3B%0A%0A%20%20%20%20%20%20if%20%28%21w3c%5Fslidy%2Ens%5Fpos%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20adjust%20position%20to%20allow%20for%20scrolling%0A%20%20%20%20%20%20%20%20var%20xoffset%20%3D%20w3c%5Fslidy%2Escroll%5Fx%5Foffset%28%29%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Etoolbar%2Estyle%2Eleft%20%3D%20xoffset%3B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Etoolbar%2Estyle%2Eright%20%3D%20xoffset%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20determine%20vertical%20scroll%20offset%0A%20%20%20%20%20%20%20%20%2F%2Fvar%20yoffset%20%3D%20scrollYOffset%28%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20bottom%20is%20doc%20height%20%2D%20window%20height%20%2D%20scroll%20offset%0A%20%20%20%20%20%20%20%20%2F%2Fvar%20bottom%20%3D%20documentHeight%28%29%20%2D%20lastHeight%20%2D%20yoffset%0A%0A%20%20%20%20%20%20%20%20%2F%2Fif%20%28yoffset%20%3E%200%20%7C%7C%20documentHeight%28%29%20%3E%20lastHeight%29%0A%20%20%20%20%20%20%20%20%2F%2F%20%20%20bottom%20%2B%3D%2016%3B%20%20%2F%2F%20allow%20for%20height%20of%20scrollbar%0A%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Etoolbar%2Estyle%2Ebottom%20%3D%200%3B%20%2F%2Fbottom%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Eremove%5Fclass%28w3c%5Fslidy%2Etoolbar%2C%20%22hidden%22%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20w3c%5Fslidy%2Escrollhack%20%3D%200%3B%0A%0A%0A%20%20%20%20%2F%2F%20set%20the%20keyboard%20focus%20to%20the%20help%20link%20on%20the%0A%20%20%20%20%2F%2F%20toolbar%20to%20ensure%20that%20document%20has%20the%20focus%0A%20%20%20%20%2F%2F%20IE%20doesn%27t%20always%20work%20with%20window%2Efocus%28%29%0A%20%20%20%20%2F%2F%20and%20this%20hack%20has%20benefit%20of%20Enter%20for%20help%0A%0A%20%20%20%20try%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28%21w3c%5Fslidy%2Eopera%29%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eset%5Ffocus%28%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20catch%20%28e%29%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%2F%2F%20invoked%20via%20F%20key%0A%20%20toggle%5Ftoolbar%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Ehas%5Fclass%28w3c%5Fslidy%2Etoolbar%2C%20%22hidden%22%29%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eremove%5Fclass%28w3c%5Fslidy%2Etoolbar%2C%20%22hidden%22%29%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ewant%5Ftoolbar%20%3D%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eadd%5Fclass%28w3c%5Fslidy%2Etoolbar%2C%20%22hidden%22%29%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ewant%5Ftoolbar%20%3D%200%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20scroll%5Fx%5Foffset%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28window%2EpageXOffset%29%0A%20%20%20%20%20%20return%20self%2EpageXOffset%3B%0A%0A%20%20%20%20if%20%28document%2EdocumentElement%20%26%26%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20document%2EdocumentElement%2EscrollLeft%29%0A%20%20%20%20%20%20return%20document%2EdocumentElement%2EscrollLeft%3B%0A%0A%20%20%20%20if%20%28document%2Ebody%29%0A%20%20%20%20%20%20return%20document%2Ebody%2EscrollLeft%3B%0A%0A%20%20%20%20return%200%3B%0A%20%20%7D%2C%0A%0A%20%20scroll%5Fy%5Foffset%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28window%2EpageYOffset%29%0A%20%20%20%20%20%20return%20self%2EpageYOffset%3B%0A%0A%20%20%20%20if%20%28document%2EdocumentElement%20%26%26%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20document%2EdocumentElement%2EscrollTop%29%0A%20%20%20%20%20%20return%20document%2EdocumentElement%2EscrollTop%3B%0A%0A%20%20%20%20if%20%28document%2Ebody%29%0A%20%20%20%20%20%20return%20document%2Ebody%2EscrollTop%3B%0A%0A%20%20%20%20return%200%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20looking%20for%20a%20way%20to%20determine%20height%20of%20slide%20content%0A%20%20%2F%2F%20the%20slide%20itself%20is%20set%20to%20the%20height%20of%20the%20window%0A%20%20optimize%5Ffont%5Fsize%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%0A%20%20%20%20%2F%2Fvar%20dh%20%3D%20documentHeight%28%29%3B%20%2F%2FgetDocHeight%28document%29%3B%0A%20%20%20%20var%20dh%20%3D%20slide%2EscrollHeight%3B%0A%20%20%20%20var%20wh%20%3D%20getWindowHeight%28%29%3B%0A%20%20%20%20var%20u%20%3D%20100%20%2A%20dh%20%2F%20wh%3B%0A%0A%20%20%20%20alert%28%22window%20utilization%20%3D%20%22%20%2B%20u%20%2B%20%22%25%20%28doc%20%22%0A%20%20%20%20%20%20%2B%20dh%20%2B%20%22%20win%20%22%20%2B%20wh%20%2B%20%22%29%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20from%20document%20object%0A%20%20get%5Fdoc%5Fheight%3A%20function%20%28doc%29%20%7B%0A%20%20%20%20if%20%28%21doc%29%0A%20%20%20%20%20%20doc%20%3D%20document%3B%0A%0A%20%20%20%20if%20%28doc%20%26%26%20doc%2Ebody%20%26%26%20doc%2Ebody%2EoffsetHeight%29%0A%20%20%20%20%20%20return%20doc%2Ebody%2EoffsetHeight%3B%20%20%2F%2F%20ns%2Fgecko%20syntax%0A%0A%20%20%20%20if%20%28doc%20%26%26%20doc%2Ebody%20%26%26%20doc%2Ebody%2EscrollHeight%29%0A%20%20%20%20%20%20return%20doc%2Ebody%2EscrollHeight%3B%0A%0A%20%20%20%20alert%28%22couldn%27t%20determine%20document%20height%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20get%5Fwindow%5Fheight%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28%20typeof%28%20window%2EinnerHeight%20%29%20%3D%3D%20%27number%27%20%29%0A%20%20%20%20%20%20return%20window%2EinnerHeight%3B%20%20%2F%2F%20Non%20IE%20browser%0A%0A%20%20%20%20if%20%28document%2EdocumentElement%20%26%26%20document%2EdocumentElement%2EclientHeight%29%0A%20%20%20%20%20%20return%20document%2EdocumentElement%2EclientHeight%3B%20%20%2F%2F%20IE6%0A%0A%20%20%20%20if%20%28document%2Ebody%20%26%26%20document%2Ebody%2EclientHeight%29%0A%20%20%20%20%20%20return%20document%2Ebody%2EclientHeight%3B%20%2F%2F%20IE4%0A%20%20%7D%2C%0A%0A%20%20document%5Fheight%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20sh%2C%20oh%3B%0A%0A%20%20%20%20sh%20%3D%20document%2Ebody%2EscrollHeight%3B%0A%20%20%20%20oh%20%3D%20document%2Ebody%2EoffsetHeight%3B%0A%0A%20%20%20%20if%20%28sh%20%26%26%20oh%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20return%20%28sh%20%3E%20oh%20%3F%20sh%20%3A%20oh%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20no%20idea%21%0A%20%20%20%20return%200%3B%0A%20%20%7D%2C%0A%0A%20%20smaller%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28w3c%5Fslidy%2Esize%5Findex%20%3E%200%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%2D%2Dw3c%5Fslidy%2Esize%5Findex%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20w3c%5Fslidy%2Etoolbar%2Estyle%2Edisplay%20%3D%20%22none%22%3B%0A%20%20%20%20document%2Ebody%2Estyle%2EfontSize%20%3D%20w3c%5Fslidy%2Esizes%5Bw3c%5Fslidy%2Esize%5Findex%5D%3B%0A%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20setTimeout%28function%20%28%29%20%7Bw3c%5Fslidy%2Eshow%5Ftoolbar%28%29%3B%20%7D%2C%2050%29%3B%0A%20%20%7D%2C%0A%0A%20%20bigger%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28w3c%5Fslidy%2Esize%5Findex%20%3C%20w3c%5Fslidy%2Esizes%2Elength%20%2D%201%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%2B%2Bw3c%5Fslidy%2Esize%5Findex%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20w3c%5Fslidy%2Etoolbar%2Estyle%2Edisplay%20%3D%20%22none%22%3B%0A%20%20%20%20document%2Ebody%2Estyle%2EfontSize%20%3D%20w3c%5Fslidy%2Esizes%5Bw3c%5Fslidy%2Esize%5Findex%5D%3B%0A%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%20%20%20%20w3c%5Fslidy%2Ehide%5Fslide%28slide%29%3B%0A%20%20%20%20w3c%5Fslidy%2Eshow%5Fslide%28slide%29%3B%0A%20%20%20%20setTimeout%28function%20%28%29%20%7Bw3c%5Fslidy%2Eshow%5Ftoolbar%28%29%3B%20%7D%2C%2050%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20enables%20cross%20browser%20use%20of%20relative%20width%2Fheight%0A%20%20%2F%2F%20on%20object%20elements%20for%20use%20with%20SVG%20and%20Flash%20media%0A%20%20%2F%2F%20with%20thanks%20to%20Ivan%20Herman%20for%20the%20suggestion%0A%20%20adjust%5Fobject%5Fdimensions%3A%20function%20%28width%2C%20height%29%20%7B%0A%20%20%20%20for%28%20var%20i%20%3D%200%3B%20i%20%3C%20w3c%5Fslidy%2Eobjects%2Elength%3B%20i%2B%2B%20%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20obj%20%3D%20this%2Eobjects%5Bi%5D%3B%0A%20%20%20%20%20%20var%20mimeType%20%3D%20obj%2EgetAttribute%28%22type%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28mimeType%20%3D%3D%20%22image%2Fsvg%2Bxml%22%20%7C%7C%20mimeType%20%3D%3D%20%22application%2Fx%2Dshockwave%2Dflash%22%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20%28%20%21obj%2EinitialWidth%20%29%20%0A%20%20%20%20%20%20%20%20%20%20obj%2EinitialWidth%20%3D%20obj%2EgetAttribute%28%22width%22%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28%20%21obj%2EinitialHeight%20%29%20%0A%20%20%20%20%20%20%20%20%20%20obj%2EinitialHeight%20%3D%20obj%2EgetAttribute%28%22height%22%29%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28%20obj%2EinitialWidth%20%26%26%20obj%2EinitialWidth%2EcharAt%28obj%2EinitialWidth%2Elength%2D1%29%20%3D%3D%20%22%25%22%20%29%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20w%20%3D%20parseInt%28obj%2EinitialWidth%2Eslice%280%2C%20obj%2EinitialWidth%2Elength%2D1%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20var%20newW%20%3D%20width%20%2A%20%28w%2F100%2E0%29%3B%0A%20%20%20%20%20%20%20%20%20%20obj%2EsetAttribute%28%22width%22%2CnewW%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20%28%20obj%2EinitialHeight%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20obj%2EinitialHeight%2EcharAt%28obj%2EinitialHeight%2Elength%2D1%29%20%3D%3D%20%22%25%22%20%29%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20h%20%3D%20parseInt%28obj%2EinitialHeight%2Eslice%280%2C%20obj%2EinitialHeight%2Elength%2D1%29%29%3B%0A%20%20%20%20%20%20%20%20%20%20var%20newH%20%3D%20height%20%2A%20%28h%2F100%2E0%29%3B%0A%20%20%20%20%20%20%20%20%20%20obj%2EsetAttribute%28%22height%22%2C%20newH%29%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20needed%20for%20Opera%20to%20inhibit%20default%20behavior%0A%20%20%2F%2F%20since%20Opera%20delivers%20keyPress%20even%20if%20keyDown%0A%20%20%2F%2F%20was%20cancelled%0A%20%20key%5Fpress%3A%20function%20%28event%29%20%7B%0A%20%20%20%20if%20%28%21event%29%0A%20%20%20%20%20%20event%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Ekey%5Fwanted%29%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%0A%20%20%20%20return%20true%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20%20See%20e%2Eg%2E%20http%3A%2F%2Fwww%2Equirksmode%2Eorg%2Fjs%2Fevents%2Fkeys%2Ehtml%20for%20keycodes%0A%20%20key%5Fdown%3A%20function%20%28event%29%20%7B%0A%20%20%20%20var%20key%2C%20target%2C%20tag%3B%0A%0A%20%20%20%20w3c%5Fslidy%2Ekey%5Fwanted%20%3D%20true%3B%0A%0A%20%20%20%20if%20%28%21event%29%0A%20%20%20%20%20%20event%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20%2F%2F%20kludge%20around%20NS%2FIE%20differences%20%0A%20%20%20%20if%20%28window%2Eevent%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20key%20%3D%20window%2Eevent%2EkeyCode%3B%0A%20%20%20%20%20%20target%20%3D%20window%2Eevent%2EsrcElement%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28event%2Ewhich%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20key%20%3D%20event%2Ewhich%3B%0A%20%20%20%20%20%20target%20%3D%20event%2Etarget%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%20%20return%20true%3B%20%2F%2F%20Yikes%21%20unknown%20browser%0A%0A%20%20%20%20%2F%2F%20ignore%20event%20if%20key%20value%20is%20zero%0A%20%20%20%20%2F%2F%20as%20for%20alt%20on%20Opera%20and%20Konqueror%0A%20%20%20%20if%20%28%21key%29%0A%20%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%2F%2F%20avoid%20interfering%20with%20keystroke%0A%20%20%20%20%2F%2F%20behavior%20for%20non%2Dslidy%20chrome%20elements%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Eslidy%5Fchrome%28target%29%20%26%26%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Especial%5Felement%28target%29%29%0A%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%2F%2F%20check%20for%20concurrent%20control%2Fcommand%2Falt%20key%0A%20%20%20%20%2F%2F%20but%20are%20these%20only%20present%20on%20mouse%20events%3F%0A%0A%20%20%20%20if%20%28event%2EctrlKey%20%7C%7C%20event%2EaltKey%20%7C%7C%20event%2EmetaKey%29%0A%20%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%2F%2F%20dismiss%20table%20of%20contents%20if%20visible%0A%20%20%20%20if%20%28w3c%5Fslidy%2Eis%5Fshown%5Ftoc%28%29%20%26%26%20key%20%21%3D%209%20%26%26%20key%20%21%3D%2016%20%26%26%20key%20%21%3D%2038%20%26%26%20key%20%21%3D%2040%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Ehide%5Ftable%5Fof%5Fcontents%28true%29%3B%0A%0A%20%20%20%20%20%20if%20%28key%20%3D%3D%2027%20%7C%7C%20key%20%3D%3D%2084%20%7C%7C%20key%20%3D%3D%2067%29%0A%20%20%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28key%20%3D%3D%2034%29%20%2F%2F%20Page%20Down%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Enext%5Fslide%28false%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2033%29%20%2F%2F%20Page%20Up%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Eview%5Fall%29%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%20%20w3c%5Fslidy%2Eprevious%5Fslide%28false%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2032%29%20%2F%2F%20space%20bar%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Enext%5Fslide%28true%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2037%29%20%2F%2F%20Left%20arrow%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Eprevious%5Fslide%28%21event%2EshiftKey%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2036%29%20%2F%2F%20Home%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Efirst%5Fslide%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2035%29%20%2F%2F%20End%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fslide%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2039%29%20%2F%2F%20Right%20arrow%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Enext%5Fslide%28%21event%2EshiftKey%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2013%29%20%2F%2F%20Enter%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Eoutline%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Eoutline%2Evisible%29%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Efold%28w3c%5Fslidy%2Eoutline%29%3B%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eunfold%28w3c%5Fslidy%2Eoutline%29%3B%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%20188%29%20%20%2F%2F%20%3C%20for%20smaller%20fonts%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Esmaller%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%20190%29%20%20%2F%2F%20%3E%20for%20larger%20fonts%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Ebigger%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%20189%20%7C%7C%20key%20%3D%3D%20109%29%20%20%2F%2F%20%2D%20for%20smaller%20fonts%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Esmaller%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%20187%20%7C%7C%20key%20%3D%3D%20191%20%7C%7C%20key%20%3D%3D%20107%29%20%20%2F%2F%20%3D%20%2B%20%20for%20larger%20fonts%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Ebigger%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2083%29%20%20%2F%2F%20S%20for%20smaller%20fonts%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Esmaller%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2066%29%20%20%2F%2F%20B%20for%20larger%20fonts%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Ebigger%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2090%29%20%20%2F%2F%20Z%20for%20last%20slide%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Elast%5Fslide%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2070%29%20%20%2F%2F%20F%20for%20toggle%20toolbar%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Etoggle%5Ftoolbar%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2065%29%20%20%2F%2F%20A%20for%20toggle%20view%20single%2Fall%20slides%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Etoggle%5Fview%28%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2075%29%20%20%2F%2F%20toggle%20action%20of%20left%20click%20for%20next%20page%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Emouse%5Fclick%5Fenabled%20%3D%20%21w3c%5Fslidy%2Emouse%5Fclick%5Fenabled%3B%0A%20%20%20%20%20%20var%20alert%5Fmsg%20%3D%20%28w3c%5Fslidy%2Emouse%5Fclick%5Fenabled%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22enabled%22%20%3A%20%22disabled%22%29%20%2B%20%20%22%20mouse%20click%20advance%22%3B%0A%0A%20%20%20%20%20%20alert%28w3c%5Fslidy%2Elocalize%28alert%5Fmsg%29%29%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2084%20%7C%7C%20key%20%3D%3D%2067%29%20%20%2F%2F%20T%20or%20C%20for%20table%20of%20contents%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Etoc%29%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Etoggle%5Ftable%5Fof%5Fcontents%28%29%3B%0A%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28key%20%3D%3D%2072%29%20%2F%2F%20H%20for%20help%0A%20%20%20%20%7B%0A%20%20%20%20%20%20window%2Elocation%20%3D%20w3c%5Fslidy%2Ehelp%5Fpage%3B%0A%20%20%20%20%20%20return%20w3c%5Fslidy%2Ecancel%28event%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20%2F%2Felse%20alert%28%22key%20code%20is%20%22%2B%20key%29%3B%0A%0A%20%20%20%20return%20true%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20safe%20for%20both%20text%2Fhtml%20and%20application%2Fxhtml%2Bxml%0A%20%20create%5Felement%3A%20function%20%28name%29%20%7B%0A%20%20%20%20if%20%28this%2Exhtml%20%26%26%20%28typeof%20document%2EcreateElementNS%20%21%3D%20%27undefined%27%29%29%0A%20%20%20%20%20%20return%20document%2EcreateElementNS%28%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F1999%2Fxhtml%22%2C%20name%29%0A%0A%20%20%20%20return%20document%2EcreateElement%28name%29%3B%0A%20%20%7D%2C%0A%0A%20%20get%5Felement%5Fstyle%3A%20function%20%28elem%2C%20IEStyleProp%2C%20CSSStyleProp%29%20%7B%0A%20%20%20%20if%20%28elem%2EcurrentStyle%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20return%20elem%2EcurrentStyle%5BIEStyleProp%5D%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28window%2EgetComputedStyle%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20compStyle%20%3D%20window%2EgetComputedStyle%28elem%2C%20%22%22%29%3B%0A%20%20%20%20%20%20return%20compStyle%2EgetPropertyValue%28CSSStyleProp%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20%22%22%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20the%20string%20str%20is%20a%20whitespace%20separated%20list%20of%20tokens%0A%20%20%2F%2F%20test%20if%20str%20contains%20a%20particular%20token%2C%20e%2Eg%2E%20%22slide%22%0A%20%20has%5Ftoken%3A%20function%20%28str%2C%20token%29%20%7B%0A%20%20%20%20if%20%28str%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%2F%2F%20define%20pattern%20as%20regular%20expression%0A%20%20%20%20%20%20var%20pattern%20%3D%20%2F%5Cw%2B%2Fg%3B%0A%0A%20%20%20%20%20%20%2F%2F%20check%20for%20matches%0A%20%20%20%20%20%20%2F%2F%20place%20result%20in%20array%0A%20%20%20%20%20%20var%20result%20%3D%20str%2Ematch%28pattern%29%3B%0A%0A%20%20%20%20%20%20%2F%2F%20now%20check%20if%20desired%20token%20is%20present%0A%20%20%20%20%20%20for%20%28var%20i%20%3D%200%3B%20i%20%3C%20result%2Elength%3B%20i%2B%2B%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20%28result%5Bi%5D%20%3D%3D%20token%29%0A%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20false%3B%0A%20%20%7D%2C%0A%0A%20%20get%5Fclass%5Flist%3A%20function%20%28element%29%20%7B%0A%20%20%20%20if%20%28typeof%20element%2EclassName%20%21%3D%20%27undefined%27%29%0A%20%20%20%20%20%20return%20element%2EclassName%3B%0A%0A%20%20%20%20return%20element%2EgetAttribute%28%22class%22%29%3B%0A%20%20%7D%2C%0A%0A%20%20has%5Fclass%3A%20function%20%28element%2C%20name%29%20%7B%0A%20%20%20%20if%20%28element%2EnodeType%20%21%3D%201%29%0A%20%20%20%20%20%20return%20false%3B%0A%0A%20%20%20%20var%20regexp%20%3D%20new%20RegExp%28%22%28%5E%7C%20%29%22%20%2B%20name%20%2B%20%22%5CW%2A%22%29%3B%0A%0A%20%20%20%20if%20%28typeof%20element%2EclassName%20%21%3D%20%27undefined%27%29%0A%20%20%20%20%20%20return%20regexp%2Etest%28element%2EclassName%29%3B%0A%0A%20%20%20%20return%20regexp%2Etest%28element%2EgetAttribute%28%22class%22%29%29%3B%0A%20%20%7D%2C%0A%0A%20%20remove%5Fclass%3A%20function%20%28element%2C%20name%29%20%7B%0A%20%20%20%20var%20regexp%20%3D%20new%20RegExp%28%22%28%5E%7C%20%29%22%20%2B%20name%20%2B%20%22%5CW%2A%22%29%3B%0A%20%20%20%20var%20clsval%20%3D%20%22%22%3B%0A%0A%20%20%20%20if%20%28typeof%20element%2EclassName%20%21%3D%20%27undefined%27%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20clsval%20%3D%20element%2EclassName%3B%0A%0A%20%20%20%20%20%20if%20%28clsval%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20clsval%20%3D%20clsval%2Ereplace%28regexp%2C%20%22%22%29%3B%0A%20%20%20%20%20%20%20%20element%2EclassName%20%3D%20clsval%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%7B%0A%20%20%20%20%20%20clsval%20%3D%20element%2EgetAttribute%28%22class%22%29%3B%0A%0A%20%20%20%20%20%20if%20%28clsval%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20clsval%20%3D%20clsval%2Ereplace%28regexp%2C%20%22%22%29%3B%0A%20%20%20%20%20%20%20%20element%2EsetAttribute%28%22class%22%2C%20clsval%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20add%5Fclass%3A%20function%20%28element%2C%20name%29%20%7B%0A%20%20%20%20if%20%28%21this%2Ehas%5Fclass%28element%2C%20name%29%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28typeof%20element%2EclassName%20%21%3D%20%27undefined%27%29%0A%20%20%20%20%20%20%20%20element%2EclassName%20%2B%3D%20%22%20%22%20%2B%20name%3B%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20var%20clsval%20%3D%20element%2EgetAttribute%28%22class%22%29%3B%0A%20%20%20%20%20%20%20%20clsval%20%3D%20clsval%20%3F%20clsval%20%2B%20%22%20%22%20%2B%20name%20%3A%20name%3B%0A%20%20%20%20%20%20%20%20element%2EsetAttribute%28%22class%22%2C%20clsval%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20HTML%20elements%20that%20can%20be%20used%20with%20class%3D%22incremental%22%0A%20%20%2F%2F%20note%20that%20you%20can%20also%20put%20the%20class%20on%20containers%20like%0A%20%20%2F%2F%20up%2C%20ol%2C%20dl%2C%20and%20div%20to%20make%20their%20contents%20appear%0A%20%20%2F%2F%20incrementally%2E%20Upper%20case%20is%20used%20since%20this%20is%20what%0A%20%20%2F%2F%20browsers%20report%20for%20HTML%20node%20names%20%28text%2Fhtml%29%2E%0A%20%20incremental%5Felements%3A%20null%2C%0A%20%20okay%5Ffor%5Fincremental%3A%20function%20%28name%29%20%7B%0A%20%20%20%20if%20%28%21this%2Eincremental%5Felements%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20inclist%20%3D%20new%20Array%28%29%3B%0A%20%20%20%20%20%20inclist%5B%22p%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22pre%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22li%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22blockquote%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22dt%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22dd%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22h2%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22h3%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22h4%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22h5%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22h6%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22span%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22address%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22table%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22tr%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22th%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22td%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22img%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20inclist%5B%22object%22%5D%20%3D%20true%3B%0A%20%20%20%20%20%20this%2Eincremental%5Felements%20%3D%20inclist%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20this%2Eincremental%5Felements%5Bname%2EtoLowerCase%28%29%5D%3B%0A%20%20%7D%2C%0A%0A%20%20next%5Fincremental%5Fitem%3A%20function%20%28node%29%20%7B%0A%20%20%20%20var%20br%20%3D%20this%2Eis%5Fxhtml%20%3F%20%22br%22%20%3A%20%22BR%22%3B%0A%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%0A%20%20%20%20for%20%28%3B%3B%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20node%20%3D%20w3c%5Fslidy%2Enext%5Fnode%28slide%2C%20node%29%3B%0A%0A%20%20%20%20%20%20if%20%28node%20%3D%3D%20null%20%7C%7C%20node%2EparentNode%20%3D%3D%20null%29%0A%20%20%20%20%20%20%20%20break%3B%0A%0A%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%29%20%20%2F%2F%20ELEMENT%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20%28node%2EnodeName%20%3D%3D%20br%29%0A%20%20%20%20%20%20%20%20%20%20continue%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Ehas%5Fclass%28node%2C%20%22incremental%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%26%26%20w3c%5Fslidy%2Eokay%5Ffor%5Fincremental%28node%2EnodeName%29%29%0A%20%20%20%20%20%20%20%20%20%20return%20node%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Ehas%5Fclass%28node%2EparentNode%2C%20%22incremental%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%26%26%20%21w3c%5Fslidy%2Ehas%5Fclass%28node%2C%20%22non%2Dincremental%22%29%29%0A%20%20%20%20%20%20%20%20%20%20return%20node%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20node%3B%0A%20%20%7D%2C%0A%0A%20%20previous%5Fincremental%5Fitem%3A%20function%20%28node%29%20%7B%0A%20%20%20%20var%20br%20%3D%20this%2Eis%5Fxhtml%20%3F%20%22br%22%20%3A%20%22BR%22%3B%0A%20%20%20%20var%20slide%20%3D%20w3c%5Fslidy%2Eslides%5Bw3c%5Fslidy%2Eslide%5Fnumber%5D%3B%0A%0A%20%20%20%20for%20%28%3B%3B%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20node%20%3D%20w3c%5Fslidy%2Eprevious%5Fnode%28slide%2C%20node%29%3B%0A%0A%20%20%20%20%20%20if%20%28node%20%3D%3D%20null%20%7C%7C%20node%2EparentNode%20%3D%3D%20null%29%0A%20%20%20%20%20%20%20%20break%3B%0A%0A%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20if%20%28node%2EnodeName%20%3D%3D%20br%29%0A%20%20%20%20%20%20%20%20%20%20continue%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Ehas%5Fclass%28node%2C%20%22incremental%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%26%26%20w3c%5Fslidy%2Eokay%5Ffor%5Fincremental%28node%2EnodeName%29%29%0A%20%20%20%20%20%20%20%20%20%20return%20node%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28w3c%5Fslidy%2Ehas%5Fclass%28node%2EparentNode%2C%20%22incremental%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%26%26%20%21w3c%5Fslidy%2Ehas%5Fclass%28node%2C%20%22non%2Dincremental%22%29%29%0A%20%20%20%20%20%20%20%20%20%20return%20node%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20node%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20set%20visibility%20for%20all%20elements%20on%20current%20slide%20with%0A%20%20%2F%2F%20a%20parent%20element%20with%20attribute%20class%3D%22incremental%22%0A%20%20set%5Fvisibility%5Fall%5Fincremental%3A%20function%20%28value%29%20%7B%0A%20%20%20%20var%20node%20%3D%20this%2Enext%5Fincremental%5Fitem%28null%29%3B%0A%0A%20%20%20%20if%20%28value%20%3D%3D%20%22hidden%22%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20while%20%28node%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eadd%5Fclass%28node%2C%20%22invisible%22%29%3B%0A%20%20%20%20%20%20%20%20node%20%3D%20w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28node%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20else%20%2F%2F%20value%20%3D%3D%20%22visible%22%0A%20%20%20%20%7B%0A%20%20%20%20%20%20while%20%28node%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20w3c%5Fslidy%2Eremove%5Fclass%28node%2C%20%22invisible%22%29%3B%0A%20%20%20%20%20%20%20%20node%20%3D%20w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28node%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20reveal%20the%20next%20hidden%20item%20on%20the%20slide%0A%20%20%2F%2F%20node%20is%20null%20or%20the%20node%20that%20was%20last%20revealed%0A%20%20reveal%5Fnext%5Fitem%3A%20function%20%28node%29%20%7B%0A%20%20%20%20node%20%3D%20w3c%5Fslidy%2Enext%5Fincremental%5Fitem%28node%29%3B%0A%0A%20%20%20%20if%20%28node%20%26%26%20node%2EnodeType%20%3D%3D%201%29%20%20%2F%2F%20an%20element%0A%20%20%20%20%20%20w3c%5Fslidy%2Eremove%5Fclass%28node%2C%20%22invisible%22%29%3B%0A%0A%20%20%20%20return%20node%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20exact%20inverse%20of%20revealNextItem%28node%29%0A%20%20hide%5Fprevious%5Fitem%3A%20function%20%28node%29%20%7B%0A%20%20%20%20if%20%28node%20%26%26%20node%2EnodeType%20%3D%3D%201%29%20%20%2F%2F%20an%20element%0A%20%20%20%20%20%20w3c%5Fslidy%2Eadd%5Fclass%28node%2C%20%22invisible%22%29%3B%0A%0A%20%20%20%20return%20this%2Eprevious%5Fincremental%5Fitem%28node%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20left%20to%20right%20traversal%20of%20root%27s%20content%0A%20%20next%5Fnode%3A%20function%20%28root%2C%20node%29%20%7B%0A%20%20%20%20if%20%28node%20%3D%3D%20null%29%0A%20%20%20%20%20%20return%20root%2EfirstChild%3B%0A%0A%20%20%20%20if%20%28node%2EfirstChild%29%0A%20%20%20%20%20%20return%20node%2EfirstChild%3B%0A%0A%20%20%20%20if%20%28node%2EnextSibling%29%0A%20%20%20%20%20%20return%20node%2EnextSibling%3B%0A%0A%20%20%20%20for%20%28%3B%3B%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20node%20%3D%20node%2EparentNode%3B%0A%0A%20%20%20%20%20%20if%20%28%21node%20%7C%7C%20node%20%3D%3D%20root%29%0A%20%20%20%20%20%20%20%20break%3B%0A%0A%20%20%20%20%20%20if%20%28node%20%26%26%20node%2EnextSibling%29%0A%20%20%20%20%20%20%20%20return%20node%2EnextSibling%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20null%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20right%20to%20left%20traversal%20of%20root%27s%20content%0A%20%20previous%5Fnode%3A%20function%20%28root%2C%20node%29%20%7B%0A%20%20%20%20if%20%28node%20%3D%3D%20null%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20node%20%3D%20root%2ElastChild%3B%0A%0A%20%20%20%20%20%20if%20%28node%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20while%20%28node%2ElastChild%29%0A%20%20%20%20%20%20%20%20%20%20node%20%3D%20node%2ElastChild%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20node%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28node%2EpreviousSibling%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20node%20%3D%20node%2EpreviousSibling%3B%0A%0A%20%20%20%20%20%20while%20%28node%2ElastChild%29%0A%20%20%20%20%20%20%20%20node%20%3D%20node%2ElastChild%3B%0A%0A%20%20%20%20%20%20return%20node%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28node%2EparentNode%20%21%3D%20root%29%0A%20%20%20%20%20%20return%20node%2EparentNode%3B%0A%0A%20%20%20%20return%20null%3B%0A%20%20%7D%2C%0A%0A%20%20previous%5Fsibling%5Felement%3A%20function%20%28el%29%20%7B%0A%20%20%20%20el%20%3D%20el%2EpreviousSibling%3B%0A%0A%20%20%20%20while%20%28el%20%26%26%20el%2EnodeType%20%21%3D%201%29%0A%20%20%20%20%20%20el%20%3D%20el%2EpreviousSibling%3B%0A%0A%20%20%20%20return%20el%3B%0A%20%20%7D%2C%0A%0A%20%20next%5Fsibling%5Felement%3A%20function%20%28el%29%20%7B%0A%20%20%20%20el%20%3D%20el%2EnextSibling%3B%0A%0A%20%20%20%20while%20%28el%20%26%26%20el%2EnodeType%20%21%3D%201%29%0A%20%20%20%20%20%20el%20%3D%20el%2EnextSibling%3B%0A%0A%20%20%20%20return%20el%3B%0A%20%20%7D%2C%0A%0A%20%20first%5Fchild%5Felement%3A%20function%20%28el%29%20%7B%0A%20%20%20%20var%20node%3B%0A%0A%20%20%20%20for%20%28node%20%3D%20el%2EfirstChild%3B%20node%3B%20node%20%3D%20node%2EnextSibling%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%29%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20node%3B%0A%20%20%7D%2C%0A%0A%20%20first%5Ftag%3A%20function%20%28element%2C%20tag%29%20%7B%0A%20%20%20%20var%20node%3B%0A%0A%20%20%20%20if%20%28%21this%2Eis%5Fxhtml%29%0A%20%20%20%20%20%20tag%20%3D%20tag%2EtoUpperCase%28%29%3B%0A%0A%20%20%20%20for%20%28node%20%3D%20element%2EfirstChild%3B%20node%3B%20node%20%3D%20node%2EnextSibling%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28node%2EnodeType%20%3D%3D%201%20%26%26%20node%2EnodeName%20%3D%3D%20tag%29%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20node%3B%0A%20%20%7D%2C%0A%0A%20%20hide%5Fselection%3A%20function%20%28%29%20%7B%0A%20%20%20%20if%20%28window%2EgetSelection%29%20%2F%2F%20Firefox%2C%20Chromium%2C%20Safari%2C%20Opera%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20selection%20%3D%20window%2EgetSelection%28%29%3B%0A%0A%20%20%20%20%20%20if%20%28selection%2ErangeCount%20%3E%200%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20var%20range%20%3D%20selection%2EgetRangeAt%280%29%3B%0A%20%20%20%20%20%20%20%20range%2Ecollapse%20%28false%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20else%20%2F%2F%20Internet%20Explorer%0A%20%20%20%20%7B%0A%20%20%20%20%20%20var%20textRange%20%3D%20document%2Eselection%2EcreateRange%20%28%29%3B%0A%20%20%20%20%20%20textRange%2Ecollapse%20%28false%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20get%5Fselected%5Ftext%3A%20function%20%28%29%20%7B%0A%20%20%20%20try%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28window%2EgetSelection%29%0A%20%20%20%20%20%20%20%20return%20window%2EgetSelection%28%29%2EtoString%28%29%3B%0A%0A%20%20%20%20%20%20if%20%28document%2EgetSelection%29%0A%20%20%20%20%20%20%20%20return%20document%2EgetSelection%28%29%2EtoString%28%29%3B%0A%0A%20%20%20%20%20%20if%20%28document%2Eselection%29%0A%20%20%20%20%20%20%20%20return%20document%2Eselection%2EcreateRange%28%29%2Etext%3B%0A%20%20%20%20%7D%0A%20%20%20%20catch%20%28e%29%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20%22%22%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20make%20note%20of%20length%20of%20selected%20text%0A%20%20%2F%2F%20as%20this%20evaluates%20to%20zero%20in%20click%20event%0A%20%20mouse%5Fbutton%5Fup%3A%20function%20%28e%29%20%7B%0A%20%20%20%20w3c%5Fslidy%2Eselected%5Ftext%5Flen%20%3D%20w3c%5Fslidy%2Eget%5Fselected%5Ftext%28%29%2Elength%3B%0A%20%20%7D%2C%0A%0A%20%20mouse%5Fbutton%5Fdown%3A%20function%20%28e%29%20%7B%0A%20%20%20%20w3c%5Fslidy%2Eselected%5Ftext%5Flen%20%3D%20w3c%5Fslidy%2Eget%5Fselected%5Ftext%28%29%2Elength%3B%0A%20%20%20%20w3c%5Fslidy%2Emouse%5Fx%20%3D%20e%2EclientX%3B%0A%20%20%20%20w3c%5Fslidy%2Emouse%5Fy%20%3D%20e%2EclientY%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20right%20mouse%20button%20click%20is%20reserved%20for%20context%20menus%0A%20%20%2F%2F%20it%20is%20more%20reliable%20to%20detect%20rightclick%20than%20leftclick%0A%20%20mouse%5Fbutton%5Fclick%3A%20function%20%28e%29%20%7B%0A%20%20%20%20if%20%28%21e%29%0A%20%20%20%20%20%20var%20e%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20if%20%28Math%2Eabs%28e%2EclientX%20%2Dw3c%5Fslidy%2Emouse%5Fx%29%20%2B%0A%20%20%20%20%20%20%20%20Math%2Eabs%28e%2EclientY%20%2Dw3c%5Fslidy%2Emouse%5Fy%29%20%3E%2010%29%0A%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20if%20%28w3c%5Fslidy%2Eselected%5Ftext%5Flen%20%3E%200%29%0A%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20var%20rightclick%20%3D%20false%3B%0A%20%20%20%20var%20leftclick%20%3D%20false%3B%0A%20%20%20%20var%20middleclick%20%3D%20false%3B%0A%20%20%20%20var%20target%3B%0A%0A%20%20%20%20if%20%28%21e%29%0A%20%20%20%20%20%20var%20e%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20if%20%28e%2Etarget%29%0A%20%20%20%20%20%20target%20%3D%20e%2Etarget%3B%0A%20%20%20%20else%20if%20%28e%2EsrcElement%29%0A%20%20%20%20%20%20target%20%3D%20e%2EsrcElement%3B%0A%0A%20%20%20%20%2F%2F%20work%20around%20Safari%20bug%0A%20%20%20%20if%20%28target%2EnodeType%20%3D%3D%203%29%0A%20%20%20%20%20%20target%20%3D%20target%2EparentNode%3B%0A%0A%20%20%20%20if%20%28e%2Ewhich%29%20%2F%2F%20all%20browsers%20except%20IE%0A%20%20%20%20%7B%0A%20%20%20%20%20%20leftclick%20%3D%20%28e%2Ewhich%20%3D%3D%201%29%3B%0A%20%20%20%20%20%20middleclick%20%3D%20%28e%2Ewhich%20%3D%3D%202%29%3B%0A%20%20%20%20%20%20rightclick%20%3D%20%28e%2Ewhich%20%3D%3D%203%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20%28e%2Ebutton%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%2F%2F%20Konqueror%20gives%201%20for%20left%2C%204%20for%20middle%0A%20%20%20%20%20%20%2F%2F%20IE6%20gives%200%20for%20left%20and%20not%201%20as%20I%20expected%0A%0A%20%20%20%20%20%20if%20%28e%2Ebutton%20%3D%3D%204%29%0A%20%20%20%20%20%20%20%20middleclick%20%3D%20true%3B%0A%0A%20%20%20%20%20%20%2F%2F%20all%20browsers%20agree%20on%202%20for%20right%20button%0A%20%20%20%20%20%20rightclick%20%3D%20%28e%2Ebutton%20%3D%3D%202%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%0A%20%20%20%20%20%20leftclick%20%3D%20true%3B%0A%0A%20%20%20%20if%20%28w3c%5Fslidy%2Eselected%5Ftext%5Flen%20%3E%200%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28e%29%3B%0A%20%20%20%20%20%20e%2Ecancel%20%3D%20true%3B%0A%20%20%20%20%20%20e%2EreturnValue%20%3D%20false%3B%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20dismiss%20table%20of%20contents%0A%20%20%20%20w3c%5Fslidy%2Ehide%5Ftable%5Fof%5Fcontents%28false%29%3B%0A%0A%20%20%20%20%2F%2F%20check%20if%20target%20is%20something%20that%20probably%20want%27s%20clicks%0A%20%20%20%20%2F%2F%20e%2Eg%2E%20a%2C%20embed%2C%20object%2C%20input%2C%20textarea%2C%20select%2C%20option%0A%20%20%20%20var%20tag%20%3D%20target%2EnodeName%2EtoLowerCase%28%29%3B%0A%0A%20%20%20%20if%20%28w3c%5Fslidy%2Emouse%5Fclick%5Fenabled%20%26%26%20leftclick%20%26%26%0A%20%20%20%20%20%20%20%20%21w3c%5Fslidy%2Especial%5Felement%28target%29%20%26%26%0A%20%20%20%20%20%20%20%20%21target%2Eonclick%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20w3c%5Fslidy%2Enext%5Fslide%28true%29%3B%0A%20%20%20%20%20%20w3c%5Fslidy%2Estop%5Fpropagation%28e%29%3B%0A%20%20%20%20%20%20e%2Ecancel%20%3D%20true%3B%0A%20%20%20%20%20%20e%2EreturnValue%20%3D%20false%3B%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20true%3B%0A%20%20%7D%2C%0A%0A%20%20special%5Felement%3A%20function%20%28element%29%20%7B%0A%20%20%20%20if%20%28this%2Ehas%5Fclass%28element%2C%20%22non%2Dinteractive%22%29%29%0A%20%20%20%20%20%20return%20false%3B%0A%0A%20%20%20%20var%20tag%20%3D%20element%2EnodeName%2EtoLowerCase%28%29%3B%0A%0A%20%20%20%20return%20element%2Eonkeydown%20%7C%7C%0A%20%20%20%20%20%20element%2Eonclick%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22a%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22embed%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22object%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22video%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22audio%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22svg%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22canvas%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22input%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22textarea%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22select%22%20%7C%7C%0A%20%20%20%20%20%20tag%20%3D%3D%20%22option%22%3B%0A%20%20%7D%2C%0A%0A%20%20slidy%5Fchrome%3A%20function%20%28el%29%20%7B%0A%20%20%20%20while%20%28el%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if%20%28el%20%3D%3D%20w3c%5Fslidy%2Etoc%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20el%20%3D%3D%20w3c%5Fslidy%2Etoolbar%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20w3c%5Fslidy%2Ehas%5Fclass%28el%2C%20%22outline%22%29%29%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%0A%20%20%20%20%20%20el%20%3D%20el%2EparentNode%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20false%3B%0A%20%20%7D%2C%0A%0A%20%20get%5Fkey%3A%20function%20%28e%29%0A%20%20%7B%0A%20%20%20%20var%20key%3B%0A%0A%20%20%20%20%2F%2F%20kludge%20around%20NS%2FIE%20differences%20%0A%20%20%20%20if%20%28typeof%20window%2Eevent%20%21%3D%20%22undefined%22%29%0A%20%20%20%20%20%20key%20%3D%20window%2Eevent%2EkeyCode%3B%0A%20%20%20%20else%20if%20%28e%2Ewhich%29%0A%20%20%20%20%20%20key%20%3D%20e%2Ewhich%3B%0A%0A%20%20%20%20return%20key%3B%0A%20%20%7D%2C%0A%0A%20%20get%5Ftarget%3A%20function%20%28e%29%20%7B%0A%20%20%20%20var%20target%3B%0A%0A%20%20%20%20if%20%28%21e%29%0A%20%20%20%20%20%20e%20%3D%20window%2Eevent%3B%0A%0A%20%20%20%20if%20%28e%2Etarget%29%0A%20%20%20%20%20%20target%20%3D%20e%2Etarget%3B%0A%20%20%20%20else%20if%20%28e%2EsrcElement%29%0A%20%20%20%20%20%20target%20%3D%20e%2EsrcElement%3B%0A%0A%20%20%20%20if%20%28target%2EnodeType%20%21%3D%201%29%0A%20%20%20%20%20%20target%20%3D%20target%2EparentNode%3B%0A%0A%20%20%20%20return%20target%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20does%20display%20property%20provide%20correct%20defaults%3F%0A%20%20is%5Fblock%3A%20function%20%28elem%29%20%7B%0A%20%20%20%20var%20tag%20%3D%20elem%2EnodeName%2EtoLowerCase%28%29%3B%0A%0A%20%20%20%20return%20tag%20%3D%3D%20%22ol%22%20%7C%7C%20tag%20%3D%3D%20%22ul%22%20%7C%7C%20tag%20%3D%3D%20%22p%22%20%7C%7C%20tag%20%3D%3D%20%22dl%22%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20tag%20%3D%3D%20%22li%22%20%7C%7C%20tag%20%3D%3D%20%22table%22%20%7C%7C%20tag%20%3D%3D%20%22pre%22%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20tag%20%3D%3D%20%22h1%22%20%7C%7C%20tag%20%3D%3D%20%22h2%22%20%7C%7C%20tag%20%3D%3D%20%22h3%22%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20tag%20%3D%3D%20%22h4%22%20%7C%7C%20tag%20%3D%3D%20%22h5%22%20%7C%7C%20tag%20%3D%3D%20%22h6%22%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20tag%20%3D%3D%20%22blockquote%22%20%7C%7C%20tag%20%3D%3D%20%22address%22%3B%20%0A%20%20%7D%2C%0A%0A%20%20add%5Flistener%3A%20function%20%28element%2C%20event%2C%20handler%29%20%7B%0A%20%20%20%20if%20%28window%2EaddEventListener%29%0A%20%20%20%20%20%20element%2EaddEventListener%28event%2C%20handler%2C%20false%29%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20element%2EattachEvent%28%22on%22%2Bevent%2C%20handler%29%3B%0A%20%20%7D%2C%0A%0A%20%20%2F%2F%20used%20to%20prevent%20event%20propagation%20from%20field%20controls%0A%20%20stop%5Fpropagation%3A%20function%20%28event%29%20%7B%0A%20%20%20%20event%20%3D%20event%20%3F%20event%20%3A%20window%2Eevent%3B%0A%20%20%20%20event%2EcancelBubble%20%3D%20true%3B%20%20%2F%2F%20for%20IE%0A%0A%20%20%20%20if%20%28event%2EstopPropagation%29%0A%20%20%20%20%20%20event%2EstopPropagation%28%29%3B%0A%0A%20%20%20%20return%20true%3B%0A%20%20%7D%2C%0A%0A%20%20cancel%3A%20function%20%28event%29%20%7B%0A%20%20%20%20if%20%28event%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20event%2Ecancel%20%3D%20true%3B%0A%20%20%20%20%20%20%20event%2EreturnValue%20%3D%20false%3B%0A%0A%20%20%20%20%20%20if%20%28event%2EpreventDefault%29%0A%20%20%20%20%20%20%20%20event%2EpreventDefault%28%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20w3c%5Fslidy%2Ekey%5Fwanted%20%3D%20false%3B%0A%20%20%20%20return%20false%3B%0A%20%20%7D%2C%0A%0A%2F%2F%20for%20each%20language%20define%20an%20associative%20array%0A%2F%2F%20and%20also%20the%20help%20text%20which%20is%20longer%0A%0A%20%20strings%5Fes%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22p%C3%A1g%2E%22%2C%0A%20%20%20%20%22help%3F%22%3A%22Ayuda%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22%C3%8Dndice%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22tabla%20de%20contenidos%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Tabla%20de%20Contenidos%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22Reiniciar%20presentaci%C3%B3n%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22Inicio%22%0A%20%20%7D%2C%0A%20%20help%5Fes%3A%0A%20%20%20%20%22Utilice%20el%20rat%C3%B3n%2C%20barra%20espaciadora%2C%20teclas%20Izda%2FDcha%2C%20%22%20%2B%0A%20%20%20%20%22o%20Re%20p%C3%A1g%20y%20Av%20p%C3%A1g%2E%20Use%20S%20y%20B%20para%20cambiar%20el%20tama%C3%B1o%20de%20fuente%2E%22%2C%0A%0A%20%20strings%5Fca%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22p%C3%A0g%2E%2E%22%2C%0A%20%20%20%20%22help%3F%22%3A%22Ajuda%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22%C3%8Dndex%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22taula%20de%20continguts%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Taula%20de%20Continguts%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22Reiniciar%20presentaci%C3%B3%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22Inici%22%0A%20%20%7D%2C%0A%20%20help%5Fca%3A%0A%20%20%20%20%22Utilitzi%20el%20ratol%C3%AD%2C%20barra%20espaiadora%2C%20tecles%20Esq%2E%2FDta%2E%20%22%20%2B%0A%20%20%20%20%22o%20Re%20p%C3%A0g%20y%20Av%20p%C3%A0g%2E%20Usi%20S%20i%20B%20per%20canviar%20grand%C3%A0ria%20de%20font%2E%22%2C%0A%0A%20%20strings%5Fcs%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22sn%C3%ADmek%22%2C%0A%20%20%20%20%22help%3F%22%3A%22n%C3%A1pov%C4%9Bda%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22obsah%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22obsah%20prezentace%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Obsah%20prezentace%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22znovu%20spustit%20prezentaci%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22restart%22%0A%20%20%7D%2C%0A%20%20help%5Fcs%3A%0A%20%20%20%20%22Prezentaci%20m%C5%AF%C5%BEete%20proch%C3%A1zet%20pomoc%C3%AD%20kliknut%C3%AD%20my%C5%A1i%2C%20mezern%C3%ADku%2C%20%22%20%2B%0A%20%20%20%20%22%C5%A1ipek%20vlevo%20a%20vpravo%20nebo%20kl%C3%A1ves%20PageUp%20a%20PageDown%2E%20P%C3%ADsmo%20se%20%22%20%2B%0A%20%20%20%20%22d%C3%A1%20zv%C4%9Bt%C5%A1it%20a%20zmen%C5%A1it%20pomoc%C3%AD%20kl%C3%A1ves%20B%20a%20S%2E%22%2C%0A%0A%20%20strings%5Fnl%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22pagina%22%2C%0A%20%20%20%20%22help%3F%22%3A%22Help%3F%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22Inhoud%3F%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22inhoudsopgave%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Inhoudsopgave%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22herstart%20presentatie%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22Herstart%3F%22%0A%20%20%7D%2C%0A%20%20help%5Fnl%3A%0A%20%20%20%20%20%22Navigeer%20d%2Em%2Ev%2E%20het%20muis%2C%20spatiebar%2C%20Links%2FRechts%20toetsen%2C%20%22%20%2B%0A%20%20%20%20%20%22of%20PgUp%20en%20PgDn%2E%20Gebruik%20S%20en%20B%20om%20de%20karaktergrootte%20te%20veranderen%2E%22%2C%0A%0A%20%20strings%5Fde%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22Seite%22%2C%0A%20%20%20%20%22help%3F%22%3A%22Hilfe%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22%C3%9Cbersicht%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22Inhaltsverzeichnis%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Inhaltsverzeichnis%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22Pr%C3%A4sentation%20neu%20starten%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22Neustart%22%0A%20%20%7D%2C%0A%20%20help%5Fde%3A%0A%20%20%20%20%22Benutzen%20Sie%20die%20Maus%2C%20Leerschlag%2C%20die%20Cursortasten%20links%2Frechts%20oder%20%22%20%2B%0A%20%20%20%20%22Page%20up%2FPage%20Down%20zum%20Wechseln%20der%20Seiten%20und%20S%20und%20B%20f%C3%BCr%20die%20Schriftgr%C3%B6sse%2E%22%2C%0A%0A%20%20strings%5Fpl%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22slajd%22%2C%0A%20%20%20%20%22help%3F%22%3A%22pomoc%3F%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22spis%20tre%C5%9Bci%3F%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22spis%20tre%C5%9Bci%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Spis%20Tre%C5%9Bci%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22Restartuj%20prezentacj%C4%99%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22restart%3F%22%0A%20%20%7D%2C%0A%20%20help%5Fpl%3A%0A%20%20%20%20%22Zmieniaj%20slajdy%20klikaj%C4%85c%20mysz%C4%85%2C%20naciskaj%C4%85c%20spacj%C4%99%2C%20strza%C5%82ki%20lewo%2Fprawo%22%20%2B%0A%20%20%20%20%22lub%20PgUp%20%2F%20PgDn%2E%20U%C5%BCyj%20klawiszy%20S%20i%20B%2C%20aby%20zmieni%C4%87%20rozmiar%20czczionki%2E%22%2C%0A%0A%20%20strings%5Ffr%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22page%22%2C%0A%20%20%20%20%22help%3F%22%3A%22Aide%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22Index%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22table%20des%20mati%C3%A8res%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Table%20des%20mati%C3%A8res%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22Recommencer%20l%27expos%C3%A9%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22D%C3%A9but%22%0A%20%20%7D%2C%0A%20%20help%5Ffr%3A%0A%20%20%20%20%22Naviguez%20avec%20la%20souris%2C%20la%20barre%20d%27espace%2C%20les%20fl%C3%A8ches%20%22%20%2B%0A%20%20%20%20%22gauche%2Fdroite%20ou%20les%20touches%20Pg%20Up%2C%20Pg%20Dn%2E%20Utilisez%20%22%20%2B%0A%20%20%20%20%22les%20touches%20S%20et%20B%20pour%20modifier%20la%20taille%20de%20la%20police%2E%22%2C%0A%0A%20%20strings%5Fhu%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22oldal%22%2C%0A%20%20%20%20%22help%3F%22%3A%22seg%C3%ADts%C3%A9g%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22tartalom%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22tartalomjegyz%C3%A9k%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Tartalomjegyz%C3%A9k%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22bemutat%C3%B3%20%C3%BAjraind%C3%ADt%C3%A1sa%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22%C3%BAjraind%C3%ADt%C3%A1s%22%0A%20%20%7D%2C%0A%20%20help%5Fhu%3A%0A%20%20%20%20%22Az%20oldalak%20k%C3%B6zti%20l%C3%A9pked%C3%A9shez%20kattintson%20az%20eg%C3%A9rrel%2C%20vagy%20%22%20%2B%0A%20%20%20%20%22haszn%C3%A1lja%20a%20sz%C3%B3k%C3%B6z%2C%20a%20bal%2C%20vagy%20a%20jobb%20ny%C3%ADl%2C%20illetve%20a%20Page%20Down%2C%20%22%20%2B%0A%20%20%20%20%22Page%20Up%20billenty%C5%B1ket%2E%20Az%20S%20%C3%A9s%20a%20B%20billenty%C5%B1kkel%20v%C3%A1ltoztathatja%20%22%20%2B%0A%20%20%20%20%22a%20sz%C3%B6veg%20m%C3%A9ret%C3%A9t%2E%22%2C%0A%0A%20%20strings%5Fit%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22pag%2E%22%2C%0A%20%20%20%20%22help%3F%22%3A%22Aiuto%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22Indice%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22indice%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Indice%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22Ricominciare%20la%20presentazione%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22Inizio%22%0A%20%20%7D%2C%0A%20%20help%5Fit%3A%0A%20%20%20%20%22Navigare%20con%20mouse%2C%20barra%20spazio%2C%20frecce%20sinistra%2Fdestra%20o%20%22%20%2B%0A%20%20%20%20%22PgUp%20e%20PgDn%2E%20Usare%20S%20e%20B%20per%20cambiare%20la%20dimensione%20dei%20caratteri%2E%22%2C%0A%0A%20%20strings%5Fel%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22%CF%83%CE%B5%CE%BB%CE%AF%CE%B4%CE%B1%22%2C%0A%20%20%20%20%22help%3F%22%3A%22%CE%B2%CE%BF%CE%AE%CE%B8%CE%B5%CE%B9%CE%B1%3B%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22%CF%80%CE%B5%CF%81%CE%B9%CE%B5%CF%87%CF%8C%CE%BC%CE%B5%CE%BD%CE%B1%3B%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22%CF%80%CE%AF%CE%BD%CE%B1%CE%BA%CE%B1%CF%82%20%CF%80%CE%B5%CF%81%CE%B9%CE%B5%CF%87%CE%BF%CE%BC%CE%AD%CE%BD%CF%89%CE%BD%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22%CE%A0%CE%AF%CE%BD%CE%B1%CE%BA%CE%B1%CF%82%20%CE%A0%CE%B5%CF%81%CE%B9%CE%B5%CF%87%CE%BF%CE%BC%CE%AD%CE%BD%CF%89%CE%BD%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22%CE%B5%CF%80%CE%B1%CE%BD%CE%B5%CE%BA%CE%BA%CE%AF%CE%BD%CE%B7%CF%83%CE%B7%20%CF%80%CE%B1%CF%81%CE%BF%CF%85%CF%83%CE%AF%CE%B1%CF%83%CE%B7%CF%82%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22%CE%B5%CF%80%CE%B1%CE%BD%CE%B5%CE%BA%CE%BA%CE%AF%CE%BD%CE%B7%CF%83%CE%B7%3B%22%0A%20%20%7D%2C%0A%20%20help%5Fel%3A%0A%20%20%20%20%22%CE%A0%CE%BB%CE%BF%CE%B7%CE%B3%CE%B7%CE%B8%CE%B5%CE%AF%CF%84%CE%B5%20%CE%BC%CE%B5%20%CF%84%CE%BF%20%CE%BA%CE%BB%CE%AF%CE%BA%20%CF%84%CE%BF%CF%85%20%CF%80%CE%BF%CE%BD%CF%84%CE%B9%CE%BA%CE%B9%CE%BF%CF%8D%2C%20%CF%84%CE%BF%20space%2C%20%CF%84%CE%B1%20%CE%B2%CE%AD%CE%BB%CE%B7%20%CE%B1%CF%81%CE%B9%CF%83%CF%84%CE%B5%CF%81%CE%AC%2F%CE%B4%CE%B5%CE%BE%CE%B9%CE%AC%2C%20%22%20%2B%0A%20%20%20%20%22%CE%AE%20Page%20Up%20%CE%BA%CE%B1%CE%B9%20Page%20Down%2E%20%CE%A7%CF%81%CE%B7%CF%83%CE%B9%CE%BC%CE%BF%CF%80%CE%BF%CE%B9%CE%AE%CF%83%CF%84%CE%B5%20%CF%84%CE%B1%20%CF%80%CE%BB%CE%AE%CE%BA%CF%84%CF%81%CE%B1%20S%20%CE%BA%CE%B1%CE%B9%20B%20%CE%B3%CE%B9%CE%B1%20%CE%BD%CE%B1%20%CE%B1%CE%BB%CE%BB%CE%AC%CE%BE%CE%B5%CF%84%CE%B5%20%22%20%2B%0A%20%20%20%20%22%CF%84%CE%BF%20%CE%BC%CE%AD%CE%B3%CE%B5%CE%B8%CE%BF%CF%82%20%CF%84%CE%B7%CF%82%20%CE%B3%CF%81%CE%B1%CE%BC%CE%BC%CE%B1%CF%84%CE%BF%CF%83%CE%B5%CE%B9%CF%81%CE%AC%CF%82%2E%22%2C%0A%0A%20%20strings%5Fja%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22%E3%82%B9%E3%83%A9%E3%82%A4%E3%83%89%22%2C%0A%20%20%20%20%22help%3F%22%3A%22%E3%83%98%E3%83%AB%E3%83%97%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22%E7%9B%AE%E6%AC%A1%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22%E7%9B%AE%E6%AC%A1%E3%82%92%E8%A1%A8%E7%A4%BA%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22%E7%9B%AE%E6%AC%A1%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22%E6%9C%80%E5%88%9D%E3%81%8B%E3%82%89%E5%86%8D%E7%94%9F%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22%E6%9C%80%E5%88%9D%E3%81%8B%E3%82%89%22%0A%20%20%7D%2C%0A%20%20help%5Fja%3A%0A%20%20%20%20%20%22%E3%83%9E%E3%82%A6%E3%82%B9%E5%B7%A6%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%20%E3%83%BB%20%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%20%E3%83%BB%20%E5%B7%A6%E5%8F%B3%E3%82%AD%E3%83%BC%20%22%20%2B%0A%20%20%20%20%20%22%E3%81%BE%E3%81%9F%E3%81%AF%20Page%20Up%20%E3%83%BB%20Page%20Down%E3%81%A7%E6%93%8D%E4%BD%9C%EF%BC%8C%20S%20%E3%83%BB%20B%E3%81%A7%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%82%B5%E3%82%A4%E3%82%BA%E5%A4%89%E6%9B%B4%22%2C%0A%0A%20%20strings%5Fzh%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22%E5%B9%BB%E7%81%AF%E7%89%87%22%2C%0A%20%20%20%20%22help%3F%22%3A%22%E5%B8%AE%E5%8A%A9%3F%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22%E5%86%85%E5%AE%B9%3F%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22%E7%9B%AE%E5%BD%95%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22%E7%9B%AE%E5%BD%95%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22%E9%87%8D%E6%96%B0%E5%90%AF%E5%8A%A8%E5%B1%95%E7%A4%BA%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22%E9%87%8D%E6%96%B0%E5%90%AF%E5%8A%A8%3F%22%0A%20%20%7D%2C%0A%20%20help%5Fzh%3A%0A%20%20%20%20%22%E7%94%A8%E9%BC%A0%E6%A0%87%E7%82%B9%E5%87%BB%2C%20%E7%A9%BA%E6%A0%BC%E6%9D%A1%2C%20%E5%B7%A6%E5%8F%B3%E7%AE%AD%E5%A4%B4%2C%20Pg%20Up%20%E5%92%8C%20Pg%20Dn%20%E5%AF%BC%E8%88%AA%2E%20%22%20%2B%0A%20%20%20%20%22%E7%94%A8%20S%2C%20B%20%E6%94%B9%E5%8F%98%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F%2E%22%2C%0A%0A%20%20strings%5Fru%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22%D1%81%D0%BB%D0%B0%D0%B9%D0%B4%22%2C%0A%20%20%20%20%22help%3F%22%3A%22%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%3F%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22%D1%81%D0%BE%D0%B4%D0%B5%D1%80%D0%B6%D0%B0%D0%BD%D0%B8%D0%B5%3F%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22%D0%BE%D0%B3%D0%BB%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22%D0%9E%D0%B3%D0%BB%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22%D0%BF%D0%B5%D1%80%D0%B5%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D1%82%D0%B8%D1%82%D1%8C%20%D0%BF%D1%80%D0%B5%D0%B7%D0%B5%D0%BD%D1%82%D0%B0%D1%86%D0%B8%D1%8E%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22%D0%BF%D0%B5%D1%80%D0%B5%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D0%BA%3F%22%0A%20%20%7D%2C%0A%20%20help%5Fru%3A%0A%20%20%20%20%22%D0%9F%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D1%89%D0%B0%D0%B9%D1%82%D0%B5%D1%81%D1%8C%20%D0%BA%D0%BB%D0%B8%D0%BA%D0%B0%D1%8F%20%D0%BC%D1%8B%D1%88%D0%BA%D0%BE%D0%B9%2C%20%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D1%83%D1%8F%20%D0%BA%D0%BB%D0%B0%D0%B2%D0%B8%D1%88%D1%83%20%D0%BF%D1%80%D0%BE%D0%B1%D0%B5%D0%BB%2C%20%D1%81%D1%82%D1%80%D0%B5%D0%BB%D0%BA%D0%B8%22%20%2B%0A%20%20%20%20%22%D0%B2%D0%BB%D0%B5%D0%B2%D0%BE%2F%D0%B2%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%20%D0%B8%D0%BB%D0%B8%20Pg%20Up%20%D0%B8%20Pg%20Dn%2E%20%D0%9A%D0%BB%D0%B0%D0%B2%D0%B8%D1%88%D0%B8%20S%20%D0%B8%20B%20%D0%BC%D0%B5%D0%BD%D1%8F%D1%8E%D1%82%20%D1%80%D0%B0%D0%B7%D0%BC%D0%B5%D1%80%20%D1%88%D1%80%D0%B8%D1%84%D1%82%D0%B0%2E%22%2C%0A%0A%20%20strings%5Fsv%3A%20%7B%0A%20%20%20%20%22slide%22%3A%22sida%22%2C%0A%20%20%20%20%22help%3F%22%3A%22hj%C3%A4lp%22%2C%0A%20%20%20%20%22contents%3F%22%3A%22inneh%C3%A5ll%22%2C%0A%20%20%20%20%22table%20of%20contents%22%3A%22inneh%C3%A5llsf%C3%B6rteckning%22%2C%0A%20%20%20%20%22Table%20of%20Contents%22%3A%22Inneh%C3%A5llsf%C3%B6rteckning%22%2C%0A%20%20%20%20%22restart%20presentation%22%3A%22visa%20presentationen%20fr%C3%A5n%20b%C3%B6rjan%22%2C%0A%20%20%20%20%22restart%3F%22%3A%22b%C3%B6rja%20om%22%0A%20%20%7D%2C%0A%20%20help%5Fsv%3A%0A%20%20%20%20%22Bl%C3%A4ddra%20med%20ett%20klick%20med%20v%C3%A4nstra%20musknappen%2C%20mellanslagstangenten%2C%20%22%20%2B%0A%20%20%20%20%22v%C3%A4nster%2D%20och%20h%C3%B6gerpiltangenterna%20eller%20tangenterna%20Pg%20Up%2C%20Pg%20Dn%2E%20%22%20%2B%0A%20%20%20%20%22Anv%C3%A4nd%20tangenterna%20S%20och%20B%20f%C3%B6r%20att%20%C3%A4ndra%20textens%20storlek%2E%22%2C%0A%0A%20%20strings%3A%20%7B%20%7D%2C%0A%0A%20%20localize%3A%20function%20%28src%29%20%7B%0A%20%20%20%20if%20%28src%20%3D%3D%20%22%22%29%0A%20%20%20%20%20%20return%20src%3B%0A%0A%20%20%20%20%20%2F%2F%20try%20full%20language%20code%2C%20e%2Eg%2E%20en%2DUS%0A%20%20%20%20%20var%20s%2C%20lookup%20%3D%20w3c%5Fslidy%2Estrings%5Bw3c%5Fslidy%2Elang%5D%3B%0A%0A%20%20%20%20%20if%20%28lookup%29%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20s%20%3D%20lookup%5Bsrc%5D%3B%0A%0A%20%20%20%20%20%20%20if%20%28s%29%0A%20%20%20%20%20%20%20%20return%20s%3B%0A%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%2F%2F%20strip%20country%20code%20suffix%2C%20e%2Eg%2E%0A%20%20%20%20%20%2F%2F%20try%20en%20if%20undefined%20for%20en%2DUS%0A%20%20%20%20%20var%20lg%20%3D%20w3c%5Fslidy%2Elang%2Esplit%28%22%2D%22%29%3B%0A%0A%20%20%20%20%20if%20%28lg%2Elength%20%3E%201%29%0A%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20lookup%20%3D%20w3c%5Fslidy%2Estrings%5Blg%5B0%5D%5D%3B%0A%0A%20%20%20%20%20%20%20if%20%28lookup%29%0A%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20s%20%3D%20lookup%5Bsrc%5D%3B%0A%0A%20%20%20%20%20%20%20%20%20if%20%28s%29%0A%20%20%20%20%20%20%20%20%20%20return%20s%3B%0A%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%2F%2F%20otherwise%20string%20as%20is%0A%20%20%20%20%20return%20src%3B%0A%20%20%7D%2C%0A%0A%20%20init%5Flocalization%3A%20function%20%28%29%20%7B%0A%20%20%20%20var%20i18n%20%3D%20w3c%5Fslidy%3B%0A%20%20%20%20var%20help%5Ftext%20%3D%20w3c%5Fslidy%2Ehelp%5Ftext%3B%0A%0A%20%20%20%20%2F%2F%20each%20such%20language%20array%20is%20declared%20in%20the%20localize%20array%0A%20%20%20%20%2F%2F%20this%20is%20used%20as%20in%20%20w3c%5Fslidy%2Elocalize%28%22foo%22%29%3B%0A%20%20%20%20this%2Estrings%20%3D%20%7B%0A%20%20%20%20%20%20%22es%22%3Athis%2Estrings%5Fes%2C%0A%20%20%20%20%20%20%22ca%22%3Athis%2Estrings%5Fca%2C%0A%20%20%20%20%20%20%22cs%22%3Athis%2Estrings%5Fcs%2C%0A%20%20%20%20%20%20%22nl%22%3Athis%2Estrings%5Fnl%2C%0A%20%20%20%20%20%20%22de%22%3Athis%2Estrings%5Fde%2C%0A%20%20%20%20%20%20%22pl%22%3Athis%2Estrings%5Fpl%2C%0A%20%20%20%20%20%20%22fr%22%3Athis%2Estrings%5Ffr%2C%0A%20%20%20%20%20%20%22hu%22%3Athis%2Estrings%5Fhu%2C%0A%20%20%20%20%20%20%22it%22%3Athis%2Estrings%5Fit%2C%0A%20%20%20%20%20%20%22el%22%3Athis%2Estrings%5Fel%2C%0A%20%20%20%20%20%20%22jp%22%3Athis%2Estrings%5Fja%2C%0A%20%20%20%20%20%20%22zh%22%3Athis%2Estrings%5Fzh%2C%0A%20%20%20%20%20%20%22ru%22%3Athis%2Estrings%5Fru%2C%0A%20%20%20%20%20%20%22sv%22%3Athis%2Estrings%5Fsv%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20i18n%2Estrings%5Fes%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fes%3B%0A%20%20%20%20i18n%2Estrings%5Fca%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fca%3B%0A%20%20%20%20i18n%2Estrings%5Fcs%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fcs%3B%0A%20%20%20%20i18n%2Estrings%5Fnl%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fnl%3B%0A%20%20%20%20i18n%2Estrings%5Fde%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fde%3B%0A%20%20%20%20i18n%2Estrings%5Fpl%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fpl%3B%0A%20%20%20%20i18n%2Estrings%5Ffr%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Ffr%3B%0A%20%20%20%20i18n%2Estrings%5Fhu%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fhu%3B%0A%20%20%20%20i18n%2Estrings%5Fit%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fit%3B%0A%20%20%20%20i18n%2Estrings%5Fel%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fel%3B%0A%20%20%20%20i18n%2Estrings%5Fja%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fja%3B%0A%20%20%20%20i18n%2Estrings%5Fzh%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fzh%3B%0A%20%20%20%20i18n%2Estrings%5Fru%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fru%3B%0A%20%20%20%20i18n%2Estrings%5Fsv%5Bhelp%5Ftext%5D%20%3D%20i18n%2Ehelp%5Fsv%3B%0A%0A%20%20%20%20w3c%5Fslidy%2Elang%20%3D%20document%2Ebody%2EparentNode%2EgetAttribute%28%22lang%22%29%3B%0A%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Elang%29%0A%20%20%20%20%20%20w3c%5Fslidy%2Elang%20%3D%20document%2Ebody%2EparentNode%2EgetAttribute%28%22xml%3Alang%22%29%3B%0A%0A%20%20%20%20if%20%28%21w3c%5Fslidy%2Elang%29%0A%20%20%20%20%20%20w3c%5Fslidy%2Elang%20%3D%20%22en%22%3B%0A%20%20%7D%0A%7D%3B%0A%0A%2F%2F%20hack%20for%20back%20button%20behavior%0Aif%20%28w3c%5Fslidy%2Eie6%20%7C%7C%20w3c%5Fslidy%2Eie7%29%0A%7B%0A%20%20document%2Ewrite%28%22%3Ciframe%20id%3D%27historyFrame%27%20%22%20%2B%0A%20%20%22src%3D%27javascript%3A%5C%22%3Chtml%22%2B%22%3E%3C%2F%22%2B%22html%3E%5C%22%27%20%22%20%2B%0A%20%20%22height%3D%271%27%20width%3D%271%27%20%22%20%2B%0A%20%20%22style%3D%27position%3Aabsolute%3Bleft%3A%2D800px%27%3E%3C%2Fiframe%3E%22%29%3B%0A%7D%0A%0A%2F%2F%20attach%20event%20listeners%20for%20initialization%0Aw3c%5Fslidy%2Eset%5Fup%28%29%3B%0A%0A%2F%2F%20hide%20the%20slides%20as%20soon%20as%20body%20element%20is%20available%0A%2F%2F%20to%20reduce%20annoying%20screen%20mess%20before%20the%20onload%20event%0AsetTimeout%28w3c%5Fslidy%2Ehide%5Fslides%2C%2050%29%3B%0A%0A" charset="utf-8" type="text/javascript"></script>
</head>
<body>
<div class="slide titlepage">
<h1 class="title">The Rust programming language</h1>
<p class="author">
Martin Sulzmann
</p>
</div>
<div id="the-rust-programming-language" class="slide section level1">
<h1><a href="https://www.rust-lang.org/">The Rust programming
language</a></h1>
<ul>
<li><p>Rust the better C?</p></li>
<li><p>Statically typed/Simple form of type inference</p></li>
<li><p>Higher-order functions</p></li>
<li><p>Data types and pattern matching</p></li>
<li><p>User-controllable overloading</p></li>
<li><p>Deterministic memory management</p>
<ul>
<li><p>Stack allocated by default</p></li>
<li><p>Heap allocations must be be explicit</p></li>
<li><p>Static ownership type system to guarantee there are no memory
errors</p></li>
</ul></li>
</ul>
</div>
<div id="variables-functions-and-type-inference" class="slide section level1">
<h1>Variables, functions and type inference</h1>
<h2 id="functions">Functions</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> inc(x <span class="op">:</span> <span class="dt">i32</span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> x<span class="op">+</span><span class="dv">1</span><span class="op">;</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="local-type-inference">Local type inference</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> inc2(x <span class="op">:</span> <span class="dt">i32</span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> y <span class="op">:</span> <span class="dt">i32</span> <span class="op">=</span> x<span class="op">;</span> <span class="co">// Local variables</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> y<span class="op">+</span><span class="dv">1</span><span class="op">;</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> inc3(x <span class="op">:</span> <span class="dt">i32</span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> y <span class="op">=</span> x<span class="op">;</span> <span class="co">// Type inference for local variables</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> y<span class="op">+</span><span class="dv">1</span><span class="op">;</span></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="variables-are-immutable-by-default">Variables are immutable by
default</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> inc4(x <span class="op">:</span> <span class="dt">i32</span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> y <span class="op">=</span> x<span class="op">;</span> <span class="co">// Variables are immutable by default</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> y <span class="op">=</span> y <span class="op">+</span> <span class="dv">1</span><span class="op">;</span> <span class="co">// Yields compiler error "cannot assign twice to immutable variable `y`"</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> y<span class="op">;</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="mutable-variables-must-be-declared-explicitly">Mutable variables
must be declared explicitly</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> inc5(x <span class="op">:</span> <span class="dt">i32</span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> y <span class="op">=</span> x<span class="op">;</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> y <span class="op">=</span> y <span class="op">+</span> <span class="dv">1</span><span class="op">;</span> <span class="co">// Mutable variables must be declared explicitly</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> y<span class="op">;</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="lambda-functions-aka-closures">“Lambda” functions (aka
closures)</h2>
<div class="sourceCode" id="cb5"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> lambda1() <span class="op">{</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> one <span class="op">=</span> <span class="dv">1</span><span class="op">;</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> inc <span class="op">=</span> <span class="op">|</span>x <span class="op">:</span> <span class="dt">i32</span><span class="op">|</span> <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span> <span class="kw">let</span> y <span class="op">=</span> x<span class="op">+</span>one<span class="op">;</span> <span class="cf">return</span> y<span class="op">;</span> <span class="op">};</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"</span><span class="sc">\n</span><span class="st">{}"</span><span class="op">,</span>inc(<span class="dv">1</span>))<span class="op">;</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="closures-take-ownership">Closures take ownership</h2>
<div class="sourceCode" id="cb6"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> lambda2() <span class="op">{</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> add <span class="op">=</span> <span class="op">|</span>x <span class="op">:</span> <span class="dt">i32</span><span class="op">,</span> y <span class="op">:</span> <span class="dt">i32</span><span class="op">|</span> <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span> <span class="cf">return</span> x <span class="op">+</span> y<span class="op">;</span> <span class="op">};</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"</span><span class="sc">\n</span><span class="st">{}"</span><span class="op">,</span>add(<span class="dv">1</span><span class="op">,</span><span class="dv">2</span>))<span class="op">;</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="co">// Multiple arguments. Type inference for return types.</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> plus <span class="op">=</span> <span class="op">|</span>x <span class="op">:</span> <span class="dt">i32</span><span class="op">|</span> <span class="op">{</span> <span class="cf">return</span> <span class="kw">move</span> <span class="op">|</span>y <span class="op">:</span> <span class="dt">i32</span><span class="op">|</span> <span class="op">{</span> <span class="cf">return</span> x <span class="op">+</span> y<span class="op">;</span> <span class="op">};</span> <span class="op">};</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"</span><span class="sc">\n</span><span class="st">{}"</span><span class="op">,</span>plus(<span class="dv">1</span>)(<span class="dv">2</span>))<span class="op">;</span></span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p>Outer lambda “owns” <code>x</code></p></li>
<li><p>Inner lambda “borrows” <code>x</code></p></li>
<li><p>May call inner lambda multiple times (partial function
application)</p></li>
<li><p>Can lead to “tricky” errors, see lambda1b</p></li>
</ul>
<h2 id="runnable-code">Runnable code</h2>
<p><a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=acd05fad10fffbc4e1c6a90819edd99b">Link
to Rust playground</a></p>
<pre><code></code></pre>
</div>
<div id="ownership" class="slide section level1">
<h1>Ownership</h1>
<p>Rust has call-by-value semantics like C++. For managing heap
allocated memory, Rust uses a C++ style copy/move semantics. The
difference to C++ is that the Rust compiler checks that there cannot be
any memory violations.</p>
<h2 id="strings-are-allocated-on-the-heap">Strings are allocated on the
heap</h2>
<div class="sourceCode" id="cb8"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> str(x <span class="op">:</span> <span class="dt">String</span>) <span class="op">{</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>x)<span class="op">;</span></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test1() <span class="op">{</span></span>
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> <span class="dt">String</span><span class="pp">::</span>from(<span class="st">"12345"</span>)<span class="op">;</span></span>
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">str</span>(s)<span class="op">;</span></span>
<span id="cb8-8"><a href="#cb8-8" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p>Strings can grow and shrink (=> strings have a dynamic
size)</p></li>
<li><p>When calling a function, we pass a reference to the string (not
the string itself)</p></li>
<li><p>Variable <code>s</code> holds the reference to the
string</p></li>
<li><p>When calling <code>str</code>, parameter <code>x</code> obtains
the reference to the string</p></li>
</ul>
<h2 id="ownership-transfer">Ownership transfer</h2>
<div class="sourceCode" id="cb9"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test2() <span class="op">{</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> <span class="dt">String</span><span class="pp">::</span>from(<span class="st">"12345"</span>)<span class="op">;</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">str</span>(s)<span class="op">;</span></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">str</span>(s)<span class="op">;</span> <span class="co">// Compiler error "use of moved value: `s`"</span></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p>The first call <code>str(s)</code> copies the reference to the
string</p></li>
<li><p>From C++ we know that this can be dangerous (see “double delete”
problem)</p></li>
<li><p>Rust performs a <em>move</em> like C++</p></li>
<li><p>The difference to C++ is that the Rust compiler (type system)
checks that (after the move) we no longer access variable
<code>s</code></p></li>
</ul>
<h3 id="ownership-types">Ownership types</h3>
<p>Rust uses a <em>refined</em> type system to carry out ownership
checks.</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test2() <span class="op">{</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> <span class="dt">String</span><span class="pp">::</span>from(<span class="st">"12345"</span>)<span class="op">;</span> <span class="co">// s : String_Owner</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">str</span>(s)<span class="op">;</span> <span class="co">// s : String_Not_Owner</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">str</span>(s)<span class="op">;</span> <span class="co">// Type error invalid access of s</span></span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="cloning-and-borrowing">Cloning and borrowing</h2>
<p>Like in C++, we can explicitly apply the copy semantics by using the
<em>clone</em> method.</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test3() <span class="op">{</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> <span class="dt">String</span><span class="pp">::</span>from(<span class="st">"12345"</span>)<span class="op">;</span> <span class="co">// s : String_Owner</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">str</span>(s<span class="op">.</span>clone())<span class="op">;</span></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s2 <span class="op">=</span> s<span class="op">.</span>clone()<span class="op">;</span> <span class="co">// s2 : String_Owner</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">str</span>(s2)<span class="op">;</span></span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>s)<span class="op">;</span></span>
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>Always cloning an object seems overkill. In particular, if only
require <em>read</em> access like in case of function
<code>str</code>.</p>
<p>There is a way out here.</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> strB(x <span class="op">:</span> <span class="op">&</span><span class="dt">String</span>) <span class="op">{</span> <span class="co">// "borrow" Annotation</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>x)<span class="op">;</span></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test4() <span class="op">{</span></span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> <span class="dt">String</span><span class="pp">::</span>from(<span class="st">"12345"</span>)<span class="op">;</span></span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> strB(<span class="op">&</span>s)<span class="op">;</span> <span class="co">// "borrow" Annotation</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> strB(<span class="op">&</span>s)<span class="op">;</span></span>
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p><em>Borrow</em> access to the string</p></li>
<li><p>Requires explicit annotations</p></li>
</ul>
<p>Borrow annotations guarantee that the object can only be read.</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> strB2(x <span class="op">:</span> <span class="op">&</span><span class="dt">String</span>) <span class="op">{</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a> x<span class="op">.</span>push(<span class="ch">'a'</span>)<span class="op">;</span> <span class="co">// Yields compiler error</span></span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>x)<span class="op">;</span></span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-6"><a href="#cb13-6" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> str3(x <span class="op">:</span> <span class="dt">String</span>) <span class="op">{</span></span>
<span id="cb13-7"><a href="#cb13-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> y <span class="op">=</span> x<span class="op">;</span></span>
<span id="cb13-8"><a href="#cb13-8" aria-hidden="true" tabindex="-1"></a> y<span class="op">.</span>push(<span class="ch">'a'</span>)<span class="op">;</span> <span class="co">// Okay</span></span>
<span id="cb13-9"><a href="#cb13-9" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>y)<span class="op">;</span></span>
<span id="cb13-10"><a href="#cb13-10" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="runnable-code-1">Runnable code</h2>
<p><a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=18c4d05ecc58bb051ad06e1e8aae894d">Link
to Rust playground</a></p>
<h2 id="short-summary">Short summary</h2>
<ul>
<li><p>Java, Go, … automatic garbage collection</p></li>
<li><p>RAII in C++ (double delete issue remains)</p></li>
<li><p>C++11 copy/move semantics solve some of the problem (but we may
still encounter run-time failure in case we access a “moved”
object)</p></li>
<li><p>Rust uses a static ownership type system (checked by the
compiler)</p></li>
<li><p>Rust guarantees that no memory violations occur at
run-time</p></li>
</ul>
<pre><code></code></pre>
</div>
<div id="data-types-and-pattern-matching-in-rust" class="slide section level1">
<h1>Data types and pattern matching in Rust</h1>
<p>We show how to implement a <a href="https://en.wikipedia.org/wiki/Stack_machine">stack-based virtual
machine (VM)</a> to support a simple expression language.</p>
<h2 id="vm-codes">VM codes</h2>
<p>We first consider the virtual machine. We make use of Rust enums to
represent VM code.</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="kw">pub</span> <span class="kw">enum</span> OpCode <span class="op">{</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a> PUSH <span class="op">{</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a> val <span class="op">:</span> <span class="dt">i32</span></span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a> <span class="op">},</span></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a> PLUS<span class="op">,</span></span>
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a> MULT</span>
<span id="cb15-7"><a href="#cb15-7" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>Rust enums can take arguments (identified via a label/attribute
name).</p>
<h2 id="vm-interpreter">VM interpreter</h2>
<p>We write an interpreter where we make use of Rust vectors to (a)
represent a sequence of VM instructions (codes) and (b) represent the
stack to carry out the computation of VM instructions.</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> is_some<span class="op"><</span>T<span class="op">></span>(x <span class="op">:</span> <span class="dt">Option</span><span class="op"><</span>T<span class="op">></span>) <span class="op">-></span> T <span class="op">{</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">match</span> x <span class="op">{</span></span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a> <span class="cn">Some</span>(v) <span class="op">=></span> <span class="op">{</span> <span class="cf">return</span> v<span class="op">;</span> <span class="op">}</span></span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a> _ <span class="op">=></span> <span class="op">{</span> <span class="pp">panic!</span>()<span class="op">;</span> <span class="op">}</span></span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb16-7"><a href="#cb16-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> run(op_codes <span class="op">:</span> <span class="op">&</span><span class="dt">Vec</span><span class="op"><</span>OpCode<span class="op">></span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb16-9"><a href="#cb16-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-10"><a href="#cb16-10" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> st <span class="op">=</span> <span class="dt">Vec</span><span class="pp">::</span>new()<span class="op">;</span></span>
<span id="cb16-11"><a href="#cb16-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-12"><a href="#cb16-12" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> op <span class="kw">in</span> op_codes<span class="op">.</span>iter() <span class="op">{</span></span>
<span id="cb16-13"><a href="#cb16-13" aria-hidden="true" tabindex="-1"></a> <span class="cf">match</span> op <span class="op">{</span></span>
<span id="cb16-14"><a href="#cb16-14" aria-hidden="true" tabindex="-1"></a> <span class="pp">OpCode::</span>PUSH <span class="op">{</span> val <span class="op">}</span> <span class="op">=></span> <span class="op">{</span> st<span class="op">.</span>push(<span class="op">*</span>val)<span class="op">;</span> <span class="op">}</span></span>
<span id="cb16-15"><a href="#cb16-15" aria-hidden="true" tabindex="-1"></a> <span class="pp">OpCode::</span>PLUS <span class="op">=></span> <span class="op">{</span></span>
<span id="cb16-16"><a href="#cb16-16" aria-hidden="true" tabindex="-1"></a> <span class="cf">match</span> st<span class="op">.</span>pop() <span class="op">{</span></span>
<span id="cb16-17"><a href="#cb16-17" aria-hidden="true" tabindex="-1"></a> <span class="cn">Some</span>(v_right) <span class="op">=></span> <span class="op">{</span></span>
<span id="cb16-18"><a href="#cb16-18" aria-hidden="true" tabindex="-1"></a> <span class="cf">match</span> st<span class="op">.</span>pop() <span class="op">{</span></span>
<span id="cb16-19"><a href="#cb16-19" aria-hidden="true" tabindex="-1"></a> <span class="cn">Some</span>(v_left) <span class="op">=></span> <span class="op">{</span> st<span class="op">.</span>push(v_left<span class="op">+</span>v_right)<span class="op">;</span> <span class="op">}</span></span>
<span id="cb16-20"><a href="#cb16-20" aria-hidden="true" tabindex="-1"></a> _ <span class="op">=></span> <span class="op">{</span> <span class="pp">panic!</span>()<span class="op">;</span> <span class="op">}</span></span>
<span id="cb16-21"><a href="#cb16-21" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-22"><a href="#cb16-22" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-23"><a href="#cb16-23" aria-hidden="true" tabindex="-1"></a> _ <span class="op">=></span> <span class="op">{</span> <span class="pp">panic!</span>()<span class="op">;</span> <span class="op">}</span></span>
<span id="cb16-24"><a href="#cb16-24" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-25"><a href="#cb16-25" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-26"><a href="#cb16-26" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-27"><a href="#cb16-27" aria-hidden="true" tabindex="-1"></a> <span class="pp">OpCode::</span>MULT <span class="op">=></span> <span class="op">{</span></span>
<span id="cb16-28"><a href="#cb16-28" aria-hidden="true" tabindex="-1"></a> <span class="co">// Shorter code using the helper function.</span></span>
<span id="cb16-29"><a href="#cb16-29" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> v_right <span class="op">=</span> is_some(st<span class="op">.</span>pop())<span class="op">;</span></span>
<span id="cb16-30"><a href="#cb16-30" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> v_left <span class="op">=</span> is_some(st<span class="op">.</span>pop())<span class="op">;</span></span>
<span id="cb16-31"><a href="#cb16-31" aria-hidden="true" tabindex="-1"></a> st<span class="op">.</span>push(v_left<span class="op">*</span>v_right)<span class="op">;</span></span>
<span id="cb16-32"><a href="#cb16-32" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-33"><a href="#cb16-33" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-34"><a href="#cb16-34" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb16-35"><a href="#cb16-35" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-36"><a href="#cb16-36" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> res <span class="op">=</span> is_some(st<span class="op">.</span>pop())<span class="op">;</span></span>
<span id="cb16-37"><a href="#cb16-37" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> res<span class="op">;</span></span>
<span id="cb16-38"><a href="#cb16-38" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h3 id="optional-data-type">Optional data type</h3>
<p>The vector data type acts like a stack by using operations
<code>push</code> and <code>pop</code>.</p>
<p>A <code>pop</code> operation either yields some result or none.</p>
<h3 id="pattern-matching">Pattern matching</h3>
<p>We can observe the various shapes a data type can have by using a
form of <a href="https://en.wikipedia.org/wiki/Pattern_matching">pattern
matching</a>.</p>
<p>Consider the helper function</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> is_some<span class="op"><</span>T<span class="op">></span>(x <span class="op">:</span> <span class="dt">Option</span><span class="op"><</span>T<span class="op">></span>) <span class="op">-></span> T <span class="op">{</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">match</span> x <span class="op">{</span></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a> <span class="cn">Some</span>(v) <span class="op">=></span> <span class="op">{</span> <span class="cf">return</span> v<span class="op">;</span> <span class="op">}</span></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a> _ <span class="op">=></span> <span class="op">{</span> <span class="pp">panic!</span>()<span class="op">;</span> <span class="op">}</span></span>
<span id="cb17-5"><a href="#cb17-5" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb17-6"><a href="#cb17-6" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>where the option type is defined as follows</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="kw">pub</span> <span class="kw">enum</span> <span class="dt">Option</span><span class="op"><</span>T<span class="op">></span> <span class="op">{</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a> <span class="cn">Some</span> <span class="op">{</span> val <span class="op">:</span> T<span class="op">},</span></span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a> <span class="cn">None</span></span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>The pattern cases connected to a <code>match</code> expression allows
us to observe the various shapes of values.</p>
<p>For example, the pattern case</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a> <span class="cn">Some</span>(v) <span class="op">=></span> <span class="op">{</span> <span class="cf">return</span> v<span class="op">;</span> <span class="op">}</span></span></code></pre></div>
<p>applies if there is “some” value. Pattern variable <code>v</code>
refers to the underlying value.</p>
<p>The pattern case <code>_</code> refers to a “don’t care” pattern and
always applies.</p>
<p>Keep in mind that pattern cases are tried in textual order (from top
to bottom). Hence, the don’t care case always comes last.</p>
<h2 id="examples">Examples</h2>
<div class="sourceCode" id="cb20"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test_vm() <span class="op">{</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> os <span class="op">=</span> <span class="dt">Vec</span><span class="pp">::</span>new()<span class="op">;</span></span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a> os<span class="op">.</span>push(<span class="pp">OpCode::</span>PUSH<span class="op">{</span> val <span class="op">:</span> <span class="dv">1</span> <span class="op">}</span>)<span class="op">;</span></span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true" tabindex="-1"></a> os<span class="op">.</span>push(<span class="pp">OpCode::</span>PUSH<span class="op">{</span> val <span class="op">:</span> <span class="dv">2</span> <span class="op">}</span>)<span class="op">;</span></span>
<span id="cb20-5"><a href="#cb20-5" aria-hidden="true" tabindex="-1"></a> os<span class="op">.</span>push(<span class="pp">OpCode::</span>PUSH<span class="op">{</span> val <span class="op">:</span> <span class="dv">3</span> <span class="op">}</span>)<span class="op">;</span></span>
<span id="cb20-6"><a href="#cb20-6" aria-hidden="true" tabindex="-1"></a> os<span class="op">.</span>push(<span class="pp">OpCode::</span>MULT)<span class="op">;</span></span>
<span id="cb20-7"><a href="#cb20-7" aria-hidden="true" tabindex="-1"></a> os<span class="op">.</span>push(<span class="pp">OpCode::</span>PLUS)<span class="op">;</span></span>
<span id="cb20-8"><a href="#cb20-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-9"><a href="#cb20-9" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span> run(<span class="op">&</span>os))<span class="op">;</span></span>
<span id="cb20-10"><a href="#cb20-10" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="expression-data-types">Expression data types</h2>
<p>Next, we consider expressions that are composed of integers, addition
and multiplication. We again make use of Rust enums to represent the
abstract syntax of our expression language. What <em>abstract</em> means
will be explained shortly.</p>
<div class="sourceCode" id="cb21"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="kw">pub</span> <span class="kw">enum</span> Exp <span class="op">{</span></span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a> Int <span class="op">{</span></span>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true" tabindex="-1"></a> val<span class="op">:</span> <span class="dt">i32</span></span>
<span id="cb21-4"><a href="#cb21-4" aria-hidden="true" tabindex="-1"></a> <span class="op">},</span></span>
<span id="cb21-5"><a href="#cb21-5" aria-hidden="true" tabindex="-1"></a> Plus <span class="op">{</span></span>
<span id="cb21-6"><a href="#cb21-6" aria-hidden="true" tabindex="-1"></a> left<span class="op">:</span> <span class="dt">Box</span><span class="op"><</span>Exp<span class="op">>,</span></span>
<span id="cb21-7"><a href="#cb21-7" aria-hidden="true" tabindex="-1"></a> right<span class="op">:</span> <span class="dt">Box</span><span class="op"><</span>Exp<span class="op">></span></span>
<span id="cb21-8"><a href="#cb21-8" aria-hidden="true" tabindex="-1"></a> <span class="op">},</span></span>
<span id="cb21-9"><a href="#cb21-9" aria-hidden="true" tabindex="-1"></a> Mult<span class="op">{</span></span>
<span id="cb21-10"><a href="#cb21-10" aria-hidden="true" tabindex="-1"></a> left<span class="op">:</span> <span class="dt">Box</span><span class="op"><</span>Exp<span class="op">>,</span></span>
<span id="cb21-11"><a href="#cb21-11" aria-hidden="true" tabindex="-1"></a> right<span class="op">:</span> <span class="dt">Box</span><span class="op"><</span>Exp<span class="op">></span></span>
<span id="cb21-12"><a href="#cb21-12" aria-hidden="true" tabindex="-1"></a> <span class="op">},</span></span>
<span id="cb21-13"><a href="#cb21-13" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p><code>Box</code> required</p></li>
<li><p>Otherwise, recursive definition (without indirection)</p></li>
</ul>
<p>Rust enums are a well-known concept and commonly referred to as <a href="https://en.wikipedia.org/wiki/Algebraic_data_type">algebraic data
types</a>.</p>
<p>For example, the expression <code>1 * (2 + 3)</code> can be
represented as follows</p>
<div class="sourceCode" id="cb22"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> e2 <span class="op">=</span> <span class="pp">Exp::</span>Mult<span class="op">{</span>left <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">1</span> <span class="op">}</span>)<span class="op">,</span></span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a> right <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Plus<span class="op">{</span>left <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">2</span> <span class="op">}</span>)<span class="op">,</span></span>
<span id="cb22-3"><a href="#cb22-3" aria-hidden="true" tabindex="-1"></a> right <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">3</span><span class="op">}</span>)<span class="op">}</span>)<span class="op">};</span></span></code></pre></div>
<p>In terms of some <a href="https://en.wikipedia.org/wiki/Parse_tree">concrete syntax</a>
written <code>1 * (2 + 3)</code> where where parentheses are necessary
to capture the precedence among (sub)expressions.</p>
<p>In the <a href="https://en.wikipedia.org/wiki/Abstract_syntax">abstract syntax</a>
representation we use Rust enum constructors <code>Int</code>,
<code>Plus</code> and <code>Mult</code> and parentheses are omitted.</p>
<h2 id="expression-evaluation-via-pattern-matching">Expression
evaluation via pattern matching</h2>
<p>We make use of pattern matching to implement an evaluator for our
expressions.</p>
<div class="sourceCode" id="cb23"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> eval(e <span class="op">:</span> <span class="op">&</span>Exp) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">match</span> e <span class="op">{</span></span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a> <span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">}</span> <span class="op">=></span> <span class="cf">return</span> <span class="op">*</span>val<span class="op">,</span></span>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a> <span class="pp">Exp::</span>Plus <span class="op">{</span> left<span class="op">,</span> right <span class="op">}</span> <span class="op">=></span> <span class="cf">return</span> eval(left) <span class="op">+</span> eval(right)<span class="op">,</span></span>
<span id="cb23-5"><a href="#cb23-5" aria-hidden="true" tabindex="-1"></a> <span class="pp">Exp::</span>Mult <span class="op">{</span> left<span class="op">,</span> right <span class="op">}</span> <span class="op">=></span> <span class="cf">return</span> eval(left) <span class="op">*</span> eval(right)<span class="op">,</span></span>
<span id="cb23-6"><a href="#cb23-6" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb23-7"><a href="#cb23-7" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<p>The second case <code>Exp::Plus { left, right }</code> refers to an
expression that is composed using <code>+</code> where (pattern)
variables <code>left</code> and <code>right</code> refer to the
operands.</p>
<h2 id="examples-1">Examples</h2>
<div class="sourceCode" id="cb24"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test_exp() <span class="op">{</span></span>
<span id="cb24-2"><a href="#cb24-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb24-3"><a href="#cb24-3" aria-hidden="true" tabindex="-1"></a> <span class="co">// 1 + (2 * 3)</span></span>
<span id="cb24-4"><a href="#cb24-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> e <span class="op">=</span> <span class="pp">Exp::</span>Plus<span class="op">{</span>left <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">1</span> <span class="op">}</span>)<span class="op">,</span></span>
<span id="cb24-5"><a href="#cb24-5" aria-hidden="true" tabindex="-1"></a> right <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Mult<span class="op">{</span>left <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">2</span> <span class="op">}</span>)<span class="op">,</span></span>
<span id="cb24-6"><a href="#cb24-6" aria-hidden="true" tabindex="-1"></a> right <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">3</span><span class="op">}</span>)<span class="op">}</span>)<span class="op">};</span></span>
<span id="cb24-7"><a href="#cb24-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb24-8"><a href="#cb24-8" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span> eval(<span class="op">&</span>e))<span class="op">;</span></span>
<span id="cb24-9"><a href="#cb24-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb24-10"><a href="#cb24-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb24-11"><a href="#cb24-11" aria-hidden="true" tabindex="-1"></a> <span class="co">// 1 * (2 + 3)</span></span>
<span id="cb24-12"><a href="#cb24-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> e2 <span class="op">=</span> <span class="pp">Exp::</span>Mult<span class="op">{</span>left <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">1</span> <span class="op">}</span>)<span class="op">,</span></span>
<span id="cb24-13"><a href="#cb24-13" aria-hidden="true" tabindex="-1"></a> right <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Plus<span class="op">{</span>left <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">2</span> <span class="op">}</span>)<span class="op">,</span></span>
<span id="cb24-14"><a href="#cb24-14" aria-hidden="true" tabindex="-1"></a> right <span class="op">:</span> <span class="dt">Box</span><span class="pp">::</span>new(<span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">:</span> <span class="dv">3</span><span class="op">}</span>)<span class="op">}</span>)<span class="op">};</span></span>
<span id="cb24-15"><a href="#cb24-15" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb24-16"><a href="#cb24-16" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span> eval(<span class="op">&</span>e2))<span class="op">;</span></span>
<span id="cb24-17"><a href="#cb24-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb24-18"><a href="#cb24-18" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="compiler">Compiler</h2>
<p>We write a compiler from <code>Exp</code> to VM instructions
(<code>Vec<OpCode></code>).</p>
<div class="sourceCode" id="cb25"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> compile(e <span class="op">:</span> <span class="op">&</span>Exp) <span class="op">-></span> <span class="dt">Vec</span><span class="op"><</span>OpCode<span class="op">></span> <span class="op">{</span></span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">match</span> e <span class="op">{</span></span>
<span id="cb25-3"><a href="#cb25-3" aria-hidden="true" tabindex="-1"></a> <span class="pp">Exp::</span>Int <span class="op">{</span> val <span class="op">}</span> <span class="op">=></span> <span class="op">{</span></span>
<span id="cb25-4"><a href="#cb25-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> os <span class="op">=</span> <span class="dt">Vec</span><span class="pp">::</span>new()<span class="op">;</span></span>
<span id="cb25-5"><a href="#cb25-5" aria-hidden="true" tabindex="-1"></a> os<span class="op">.</span>push(<span class="pp">OpCode::</span>PUSH <span class="op">{</span> val <span class="op">:</span> <span class="op">*</span>val <span class="op">}</span>)<span class="op">;</span></span>
<span id="cb25-6"><a href="#cb25-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> os<span class="op">;</span></span>
<span id="cb25-7"><a href="#cb25-7" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb25-8"><a href="#cb25-8" aria-hidden="true" tabindex="-1"></a> <span class="pp">Exp::</span>Plus <span class="op">{</span> left<span class="op">,</span> right <span class="op">}</span> <span class="op">=></span> <span class="op">{</span></span>
<span id="cb25-9"><a href="#cb25-9" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> o1 <span class="op">=</span> compile(left)<span class="op">;</span></span>
<span id="cb25-10"><a href="#cb25-10" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> o2 <span class="op">=</span> compile(right)<span class="op">;</span></span>
<span id="cb25-11"><a href="#cb25-11" aria-hidden="true" tabindex="-1"></a> o1<span class="op">.</span>append(<span class="op">&</span><span class="kw">mut</span> o2)<span class="op">;</span></span>
<span id="cb25-12"><a href="#cb25-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> o3 <span class="op">=</span> <span class="dt">Vec</span><span class="pp">::</span>new()<span class="op">;</span></span>
<span id="cb25-13"><a href="#cb25-13" aria-hidden="true" tabindex="-1"></a> o3<span class="op">.</span>push(<span class="pp">OpCode::</span>PLUS)<span class="op">;</span></span>
<span id="cb25-14"><a href="#cb25-14" aria-hidden="true" tabindex="-1"></a> o1<span class="op">.</span>append(<span class="op">&</span><span class="kw">mut</span> o3)<span class="op">;</span></span>
<span id="cb25-15"><a href="#cb25-15" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> o1<span class="op">;</span></span>
<span id="cb25-16"><a href="#cb25-16" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb25-17"><a href="#cb25-17" aria-hidden="true" tabindex="-1"></a> <span class="pp">Exp::</span>Mult <span class="op">{</span> left<span class="op">,</span> right <span class="op">}</span> <span class="op">=></span> <span class="op">{</span></span>
<span id="cb25-18"><a href="#cb25-18" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> o1 <span class="op">=</span> compile(left)<span class="op">;</span></span>
<span id="cb25-19"><a href="#cb25-19" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> o2 <span class="op">=</span> compile(right)<span class="op">;</span></span>
<span id="cb25-20"><a href="#cb25-20" aria-hidden="true" tabindex="-1"></a> o1<span class="op">.</span>append(<span class="op">&</span><span class="kw">mut</span> o2)<span class="op">;</span></span>
<span id="cb25-21"><a href="#cb25-21" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> <span class="kw">mut</span> o3 <span class="op">=</span> <span class="dt">Vec</span><span class="pp">::</span>new()<span class="op">;</span></span>
<span id="cb25-22"><a href="#cb25-22" aria-hidden="true" tabindex="-1"></a> o3<span class="op">.</span>push(<span class="pp">OpCode::</span>MULT)<span class="op">;</span></span>
<span id="cb25-23"><a href="#cb25-23" aria-hidden="true" tabindex="-1"></a> o1<span class="op">.</span>append(<span class="op">&</span><span class="kw">mut</span> o3)<span class="op">;</span></span>
<span id="cb25-24"><a href="#cb25-24" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> o1<span class="op">;</span></span>
<span id="cb25-25"><a href="#cb25-25" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb25-26"><a href="#cb25-26" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb25-27"><a href="#cb25-27" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p><code>append</code> “moves” the to be appended list</p></li>
<li><p>This requires the addition of <code>&mut</code> in several
places.</p></li>
</ul>
<h2 id="complete-source-code">Complete source code</h2>
<p>The complete source can be found here.</p>
<p><a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=914136c3464760f8bb180ff583badf06">Permalink
to the playground</a></p>
<p><a href="https://gist.github.com/rust-play/914136c3464760f8bb180ff583badf06">Direct
link to the gist</a></p>
<pre><code></code></pre>
</div>
<div id="traits" class="slide section level1">
<h1>Traits</h1>
<ul>
<li><p>Traits are a systematic method to support user-definable
overloading.</p></li>
<li><p>Traits are not <em>classes</em> and they only vaguely resemble
<em>interfaces</em>.</p></li>
</ul>
<h2 id="traits-for-cloning">Traits for cloning</h2>
<div class="sourceCode" id="cb27"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="at">#[</span>derive<span class="at">(</span><span class="bu">Clone</span><span class="at">)]</span></span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Square <span class="op">{</span></span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a> x <span class="op">:</span> <span class="dt">i32</span></span>
<span id="cb27-4"><a href="#cb27-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb27-5"><a href="#cb27-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb27-6"><a href="#cb27-6" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> area_sq(s <span class="op">:</span> Square) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb27-7"><a href="#cb27-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> s<span class="op">.</span>x <span class="op">*</span> s<span class="op">.</span>x<span class="op">;</span></span>
<span id="cb27-8"><a href="#cb27-8" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb27-9"><a href="#cb27-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb27-10"><a href="#cb27-10" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> sq_test() <span class="op">{</span></span>
<span id="cb27-11"><a href="#cb27-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> Square<span class="op">{</span> x <span class="op">:</span> <span class="dv">2</span> <span class="op">};</span></span>
<span id="cb27-12"><a href="#cb27-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb27-13"><a href="#cb27-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s2 <span class="op">=</span> s<span class="op">.</span>clone()<span class="op">;</span></span>
<span id="cb27-14"><a href="#cb27-14" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span> area_sq(s2))<span class="op">;</span></span>
<span id="cb27-15"><a href="#cb27-15" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span> area_sq(s))<span class="op">;</span></span>
<span id="cb27-16"><a href="#cb27-16" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p><code>clone</code> is an overloaded method</p></li>
<li><p>We can automatically derive an instance for
<code>Square</code></p></li>
</ul>
<h2 id="traits-for-cloning-and-copying">Traits for cloning and
copying</h2>
<div class="sourceCode" id="cb28"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="at">#[</span>derive<span class="at">(</span><span class="bu">Clone</span><span class="op">,</span><span class="bu">Copy</span><span class="at">)]</span></span>
<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Rectangle <span class="op">{</span></span>
<span id="cb28-3"><a href="#cb28-3" aria-hidden="true" tabindex="-1"></a> x <span class="op">:</span> <span class="dt">i32</span><span class="op">,</span></span>
<span id="cb28-4"><a href="#cb28-4" aria-hidden="true" tabindex="-1"></a> y <span class="op">:</span> <span class="dt">i32</span></span>
<span id="cb28-5"><a href="#cb28-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb28-6"><a href="#cb28-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb28-7"><a href="#cb28-7" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> area_rec(r <span class="op">:</span> Rectangle) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb28-8"><a href="#cb28-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> r<span class="op">.</span>x <span class="op">*</span> r<span class="op">.</span>y<span class="op">;</span></span>
<span id="cb28-9"><a href="#cb28-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb28-10"><a href="#cb28-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb28-11"><a href="#cb28-11" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> rec_test() <span class="op">{</span></span>
<span id="cb28-12"><a href="#cb28-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> r <span class="op">=</span> Rectangle<span class="op">{</span> x <span class="op">:</span> <span class="dv">2</span><span class="op">,</span> y <span class="op">:</span> <span class="dv">4</span> <span class="op">};</span></span>
<span id="cb28-13"><a href="#cb28-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb28-14"><a href="#cb28-14" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> r2 <span class="op">=</span> r<span class="op">;</span></span>
<span id="cb28-15"><a href="#cb28-15" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span> area_rec(r2))<span class="op">;</span></span>
<span id="cb28-16"><a href="#cb28-16" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span> area_rec(r))<span class="op">;</span></span>
<span id="cb28-17"><a href="#cb28-17" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span></code></pre></div>
<ul>
<li><p><code>copy</code> applied in case of assignment and function
calls is another overloaded method</p></li>
<li><p>We can automatically derive copy and clone instances for
<code>Rectangle</code></p></li>
<li><p>The program text <code>let r2 = r;</code> translates to
<code>let r2 = r.clone();</code></p></li>
</ul>
<h2 id="more-on-traits">More on traits</h2>
<p>Traits describe a collection of methods that share the same type.</p>
<p>Via some clever sugared syntax, Rust makes them look like
“objects”.</p>
<h3 id="geometric-objects-examples">Geometric objects examples</h3>
<div class="sourceCode" id="cb29"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="kw">trait</span> Shape <span class="op">{</span></span>
<span id="cb29-2"><a href="#cb29-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">fn</span> area(s <span class="op">:</span> <span class="op">&</span><span class="dt">Self</span>) <span class="op">-></span> <span class="dt">i32</span><span class="op">;</span></span>
<span id="cb29-3"><a href="#cb29-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb29-4"><a href="#cb29-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-5"><a href="#cb29-5" aria-hidden="true" tabindex="-1"></a><span class="kw">impl</span> Shape <span class="cf">for</span> Rectangle <span class="op">{</span></span>
<span id="cb29-6"><a href="#cb29-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">fn</span> area(r <span class="op">:</span> <span class="op">&</span>Rectangle) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb29-7"><a href="#cb29-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> r<span class="op">.</span>x <span class="op">*</span> r<span class="op">.</span>y<span class="op">;</span></span>
<span id="cb29-8"><a href="#cb29-8" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb29-9"><a href="#cb29-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb29-10"><a href="#cb29-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb29-11"><a href="#cb29-11" aria-hidden="true" tabindex="-1"></a><span class="kw">impl</span> Shape <span class="cf">for</span> Square <span class="op">{</span></span>
<span id="cb29-12"><a href="#cb29-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">fn</span> area(s <span class="op">:</span> <span class="op">&</span>Square) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb29-13"><a href="#cb29-13" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> s<span class="op">.</span>x <span class="op">*</span> s<span class="op">.</span>x<span class="op">;</span></span>
<span id="cb29-14"><a href="#cb29-14" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb29-15"><a href="#cb29-15" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p><code>Self</code> refers to the shared type</p></li>
<li><p><code>Self</code> is an implicit parameter of the trait
<code>Shape</code></p></li>
<li><p>In essence, the trait <code>Shape</code> represents a predicate
<code>Shape(Self)</code></p></li>
<li><p>We use borrowing here to avoid copying</p></li>
</ul>
<p>Summing up the area of two geometric objects.</p>
<div class="sourceCode" id="cb30"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> sum_area<span class="op"><</span>A<span class="op">:</span>Shape<span class="op">,</span>B<span class="op">:</span>Shape<span class="op">></span>(x <span class="op">:</span> <span class="op">&</span>A<span class="op">,</span> y <span class="op">:</span> <span class="op">&</span>B) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="pp">Shape::</span>area(x) <span class="op">+</span> <span class="pp">Shape::</span>area(y)<span class="op">;</span></span>
<span id="cb30-3"><a href="#cb30-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb30-4"><a href="#cb30-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb30-5"><a href="#cb30-5" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test_area() <span class="op">{</span></span>
<span id="cb30-6"><a href="#cb30-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> r <span class="op">=</span> Rectangle<span class="op">{</span>x <span class="op">:</span> <span class="dv">1</span><span class="op">,</span> y <span class="op">:</span> <span class="dv">2</span><span class="op">};</span></span>
<span id="cb30-7"><a href="#cb30-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> Square<span class="op">{</span>x <span class="op">:</span> <span class="dv">3</span><span class="op">};</span></span>
<span id="cb30-8"><a href="#cb30-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb30-9"><a href="#cb30-9" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>sum_area(<span class="op">&</span>r<span class="op">,&</span>s))<span class="op">;</span></span>
<span id="cb30-10"><a href="#cb30-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb30-11"><a href="#cb30-11" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p><code>A:Shape</code> is a type constraint and states that
<code>x</code> implements the trait <code>Shape</code></p></li>
<li><p>In standard logic notation written <code>Shape(A)</code></p></li>
<li><p>Method calls are written <code>Shape::area(x)</code></p></li>
</ul>
<h2 id="traits---syntactic-sugar-for-method-calls">Traits - syntactic
sugar for method calls</h2>
<p>Rust introduces some syntactic sugar to make look method calls
“nicer”.</p>
<p>Here’s the above example written using Rust’s “method” notation.</p>
<div class="sourceCode" id="cb31"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="kw">trait</span> Shape2 <span class="op">{</span></span>
<span id="cb31-2"><a href="#cb31-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">fn</span> area2(<span class="op">&</span><span class="kw">self</span>) <span class="op">-></span> <span class="dt">i32</span><span class="op">;</span></span>
<span id="cb31-3"><a href="#cb31-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb31-4"><a href="#cb31-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-5"><a href="#cb31-5" aria-hidden="true" tabindex="-1"></a><span class="kw">impl</span> Shape2 <span class="cf">for</span> Rectangle <span class="op">{</span></span>
<span id="cb31-6"><a href="#cb31-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">fn</span> area2(<span class="op">&</span><span class="kw">self</span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb31-7"><a href="#cb31-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="kw">self</span><span class="op">.</span>x <span class="op">*</span> <span class="kw">self</span><span class="op">.</span>y<span class="op">;</span></span>
<span id="cb31-8"><a href="#cb31-8" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb31-9"><a href="#cb31-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb31-10"><a href="#cb31-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-11"><a href="#cb31-11" aria-hidden="true" tabindex="-1"></a><span class="kw">impl</span> Shape2 <span class="cf">for</span> Square <span class="op">{</span></span>
<span id="cb31-12"><a href="#cb31-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">fn</span> area2(<span class="op">&</span><span class="kw">self</span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb31-13"><a href="#cb31-13" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="kw">self</span><span class="op">.</span>x <span class="op">*</span> <span class="kw">self</span><span class="op">.</span>x<span class="op">;</span></span>
<span id="cb31-14"><a href="#cb31-14" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
<span id="cb31-15"><a href="#cb31-15" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb31-16"><a href="#cb31-16" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-17"><a href="#cb31-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-18"><a href="#cb31-18" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> sum_area2<span class="op"><</span>A<span class="op">:</span>Shape2<span class="op">,</span>B<span class="op">:</span>Shape2<span class="op">></span>(x <span class="op">:</span> <span class="op">&</span>A<span class="op">,</span> y <span class="op">:</span> <span class="op">&</span>B) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb31-19"><a href="#cb31-19" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> x<span class="op">.</span>area2() <span class="op">+</span> y<span class="op">.</span>area2()<span class="op">;</span></span>
<span id="cb31-20"><a href="#cb31-20" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb31-21"><a href="#cb31-21" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-22"><a href="#cb31-22" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-23"><a href="#cb31-23" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test_area2() <span class="op">{</span></span>
<span id="cb31-24"><a href="#cb31-24" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> r <span class="op">=</span> Rectangle<span class="op">{</span>x <span class="op">:</span> <span class="dv">1</span><span class="op">,</span> y <span class="op">:</span> <span class="dv">2</span><span class="op">};</span></span>
<span id="cb31-25"><a href="#cb31-25" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> Square<span class="op">{</span>x <span class="op">:</span> <span class="dv">3</span><span class="op">};</span></span>
<span id="cb31-26"><a href="#cb31-26" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-27"><a href="#cb31-27" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>sum_area2(<span class="op">&</span>r<span class="op">,&</span>s))<span class="op">;</span></span>
<span id="cb31-28"><a href="#cb31-28" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-29"><a href="#cb31-29" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<h2 id="traits-are-not-types">Traits are not types</h2>
<p>Traits may seem like interfaces but they are <em>not</em>.</p>
<ul>
<li><p>Interfaces</p>
<ul>
<li><p>Interfaces are types</p></li>
<li><p>A value of an interface type implements the methods described by
the interface</p></li>
</ul></li>
<li><p>Traits</p>
<ul>
<li><p>Traits describe a collection of methods that share the same
type</p></li>
<li><p>Traits are type constraints</p></li>
</ul></li>
</ul>
<p>In Rust, we can represent interfaces via <em>dynamic</em> traits.</p>
<div class="sourceCode" id="cb32"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> sum_area3(x <span class="op">:</span> <span class="dt">Box</span><span class="op"><</span><span class="kw">dyn</span> Shape2<span class="op">>,</span> y <span class="op">:</span> <span class="dt">Box</span><span class="op"><</span><span class="kw">dyn</span> Shape2<span class="op">></span>) <span class="op">-></span> <span class="dt">i32</span> <span class="op">{</span></span>
<span id="cb32-2"><a href="#cb32-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> x<span class="op">.</span>area2() <span class="op">+</span> y<span class="op">.</span>area2()<span class="op">;</span></span>
<span id="cb32-3"><a href="#cb32-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span>
<span id="cb32-4"><a href="#cb32-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb32-5"><a href="#cb32-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb32-6"><a href="#cb32-6" aria-hidden="true" tabindex="-1"></a><span class="kw">fn</span> test_area3() <span class="op">{</span></span>
<span id="cb32-7"><a href="#cb32-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> r <span class="op">=</span> <span class="dt">Box</span><span class="pp">::</span>new(Rectangle<span class="op">{</span>x <span class="op">:</span> <span class="dv">1</span><span class="op">,</span> y <span class="op">:</span> <span class="dv">2</span><span class="op">}</span>)<span class="op">;</span></span>
<span id="cb32-8"><a href="#cb32-8" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> s <span class="op">=</span> <span class="dt">Box</span><span class="pp">::</span>new(Square<span class="op">{</span>x <span class="op">:</span> <span class="dv">3</span><span class="op">}</span>)<span class="op">;</span></span>
<span id="cb32-9"><a href="#cb32-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb32-10"><a href="#cb32-10" aria-hidden="true" tabindex="-1"></a> <span class="pp">println!</span>(<span class="st">"{}"</span><span class="op">,</span>sum_area3(r<span class="op">,</span>s))<span class="op">;</span></span>
<span id="cb32-11"><a href="#cb32-11" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
<ul>
<li><p><code>dyn Shape2</code> effectively represents an
interface</p></li>
<li><p>In logical notation, <code>dyn Shape2</code> corresponds to
<code>exists A. Shape2(A) => A</code></p></li>
<li><p>What does <code>Box</code> mean?</p>
<ul>
<li><p>The memory space of an interface cannot be statically
computed</p></li>
<li><p>It can either be a Rectangle or a Square (the size of the memory
space occupied is different)</p></li>
<li><p>Hence, we need to allocate the (interface) value on the
heap.</p></li>
<li><p>In Rust, this is reflected in the type via
<code>Box</code></p></li>
</ul></li>
</ul>
<h2 id="complete-source-code-1">Complete source code</h2>
<p>The complete source can be found here.</p>
<p><a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b495715ae68deb45586883be94cee07b">Link
to Rust playground</a></p>
<pre><code></code></pre>
</div>
<div id="conclusion" class="slide section level1">
<h1>Conclusion</h1>
<p>We have seen:</p>
<ul>
<li><p>Ownership and borrowing</p></li>
<li><p>Data types and pattern matching</p></li>
<li><p>Overloading via traits</p></li>
</ul>
<p>How to describe Rust?</p>
<p>Rust = Haskell with deterministic memory management</p>
<p>Learn <a href="https://www.haskell.org/">Haskell</a>!</p>
<p>Makes it easier to comprehend Rust (and other languages such as Go,
…).</p>
</div>
</body>
</html>