Home directory for Malawi's wwwroot
Duncan Ewan
2021-02-19 3e758c29e0fde36fc088efcfc88f9a3014432b64
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
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
/*
 * help.js
 */
 
 
// preload nav hover icons
if (document.images){
  preload_image = new Image(17,17);
  preload_image.src="images/prev_hover.gif";
  preload_image.src="images/next_hover.gif";
}
 
// redirect to index.html
if (document.location.href.charAt(document.location.href.length-1) == '/'){
  document.location.href = "./index.html";
}
 
// set ASDoc filtering cookie
if ( typeof(terms_COOKIE) != 'undefined' && terms_COOKIE.length > 0 ){
    document.cookie = terms_COOKIE.toLowerCase() + ";path=/;domain=" + document.domain;
}
    
// set GEP product filtering cookie
if ( typeof(terms_FILTER_PRODUCT_COOKIE) != 'undefined' && terms_FILTER_PRODUCT_COOKIE.length > 0 ){
    document.cookie = terms_FILTER_PRODUCT_COOKIE.toLowerCase() + ";path=/;domain=" + document.domain;
    if (typeof(localStorage) != 'undefined'){
        localStorage.setItem('filter_product', terms_FILTER_PRODUCT_COOKIE.toLowerCase());
    }
}
 
//For AHV 1.1, this goes back to previous page in history.
function closePopup()
{
    window.close();
}
 
function updateTOCClass() {
    //function to make the TOC wider, based upon the number of levels.
    var TOCLevel = "TOCLevel2";
    if ( typeof(terms_TOCLevel) != 'undefined' ) {
        TOCLevel = "TOCLevel" + terms_TOCLevel;
    }
    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById("col1").className = TOCLevel;
    }
}
 
function hideElement(id) {
    //safe function to hide an element with a specified id
    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'none';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'none';
        }
        else { // IE 4
            document.all.id.style.display = 'none';
        }
    }
}
 
function showElement(id) {
    //safe function to hide an element with a specified id
    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'block';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'block';
        }
        else { // IE 4
            document.all.id.style.display = 'block';
        }
    }
}
 
// HIDES AND SHOWS MINI-TOC IN THE CONTENT PAGES
function toggleMiniToc(listId, obj) 
{
    if( obj.className == "hideLink" )
    {
        hideElement(listId);
        obj.className="showLink";
        obj.href="#";
        obj.firstChild.nodeValue = terms_AHV_SHOW;
        window.focus();
    }
    else
    {
        showElement(listId);
        obj.className="hideLink";
        obj.href="#";
        obj.firstChild.nodeValue = terms_AHV_HIDE;
        window.focus();
    }
    return false;
}
 
// HIDES AND SHOWS LARGE GRAPHICS IN THE CONTENT PAGES
function showHideImage(thisID, obj) 
{
    
    var imgElement = obj.nextSibling;
    var imgText = obj;
 
    if( imgElement.className == "largeImage" )
    {
        imgElement.src = "images/" + thisID + ".png";
        imgElement.className="smallImage";
        obj.className="showImageLink";
        obj.href="#";
        obj.firstChild.nodeValue = terms_AHV_LARGE_GRAPHIC;
        window.focus();
    }
    else
    {
        imgElement.src = "images/" + thisID + "_popup.png";
        imgElement.className="largeImage";
        obj.className="hideImageLink";
        obj.href="#";
        obj.firstChild.nodeValue = terms_AHV_SMALL_GRAPHIC;
        window.focus();
    }
    return false;
}
// js function for expand collapse menu functionality
function KeyCheck(e, tree, idx)
{
  var KeyID = (window.event) ? event.keyCode : e.keyCode;
  var node =  YAHOO.widget.TreeView.getNode(tree, idx);
   switch(KeyID)
   {
        case 37:
        // alert("Arrow Left");
        node.collapse();
        break;
        case 39:
        // alert("Arrow Right");
        node.expand();
        break;
   }
}
// js function for hide/display mini-elements functionality
function toggleLayer(whichLayer) {
    if (document.getElementById) {
        // this is the way the standards work
        var obj=document.getElementById(whichLayer);
        var img = obj.previousSibling.firstChild.firstChild;
        img.setAttribute("src","images/on.gif");
        var styleatt = obj.style;
        styleatt.display = styleatt.display? "":"block";
        
        //change the class of the h3 per design
        if (obj.previousSibling.className === "topictitle3")    {
            obj.previousSibling.className ="topictitle3off";
            img.setAttribute("src","images/on.gif");
        } else if (obj.previousSibling.className === "topictitle3off")    {
            obj.previousSibling.className ="topictitle3";
            img.setAttribute("src","images/off.gif");
        } 
    }
    else if (document.all) {
        // this is the way old msie versions work
        var style2 = document.all[whichLayer].style;
        style2.display = style2.display? "":"block";
    }
}
 function addBookmark( bm_url_str, bm_str_label ) {
  parent.navigation.flashProxy.call('addBookmark', bm_url_str, bm_str_label );
}
 
var upperAsciiXlatTbl = new Array(
223,"ss",
230,"ae",
198,"ae",
156,"oe",
140,"oe",
240,"eth",
208,"eth",
141,"y",
159,"y"
);
 
var maxNumberOfShownSearchHits = 20;
var showInputStringAlerts = 0;
var navigationCookie = "";
 
////////////// COOKIE-RELATED FUNCTIONS /////////////////////////////////////////
//  test the navigator object for cookie enabling
//  additional code would need to be added for
//  to support browsers pre navigator 4 or IE5 or 
//  other browsers that dont support
//  the navigator object if any .. 
 function cookiesNotEnabled() 
{
    return true;     // We're not going to use cookies
}
/*
 * This function parses comma-separated name=value 
 * argument pairs from the query string of the URL. 
 * It stores the name=value pairs in 
 * properties of an object and returns that object.
 */
function getArgs() 
{
    var args = new Object();
    var query = top.location.search.substring(1); 
    // Get query string
    if (query.length > 0)    {
        var pairs = query.split("&");
        // Break at ampersand
        for(var i = 0; i < pairs.length; i++) 
        {
            var pos = pairs[i].indexOf('=');
              // Look for "name=value"
            if (pos == -1) continue;
              // If not found, skip
            var argname = pairs[i].substring(0,pos);
              // Extract the name
            var value = pairs[i].substring(pos+1);
              // Extract the value
            args[argname] = decodeURIComponent(value);
                // Store as a property
              // In JavaScript 1.5, use decodeURIComponent(  ) 
              // instead of escape(  )
        }
    } else {
        args[name] = false;        
    }
    return args;     // Return the object
}
 
/////////////////////////////// COOKIE-RELATED FUNCTIONS ////////////////////////
// Bill Dortch getCookieVal and GetCookie routines
function getCookieVal(offset) {
  var endstr=document.cookie.indexOf(";",offset);
  if (endstr==-1)endstr=document.cookie.length;
  return decodeURIComponent(document.cookie.substring(offset, endstr));
}
function GetCookie(name) {
    var arg=name+"=";
    var alen=arg.length;
    var clen=document.cookie.length;
    var i=0;
 
    if (cookiesNotEnabled())
    {
        var args = getArgs();
        if (args[name] !== false) { 
            return args[name];
        }    
    } else {
        while(i<clen){
            var j=i+alen;
            if(document.cookie.substring(i,j)==arg)return getCookieVal(j);
            i=document.cookie.indexOf(" ",i)+1;
            if(i==0)break; 
        }
        return null;
    }
}
function getTopCookieVal(offset) {
    var endstr=top.document.cookie.indexOf(";",offset);
    if (endstr==-1)endstr=top.document.cookie.length;
    return decodeURIComponent(top.document.cookie.substring(offset, endstr));
}
function GetTopCookie(name) {
    var arg=name+"=";
    var alen=arg.length;
    var clen=top.document.cookie.length;
    var i=0;
    while(i<clen){
        var j=i+alen;
        if(top.document.cookie.substring(i,j)==arg)return getTopCookieVal(j);
        i=top.document.cookie.indexOf(" ",i)+1;
        if(i==0)break; 
    }
    return null;
}
// SetCookie
// -----------
// This function is called to set a cookie in the current document.
//  params:
//        n - name of the cookie
//        v - value of the cookie
//        minutes - the duration of the cookie in minutes (that is, how many minutes before it expires)
function SetCookie(n,v,minutes) {
    var Then = new Date();
    Then.setTime(Then.getTime() + minutes * 60 * 1000);
    document.cookie = n + "=" + v + ";expires=" + Then.toGMTString();
}
// getContentCookie
// ----------------
// This function reads the content cookie set by the handleContext funtion.
//
function getContentCookie()
{
    var contentCookie = GetCookie("content");
    top.document.cookie = "content=";
 
    // What does this expression mean?
    // (contentCookie.indexOf("htm") != -1)
    if ( (contentCookie != null) && (contentCookie.indexOf("htm") != -1) ) 
    {
        document.cookie = "content="; // Wipe out the cookie
        top.document.cookie = "histR=" + contentCookie;
        location.replace(contentCookie);
    }            
}
// getNavigationCookie
// -------------------
// This function reads the content cookie set by the handleContext funtion.
//
function getNavigationCookie()
{
    navigationCookie = GetCookie("navigation");
    top.document.cookie = "navigation=";
 
    // What does this expression mean?
    // (navigationCookie.indexOf("htm") != -1)
    if ( (navigationCookie != null) && (navigationCookie.indexOf("htm") != -1) ) 
    {
        document.cookie = "navigation="; // Wipe out the cookie
        top.document.cookie = "histL=" + navigationCookie;
        location.replace(navigationCookie);
    }
                
}
 
function getlocalStorage(itemName){
    var localStorageValue = null;
     localStorageValue = localStorage.getItem(itemName);
     return localStorageValue;
}
// handleContext
// -------------
// This function is called from content pages. It sets a cookie as soon
// as the page is loaded. If the content page is not in it's proper place
// in the frameset, the frameset will be loaded and the page will be 
// restored using the value in this cookie.
//
function handleContext(which)
{
}
// lastNodeOf
// ----------
// This function gets passed a URL and returns the last node of same.
function lastNodeOf(e)
{
    var expr = "" + e;
    var to = expr.indexOf("?");
    if( to !== -1) {
        var path = expr.substring(0,to);        
        var pieces = path.split("/");
        return pieces[pieces.length -1];
    }  else    {    
        var pos = expr.lastIndexOf("/");    
        if( (pos != -1) && (pos+1 != expr.length) ) {
            return expr.substr(pos+1);
        } else {
            return expr;
        }
    }
}
// frameBuster
// -----------
// This function is called by the frameset to ensure it's always loaded
// at the top level of the current window.
//
function frameBuster()
{
}
 
 
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
// SEARCH RELATED.......................................SEARCH RELATED
function bubbleSortWithShadow(a,b)
{
    var temp;
    for(var j=1; j<a.length; j++) {
        for(var i=0; i<j; i++) {
            if( a[i] < a[j] ) {    
                temp = a[j];a[j] = a[i];a[i] = temp;
                temp = b[j];b[j] = b[i];b[i] = temp;
            }
        }
    }
}
//---------------------------------------------------
function buildHtmlResultsStr()
{
    var innerHTMLstring,ndxEnd;
 
    // Gather all of the results display lines into the 'resultsArr'
    ndxEnd = (matchesArrIndices.length > maxNumberOfShownSearchHits ) ? maxNumberOfShownSearchHits : matchesArrIndices.length;
 
    for(var ndx=0, resultsArr = new Array(); ndx < ndxEnd; ndx++) {
        resultsArr[resultsArr.length] = buildResultsStrOneLine(matchesArrIndices[ndx],matchesArrHits[ndx]);
    }
 
    // Convert this 'resultsArr' into a single string that will be injected into this search page.
    innerHTMLstring = "<ol>";
    for( var ndx=0; ndx < resultsArr.length; ndx++ ) {
        innerHTMLstring = innerHTMLstring + resultsArr[ndx];
    }
    innerHTMLstring = innerHTMLstring + "</ol>";
    return innerHTMLstring;
}
//---------------------------------------------------
function buildResultsStrOneLine(a,b)
{
    var retStr;
    retStr = "<li class=\"searchresults\"><a href=\"" + top.fileArr[a] + ".html\"";
 
    // for debug...
    //retStr += "target=\"_self\" ";
    //retStr += "title=\"" + top.fileArr[a] + ".html-";
    //retStr += a + "-" + b + "\">";
 
    // for production...
    retStr += "target=\"_self\" >";
 
    retStr += top.titleArr[a].replace("<","&lt;").replace(">","&gt;") + "</a></li>";
    return retStr;
}
//---------------------------------------------------
// checkForHits
//  Break up the search term into words.
//  Check each of those words against...
//        (a) cached titles and 
//        (b) cached content lines 
//  Perform the hit detection for each one, 
//  storing the results into (hits-ordered) 
//        'matchesArrIndices' and 
//        'matchesArrHits'.
//---------------------------------------------------
function checkForHits()
{
    var inputWords = new Array();
    var tempArr = new Array();
 
    // Split the search term into individual search words
        tempArr = searchTerm.split(" ");
        for(var ndx=0; ndx < tempArr.length; ndx++) {
            if( tempArr[ndx].length ) {
                inputWords[inputWords.length] = tempArr[ndx];
            }
        }
 
    // Initialization
        matchesArrHits = new Array();
        matchesArrIndices = new Array();
 
    // Initialize the 'maskArr' and the 'hitsArr'
        maskArr = new Array();
        hitsArr = new Array();
        for( var ndx = 0; ndx < top.fileArr.length; ndx++ ) {
            maskArr[maskArr.length] = 1;
            hitsArr[hitsArr.length] = 0;
        }
 
    // Do checking for matches on EACH OF THE INPUT WORDS
        for( var ndx = 0; ndx < inputWords.length; ndx++ ) {
 
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            if( ! checkForHitsWordAgainstPages( inputWords[ndx] ) ) {
                return;     // No sense in continuing, match has failed.
            }
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
            for( var ndx2 = 0; ndx2 < hitsArr.length; ndx2++ ) {
                if( hitsArr[ndx2] == 0 ) {
                    maskArr[ndx2] = 0;
                }
                else {
                    if( maskArr[ndx2] != 0 ) {
                        maskArr[ndx2] += hitsArr[ndx2];
                    }
                }
            }
        }
 
    // From the final 'maskArr', generate 'matchesArrHits' and 'matchesArrIndices'    
        for( var ndx = 0; ndx < maskArr.length; ndx++ ) {
            if( maskArr[ndx] ) {
                matchesArrHits[matchesArrHits.length] = maskArr[ndx];
                matchesArrIndices[matchesArrIndices.length] = ndx;
            }
        }
 
    // If there were any hits, then sort them by highest hits first
        if( matchesArrIndices.length ) {
            bubbleSortWithShadow(matchesArrHits, matchesArrIndices);
        }
}
//---------------------------------------------------
function checkForHitsWordAgainstPages(w)        
{
    var hitAnywhere = 0;
    
    if(showInputStringAlerts){alert( "Length of sc2: " + top.sc2.length );}
 
    // Process each of the content lines (one per file/page)
        for(var ndx=0; ndx < top.sc2.length; ndx++) {
 
            // Put the cached title into glob_title
                glob_title = top.sc1[ndx];
 
            // Put the cached content line into glob_phrase
                glob_phrase = top.sc2[ndx];
                
            if( maskArr[ndx] ) {
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                if( top.isDblByte ) {
                    hitsArr[ndx] = checkForHitsWordAgainstTitleAndLine2(w,ndx);
                }
                else {
                    hitsArr[ndx] = checkForHitsWordAgainstTitleAndLine(w,ndx);
                }
                if( hitsArr[ndx] ) {
                    hitAnywhere = 1;
                }
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            }
        }
    return hitAnywhere;
}
//---------------------------------------------------
function checkForHitsWordAgainstTitleAndLine(w, lineNdx)
{
    var words;
    var titleHitCnt = 0;
    var contentHitCnt = 0;
    var regex = new RegExp(w, "i");
 
    // TITLE .........................................
        words = new Array();
        words = glob_title.split(" ");
 
        // EXECUTE TITLE MATCH TEST
        for( var ndx = 0; ndx < words.length; ndx++ ) {
            if( w == words[ndx] ) {
                titleHitCnt += 100;
                break;
            }
        }
 
    // CONTENT .........................................
        words = new Array();
        words = glob_phrase.split(" ");
 
        // EXECUTE CONTENT MATCH TEST
        if( regex.test(glob_phrase) ) {    // See if word is anywhere within the phrase first.
            for( var ndx = 0; ndx < words.length; ndx++ ) {
                if( w == words[ndx] ) {
                    contentHitCnt += getInstanceCount(lineNdx,ndx);
                    break;
                }
                //else if( w < words[ndx] ) { // If word is greater than the remaining words, leave
                //    break;
                //}
            }
        }
 
    return titleHitCnt + contentHitCnt;
}
//---------------------------------------------------
function checkForHitsWordAgainstTitleAndLine2(w, lineNdx)
{
    var titleHitCnt = 0;
    var contentHitCnt = 0;
 
    // TITLE .........................................
        if( glob_title.indexOf(w) != -1 ) {
            titleHitCnt = 100;
        }
 
    // CONTENT .........................................
        contentHitCnt = indexesOf(glob_phrase,w);
 
    return titleHitCnt + contentHitCnt;
}
//---------------------------------------------------
// checkTheInputString
// 
//  returns...
//        empty string - if there is valid input to search
//        message string - if there is NO VALID INPUT to search
//---------------------------------------------------
function checkTheInputString()
{
    var myArr = new Array();
    var tempArr = new Array();
    var foundStopOrShortWord = 0;
    var ptn1 = /\d\D/;
    var ptn2 = /\D\d/;
 
    handleWhitespaceRemoval();
 
    searchTerm = searchTerm.toLowerCase();
 
    searchTerm = filterTheChars(searchTerm);
        
    handleWhitespaceRemoval();
 
    if( searchTerm.length ) {
        
        // Split the searchTerm
        tempArr = searchTerm.split(" ",100);
        if(showInputStringAlerts){alert( "size of tempArr: " + tempArr.length );}
 
        // Handle periods
        for( var ndx = 0; ndx < tempArr.length; ndx++ ) {
            if( tempArr[ndx].charCodeAt(0) == 46 ) {    // periods at the start of word
                //tempArr[ndx] = tempArr[ndx].substr(1); // NOTE: We don't want to do this. (e.g. ".txt")
            }
            if( tempArr[ndx].charCodeAt(tempArr[ndx].length-1) == 46 ) { // end of word
                tempArr[ndx] = tempArr[ndx].substr(0,tempArr[ndx].length-1);
            }
        }
            
        // Do stopwords and shortwords removal
        for( var ndx = 0; ndx < tempArr.length; ndx++ ) {
            var word = tempArr[ndx];
            if(showInputStringAlerts){alert( "Checking word: " + word );}
            
            if( ! top.sw[word] ) {
                if( word.length < 2 ) {
                    foundStopOrShortWord = 1;
                }
                else if( (word.length > 2) || (ptn1.test(word) || ptn2.test(word)) ) {
                    myArr[myArr.length] = tempArr[ndx];
                }
                else {
                    foundStopOrShortWord = 1;
                }
            }
            else {
                foundStopOrShortWord = 1;
            }
        }
 
        // Now reconstruct the searchTerm, based upon the 'myArr'
        searchTerm = "";
        for( var ndx = 0; ndx < myArr.length; ndx++ ) {
            searchTerm = searchTerm + myArr[ndx] + " ";
        }
 
        handleWhitespaceRemoval();
 
        if(showInputStringAlerts){alert( "FINAL SEARCH TERM: *" + searchTerm + "*" );}
            
        if( foundStopOrShortWord && ! searchTerm.length ) {
            return MSG_stopAndShortWords;
        }
        top.srch_input_massaged = searchTerm;
        
        return "";
    } 
    else {
        if( !searchTermComp.length )
            return MSG_noSearchTermEntered;
        else
            return MSG_noResultFound;
        
    }
}
//qWR
//---------------------------------------------------
// checkTheInputString3
// 
//  returns...
//        empty string - if there is valid input to search
//        message string - if there is NO VALID INPUT to search
//---------------------------------------------------
function checkTheInputString3()
{
    var myArr = new Array();
    var tempArr = new Array();
    var foundStopOrShortWord = 0;
    var ptn1 = /\d\D/;
    var ptn2 = /\D\d/;
 
    handleWhitespaceRemoval();
 
    searchTerm = searchTerm.toLowerCase();
 
    //searchTerm = filterTheChars(searchTerm);
        
    handleWhitespaceRemoval();
 
    if( searchTerm.length ) {
        
        // Split the searchTerm
            tempArr = searchTerm.split(" ",100);
            if(showInputStringAlerts){alert( "size of tempArr: " + tempArr.length );}
 
        // Handle periods
            for( var ndx = 0; ndx < tempArr.length; ndx++ ) {
                if( tempArr[ndx].charCodeAt(0) == 46 ) {    // periods at the start of word
                    //tempArr[ndx] = tempArr[ndx].substr(1); // NOTE: We don't want to do this. (e.g. ".txt")
                }
                if( tempArr[ndx].charCodeAt(tempArr[ndx].length-1) == 46 ) { // end of word
                    tempArr[ndx] = tempArr[ndx].substr(0,tempArr[ndx].length-1);
                }
            }
            
        // Do stopwords and shortwords removal
            for( var ndx = 0; ndx < tempArr.length; ndx++ ) {
                var word = tempArr[ndx];
                if(showInputStringAlerts){alert( "Checking word: " + word );}
                
                if( ! top.sw[word] ) {
                    if( word.length < 2 ) {
                        foundStopOrShortWord = 1;
                    }
                    else if( (word.length > 2) || (ptn1.test(word) || ptn2.test(word)) ) {
                        myArr[myArr.length] = tempArr[ndx];
                    }
                    else {
                        foundStopOrShortWord = 1;
                    }
                }
                else {
                    foundStopOrShortWord = 1;
                }
            }
 
        // Now reconstruct the searchTerm, based upon the 'myArr'
            searchTerm = "";
            for( var ndx = 0; ndx < myArr.length; ndx++ ) {
                searchTerm = searchTerm + myArr[ndx] + " ";
            }
 
        handleWhitespaceRemoval();
 
        if(showInputStringAlerts){alert( "FINAL SEARCH TERM: *" + searchTerm + "*" );}
            
        if( foundStopOrShortWord && ! searchTerm.length ) {
            return MSG_stopAndShortWords;
        }
        top.srch_input_massaged = searchTerm;
        return "";
    } 
    else {
        return MSG_noSearchTermEntered;
    }
}
// !qWR
//---------------------------------------------------
function checkTheInputString2()        // double-byte version
{
    var myArr = new Array();
    var tempArr = new Array();
    var foundStopOrShortWord = 0;
    var ptn1 = /\d\D/;
    var ptn2 = /\D\d/;
    var ptn3 = /[^\x00-\xff]/g;
 
    handleWhitespaceRemoval();
 
    searchTerm = searchTerm.toLowerCase();
 
    searchTerm = filterTheChars(searchTerm);
        
    handleWhitespaceRemoval();
 
    if( searchTerm.length ) {
        
        // Split the searchTerm
        tempArr = searchTerm.split(" ",100);
        if(showInputStringAlerts){alert( "size of tempArr: " + tempArr.length );}
 
        // Handle periods
        for( var ndx = 0; ndx < tempArr.length; ndx++ ) {
            if( tempArr[ndx].charCodeAt(0) == 46 ) {    // periods at the start of word
                //tempArr[ndx] = tempArr[ndx].substr(1); // NOTE: We don't want to do this. (e.g. ".txt")
            }
            if( tempArr[ndx].charCodeAt(tempArr[ndx].length-1) == 46 ) { // end of word
                tempArr[ndx] = tempArr[ndx].substr(0,tempArr[ndx].length-1);
            }
        }
            
        // Do stopwords and shortwords removal
        for( var ndx = 0; ndx < tempArr.length; ndx++ ) {
            var word = tempArr[ndx];
            if(showInputStringAlerts){alert( "Checking word: " + word );}
            
            if( ! top.sw[word] ) {
                if( word.length < 2 ) {
                    foundStopOrShortWord = 1;
                }
                else if( (word.length > 2) || (ptn1.test(word) || ptn2.test(word)) || ptn3.test(word)) {
                    myArr[myArr.length] = tempArr[ndx];
                }
                else {
                    foundStopOrShortWord = 1;
                }
            }
            else {
                foundStopOrShortWord = 1;
            }
        }
 
        // Now reconstruct the searchTerm, based upon the 'myArr'
        searchTerm = "";
        for( var ndx = 0; ndx < myArr.length; ndx++ ) {
            searchTerm = searchTerm + myArr[ndx] + " ";
        }
 
        handleWhitespaceRemoval();
 
        if(showInputStringAlerts){alert( "FINAL SEARCH TERM: *" + searchTerm + "*" );}
            
        if( foundStopOrShortWord && ! searchTerm.length ) {
            return MSG_stopAndShortWords;
        }
        top.srch_input_massaged = searchTerm;
        
        return "";
    } 
    else {
        return MSG_noSearchTermEntered;
    }
}
//---------------------------------------------------
function doIEsearch()
{
    var stStr = "";
            
    document.forms[0].q.value = top.srch_input_massaged;
 
    if( top.srch_message.length ) {
        document.getElementById("results").innerHTML = top.srch_message;
        top.srch_message = "";
    }
    else if( top.srch_1_shot ) {
        top.srch_1_shot = 0;
        
        searchTerm = top.srch_input_massaged;
        checkForHits();    // Sets: 'matchesArrIndices' and 'matchesArrHits'
        var locationStr=window.location.href;
 
        if( matchesArrIndices.length ) {    // If there were matches/hits...  /* Changed for CS4 */
 
            if(locationStr.indexOf("chcSearch.html") == -1){
            stStr = "<div class=\"form\">" + MSG_pagesContaining + "<strong>" + top.srch_input_massaged  + "</strong></div><br /><br />\n";
            }
 
            document.getElementById("results").innerHTML = stStr + buildHtmlResultsStr();
        }
        else {                                                  /* Changed for CS4 */
            document.getElementById("results").innerHTML = MSG_noPagesContain + "<strong>" + top.srch_input_massaged  + "</strong><br /><br />";
 
        }
        //searching_message.style.visibility="visible";
    }
    top.srch_input_verbatim = "";
}
//---------------------------------------------------
function getInstanceCount( lineIndex, wordIndex )
{
    var instancesStr = top.instances[lineIndex];    // e.g. "1432931"
    var ch = instancesStr.substr(wordIndex,1);
    
    return parseInt(ch);
}
//---------------------------------------------------
function handleWhitespaceRemoval()
{
    var re_1 = /^\s/;
    var re_2 = /\s$/;
    var re_3 = /\s\s/;
    var temp;
 
    // Remove leading whitespace
    while( true ) {
        temp = searchTerm.replace(re_1,"");
        if( temp == searchTerm ) {
            break;
        }
        searchTerm = temp;
    }
    // Remove trailing whitespace
    while( true ) {
        temp = searchTerm.replace(re_2,"");
        if( temp == searchTerm ) {
            break;
        }
        searchTerm = temp;
    }
    // Replace multiple contiguous spaces with a single space
    while( searchTerm.search(re_3) != -1 ) {
        temp = searchTerm.replace(re_3," ");
        searchTerm = temp;
    }
}
//--------------------------------------------------
function isAcceptableChar(chrNdx)
{
    var acceptableChars = new Array( 32, 46, 95 );    // space, period, underscore
    
    for( var ndx = 0; ndx < acceptableChars.length; ndx++ ) {
        if( chrNdx == acceptableChars[ndx] ) {
            return true;
        }
    }
    return false;
}
//--------------------------------------------------
function indexesOf(str,ptn)
{
    var position = 0;
    var hits = -1;
    var start = -1;
 
    while( position != -1 ) {
        position = str.indexOf(ptn, start+1);
        hits += 1;
        start = position;
    }
    return hits;
}
//--------------------------------------------------
function filterTheChars(line)
{
    var retStr = "",tempStr;
    var ch, chCode, retChr;
    var ndx;
    
    for( ndx = 0; ndx < line.length; ndx++ ) {
        ch = line.substr(ndx,1);
        chCode = ch.charCodeAt(0);
        
        if( (chCode >= 192) && (chCode <= 221) ) {    // Handle capital upper-ASCII characters
            chCode = chCode + 32;
            retChr = ASCII_to_char(chCode);
        }
        else if( withinAcceptableRanges(chCode) || isAcceptableChar(chCode) ) { // Acceptable characters
            retChr = ch;
        }
        else {
            tempStr = isLigatureChar(chCode);
 
            if( tempStr.length ) {    //Don't replace ligatures.
                retChr = ch;
            }
            else {        // Turn all else into space    
                retChr = " ";
            }
        }
 
        // Grow the return string
        retStr += retChr;
    }
    
    return retStr;
}
//--------------------------------------------------
function isLigatureChar(codeToCheck) {
    var xlatTblNdx, code, replStr = "";
 
    for( xlatTblNdx = 0; xlatTblNdx < upperAsciiXlatTbl.length; xlatTblNdx+=2 ) {
 
        code = upperAsciiXlatTbl[xlatTblNdx];
        if( code == codeToCheck ) {
            replStr = upperAsciiXlatTbl[xlatTblNdx+1];
            break;
        }
    }
    
    return replStr;
}
//--------------------------------------------------
function respondToSearchButton() 
{
    var myStr;
    document.getElementById("results").innerHTML = ""; //We don't expect this to be slow enough to need a message.    
    top.srch_input_verbatim = document.forms[0].q.value;
    searchTerm = document.forms[0].q.value;
    searchTermComp = searchTerm;
    
    if( top.isDblByte ) {
        myStr = checkTheInputString2();
    }
    else if (top.isT4) {
        myStr = checkTheInputString3();
    }
    else {
        myStr = checkTheInputString();    
    }
    
    top.srch_message = myStr;
    top.srch_1_shot = top.srch_message.length ? 0 : 1;
    
    doIEsearch();
}
//--------------------------------------------------
function respondToSearchLoad() 
{
    var externalQuery = GetCookie("externalQuery");
    if (externalQuery == null) { 
        externalQuery = GetCookie("q");
    }
 
    if (externalQuery != null) { 
        searchTermComp = externalQuery;
        var myStr;
 
        // Erich: bugfix 1762094, 1826817, 1821365, 1795591
        top.srch_input_verbatim = externalQuery.replace(/[\u0020-\u002d]|\u002f|[\u003a-\u0040]|[\u005b-\u005e]|\u0060|[\u007b-\u0089]|\u008b|[\u0091-\u0099]|\u009b|[\u00a1-\u00bf]|[\u2000-\u206f]|[\u3000-\u303f]|[\uff01-\uff0f]|[\uff1a-\uff1f]+/g, " ");
        searchTerm = top.srch_input_verbatim;
 
        if( top.isDblByte ) {
            myStr = checkTheInputString2();
        }
        else {
            myStr = checkTheInputString();    
        }
        
        top.srch_message = myStr;
        top.srch_1_shot = top.srch_message.length ? 0 : 1;
        
        doIEsearch();
    }
}
//---------------------------------------------------
function strReplace(orig,src,dest)
{
    var startPos=0;
    var matchPos = orig.indexOf(src,startPos);
    var retLine="";
    
    while(matchPos != -1) {
        retLine = retLine + orig.substring(startPos,matchPos) + dest;
        startPos = matchPos+1;
        matchPos = orig.indexOf(src,startPos);
    }
    if(! retLine.length) {return orig;}
    else {return retLine+orig.substring(startPos,orig.length);}
}
//--------------------------------------------------
function withinAcceptableRanges(chrNdx)
{    
    var acceptableRanges = new Array( "48-57","65-90","97-122","224-229","231-239","241-246","248-253","255-255");
 
    if (chrNdx > 255) {
        return true;
    }
 
    for( var ndx = 0; ndx < acceptableRanges.length; ndx++ ) {
        var start_finish = new Array();
 
        start_finish = acceptableRanges[ndx].split("-");
        
        if( (chrNdx >= start_finish[0]) && (chrNdx <= start_finish[1]) ) {
            return true;
        }
    }
    return false;
}
//--------------------------------------------------
function ASCII_to_char(num_in)
{
    var str_out = "";
    var num_out = parseInt(num_in);
    
    num_out = decodeURIComponent('%' + num_out.toString(16));
    str_out += num_out;
    
    return decodeURIComponent(str_out);
}
//--------------------------------------------------
var agt=navigator.userAgent.toLowerCase();
var use_chm_behavior = false;
var use_robohelp_behavior = false;
var use_ie_behavior = false;
var use_ie_6_behavior = false;
var use_chc_behavior = false;
 
if (agt.indexOf("adobe help viewer 2") != -1 || agt.indexOf("community help client") != -1) {
    use_robohelp_behavior = true;
    use_chc_behavior = true;
}
 
// Check for .chm extension too...
if ((""+self.location).toLowerCase().indexOf(".chm")!=-1) {
    use_chm_behavior = true;
}
 
if (agt.indexOf("msie") != -1) {
    use_ie_behavior = true;
}
if ((agt.indexOf("msie 5") != -1) || (agt.indexOf("msie 6") != -1)) {
    use_ie_6_behavior = true;
}
 
//--------------------------------------------------
 
var Url = {
 
    // public method for url encoding
    encode : function (string) {
        return escape(this._utf8_encode(string));
    },
 
    // public method for url decoding
    decode : function (string) {
        return this._utf8_decode(unescape(string));
    },
 
    // private method for UTF-8 encoding
    _utf8_encode : function (string) {
        string = string.replace(/\r\n/g,"\n");
        var utftext = "";
 
        for (var n = 0; n < string.length; n++) {
 
            var c = string.charCodeAt(n);
 
            if (c < 128) {
                utftext += String.fromCharCode(c);
            }
            else if((c > 127) && (c < 2048)) {
                utftext += String.fromCharCode((c >> 6) | 192);
                utftext += String.fromCharCode((c & 63) | 128);
            }
            else {
                utftext += String.fromCharCode((c >> 12) | 224);
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                utftext += String.fromCharCode((c & 63) | 128);
            }
 
        }
 
        return utftext;
    },
 
    // private method for UTF-8 decoding
    _utf8_decode : function (utftext) {
        var string = "";
        var i = 0;
        var c = c1 = c2 = 0;
 
        while ( i < utftext.length ) {
 
            c = utftext.charCodeAt(i);
 
            if (c < 128) {
                string += String.fromCharCode(c);
                i++;
            }
            else if((c > 191) && (c < 224)) {
                c2 = utftext.charCodeAt(i+1);
                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                i += 2;
            }
            else {
                c2 = utftext.charCodeAt(i+1);
                c3 = utftext.charCodeAt(i+2);
                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                i += 3;
            }
 
        }
 
        return string;
    }
 
}
//--------------------------------------------------
function scrollToNameAnchor() 
{
    var nameAnchor = GetCookie("nameAnchor");
    if (nameAnchor != null) { 
        document.location.hash = nameAnchor;
    }
}
 
 
// ugly workaround for missing support for selectorText in Netscape6/Mozilla
// call onLoad() or before you need to do anything you would have otherwise used
// selectorText for.
var ugly_selectorText_workaround_flag = false;
var allStyleRules;
// code developed using the following workaround (CVS v1.15) as an example.
// http://lxr.mozilla.org/seamonkey/source/extensions/xmlterm/ui/content/XMLTermCommands.js
function ugly_selectorText_workaround() {
    if((navigator.userAgent.indexOf("Gecko") == -1) ||
       (ugly_selectorText_workaround_flag)) {
        return; // we've already been here or shouldn't be here
    }
    var styleElements = document.getElementsByTagName("style");
    
    for(var i = 0; i < styleElements.length; i++) {
        var styleText = styleElements[i].firstChild.data;
        // this should be using match(/\b[\w-.]+(?=\s*\{)/g but ?= causes an
        // error in IE5, so we include the open brace and then strip it
        allStyleRules = styleText.match(/\b[\w-.]+(\s*\{)/g);
    }
 
    for(var i = 0; i < allStyleRules.length; i++) {
        // probably insufficient for people who like random gobs of 
        // whitespace in their styles
        allStyleRules[i] = allStyleRules[i].substr(0, (allStyleRules[i].length - 2));
    }
    ugly_selectorText_workaround_flag = true;
}
 
 
// setStyleById: given an element id, style property and 
// value, apply the style.
// args:
//  i - element id
//  p - property
//  v - value
//
function setStyleById(i, p, v) {
    var n = document.getElementById(i);
    n.style[p] = v;
}
 
// getStyleById: given an element ID and style property
// return the current setting for that property, or null.
// args:
//  i - element id
//  p - property
function getStyleById(i, p) {
    var n = document.getElementById(i);
    var s = eval("n.style." + p);
 
    // try inline
    if((s != "") && (s != null)) {
        return s;
    }
 
    // try currentStyle
    if(n.currentStyle) {
        var s = eval("n.currentStyle." + p);
        if((s != "") && (s != null)) {
            return s;
        }
    }
    
    // try styleSheets
    var sheets = document.styleSheets;
    if(sheets.length > 0) {
        // loop over each sheet
        for(var x = 0; x < sheets.length; x++) {
            // grab stylesheet rules
            var rules = sheets[x].cssRules;
            if(rules.length > 0) {
                // check each rule
                for(var y = 0; y < rules.length; y++) {
                    var z = rules[y].style;
                    // selectorText broken in NS 6/Mozilla: see
                    // http://bugzilla.mozilla.org/show_bug.cgi?id=51944
                    ugly_selectorText_workaround();
                    if(allStyleRules) {
                        if(allStyleRules[y] == i) {
                            return z[p];
                        }            
                    } else {
                        // use the native selectorText and style stuff
                        if(((z[p] != "") && (z[p] != null)) ||
                           (rules[y].selectorText == i)) {
                            return z[p];
                        }
                    }
                }
            }
        }
    }
    return null;
}
 
// setStyleByClass: given an element type and a class selector,
// style property and value, apply the style.
// args:
//  t - type of tag to check for (e.g., SPAN)
//  c - class name
//  p - CSS property
//  v - value
var ie = (document.all) ? true : false;
 
function setStyleByClass(t,c,p,v){
    var elements;
    if(t == '*') {
        // '*' not supported by IE/Win 5.5 and below
        elements = (ie) ? document.all : document.getElementsByTagName('*');
    } else {
        elements = document.getElementsByTagName(t);
    }
    for(var i = 0; i < elements.length; i++){
        var node = elements.item(i);
        for(var j = 0; j < node.attributes.length; j++) {
            if(node.attributes.item(j).nodeName == 'class') {
                if(node.attributes.item(j).nodeValue == c) {
                    eval('node.style.' + p + " = '" +v + "'");
                }
            }
        }
    }
}
 
// getStyleByClass: given an element type, a class selector and a property,
// return the value of the property for that element type.
// args:
//  t - element type
//  c - class identifier
//  p - CSS property
function getStyleByClass(t, c, p) {
    // first loop over elements, because if they've been modified they
    // will contain style data more recent than that in the stylesheet
    var elements;
    if(t == '*') {
        // '*' not supported by IE/Win 5.5 and below
        elements = (ie) ? document.all : document.getElementsByTagName('*');
    } else {
        elements = document.getElementsByTagName(t);
    }
    for(var i = 0; i < elements.length; i++){
        var node = elements.item(i);
        for(var j = 0; j < node.attributes.length; j++) {
            if(node.attributes.item(j).nodeName == 'class') {
                if(node.attributes.item(j).nodeValue == c) {
                    var theStyle = eval('node.style.' + p);
                    if((theStyle != "") && (theStyle != null)) {
                        return theStyle;
                    }
                }
            }
        }        
    }
    // if we got here it's because we didn't find anything
    // try styleSheets
    var sheets = document.styleSheets;
    if(sheets.length > 0) {
        // loop over each sheet
        for(var x = 0; x < sheets.length; x++) {
            // grab stylesheet rules
            var rules = sheets[x].cssRules;
            if(rules.length > 0) {
                // check each rule
                for(var y = 0; y < rules.length; y++) {
                    var z = rules[y].style;
                    // selectorText broken in NS 6/Mozilla: see
                    // http://bugzilla.mozilla.org/show_bug.cgi?id=51944
                    ugly_selectorText_workaround();
                    if(allStyleRules) {
                        if((allStyleRules[y] == c) ||
                           (allStyleRules[y] == (t + "." + c))) {
                            return z[p];
                        }            
                    } else {
                        // use the native selectorText and style stuff
                        if(((z[p] != "") && (z[p] != null)) &&
                           ((rules[y].selectorText == c) ||
                            (rules[y].selectorText == (t + "." + c)))) {
                            return z[p];
                        }
                    }
                }
            }
        }
    }
 
    return null;
}
 
// setStyleByTag: given an element type, style property and 
// value, and whether the property should override inline styles or
// just global stylesheet preferences, apply the style.
// args:
//  e - element type or id
//  p - property
//  v - value
//  g - boolean 0: modify global only; 1: modify all elements in document
function setStyleByTag(e, p, v, g) {
    if(g) {
        var elements = document.getElementsByTagName(e);
        for(var i = 0; i < elements.length; i++) {
            elements.item(i).style[p] = v;
        }
    } else {
        var sheets = document.styleSheets;
        if(sheets.length > 0) {
            for(var i = 0; i < sheets.length; i++) {
                var rules = sheets[i].cssRules;
                if(rules.length > 0) {
                    for(var j = 0; j < rules.length; j++) {
                        var s = rules[j].style;
                        // selectorText broken in NS 6/Mozilla: see
                        // http://bugzilla.mozilla.org/show_bug.cgi?id=51944
                        ugly_selectorText_workaround();
                        if(allStyleRules) {
                            if(allStyleRules[j] == e) {
                                s[p] = v;
                            }            
                        } else {
                            // use the native selectorText and style stuff
                            if(((s[p] != "") && (s[p] != null)) &&
                               (rules[j].selectorText == e)) {
                                s[p] = v;
                            }
                        }
 
                    }
                }
            }
        }
    }
}
 
// getStyleByTag: given an element type and style property, return
// the property's value
// args:
//  e - element type
//  p - property
function getStyleByTag(e, p) {
    var sheets = document.styleSheets;
    if(sheets.length > 0) {
        for(var i = 0; i < sheets.length; i++) {
            var rules = sheets[i].cssRules;
            if(rules.length > 0) {
                for(var j = 0; j < rules.length; j++) {
                    var s = rules[j].style;
                    // selectorText broken in NS 6/Mozilla: see
                    // http://bugzilla.mozilla.org/show_bug.cgi?id=51944
                    ugly_selectorText_workaround();
                    if(allStyleRules) {
                        if(allStyleRules[j] == e) {
                            return s[p];
                        }            
                    } else {
                        // use the native selectorText and style stuff
                        if(((s[p] != "") && (s[p] != null)) &&
                           (rules[j].selectorText == e)) {
                            return s[p];
                        }
                    }
 
                }
            }
        }
    }
 
    // if we don't find any style sheets, return the value for the first
    // element of this type we encounter without a CLASS or STYLE attribute
    var elements = document.getElementsByTagName(e);
    var sawClassOrStyleAttribute = false;
    for(var i = 0; i < elements.length; i++) {
        var node = elements.item(i);
        for(var j = 0; j < node.attributes.length; j++) {
            if((node.attributes.item(j).nodeName == 'class') ||
               (node.attributes.item(j).nodeName == 'style')){
               sawClassOrStyleAttribute = true;
            }
        }
        if(! sawClassOrStyleAttribute) {
            return elements.item(i).style[p];
        }
    }
}
 
 
 
//showSWF: - changes the display property of a SWF from none to block 
//         -  hides the button
// args:
//  sfw - the name of the swf file (without file extension)
function showSWF( swf ){
    document.getElementById(swf).style.display = "block";
    if ( document.getElementById( swf + "Btn" ) ){
        document.getElementById( swf + "Btn" ).style.display = "none";
    }
}
 
 
 
//
// Adobe Help Pod
//
var aspodjs = "/en_US/shared/ahpods/AHPod.js";
document.write('<script src="'+aspodjs+'"type="text/javascript" language="Javascript" charset="UTF-8"></script>');