Salome HOME
fb848c513274e8a876c506cb98aca023a8b9cd27
[modules/smesh.git] / doc / salome / gui / SMESH / whlang.js
1 //      WebHelp 5.10.001
2 var garrSortChar=new Array();
3 var gaFtsStop=new Array();
4 var gaFtsStem=new Array();
5 var gbWhLang=false;
6
7 garrSortChar[0] = 0;
8 garrSortChar[1] = 1;
9 garrSortChar[2] = 2;
10 garrSortChar[3] = 3;
11 garrSortChar[4] = 4;
12 garrSortChar[5] = 5;
13 garrSortChar[6] = 6;
14 garrSortChar[7] = 7;
15 garrSortChar[8] = 8;
16 garrSortChar[9] = 40;
17 garrSortChar[10] = 41;
18 garrSortChar[11] = 42;
19 garrSortChar[12] = 43;
20 garrSortChar[13] = 44;
21 garrSortChar[14] = 9;
22 garrSortChar[15] = 10;
23 garrSortChar[16] = 11;
24 garrSortChar[17] = 12;
25 garrSortChar[18] = 13;
26 garrSortChar[19] = 14;
27 garrSortChar[20] = 15;
28 garrSortChar[21] = 16;
29 garrSortChar[22] = 17;
30 garrSortChar[23] = 18;
31 garrSortChar[24] = 19;
32 garrSortChar[25] = 20;
33 garrSortChar[26] = 21;
34 garrSortChar[27] = 22;
35 garrSortChar[28] = 23;
36 garrSortChar[29] = 24;
37 garrSortChar[30] = 25;
38 garrSortChar[31] = 26;
39 garrSortChar[32] = 38;
40 garrSortChar[33] = 45;
41 garrSortChar[34] = 46;
42 garrSortChar[35] = 47;
43 garrSortChar[36] = 48;
44 garrSortChar[37] = 49;
45 garrSortChar[38] = 50;
46 garrSortChar[39] = 33;
47 garrSortChar[40] = 51;
48 garrSortChar[41] = 52;
49 garrSortChar[42] = 53;
50 garrSortChar[43] = 88;
51 garrSortChar[44] = 54;
52 garrSortChar[45] = 34;
53 garrSortChar[46] = 55;
54 garrSortChar[47] = 56;
55 garrSortChar[48] = 115;
56 garrSortChar[49] = 119;
57 garrSortChar[50] = 121;
58 garrSortChar[51] = 123;
59 garrSortChar[52] = 125;
60 garrSortChar[53] = 126;
61 garrSortChar[54] = 127;
62 garrSortChar[55] = 128;
63 garrSortChar[56] = 129;
64 garrSortChar[57] = 130;
65 garrSortChar[58] = 57;
66 garrSortChar[59] = 58;
67 garrSortChar[60] = 89;
68 garrSortChar[61] = 90;
69 garrSortChar[62] = 91;
70 garrSortChar[63] = 59;
71 garrSortChar[64] = 60;
72 garrSortChar[65] = 131;
73 garrSortChar[66] = 148;
74 garrSortChar[67] = 150;
75 garrSortChar[68] = 154;
76 garrSortChar[69] = 158;
77 garrSortChar[70] = 168;
78 garrSortChar[71] = 171;
79 garrSortChar[72] = 173;
80 garrSortChar[73] = 175;
81 garrSortChar[74] = 185;
82 garrSortChar[75] = 187;
83 garrSortChar[76] = 189;
84 garrSortChar[77] = 191;
85 garrSortChar[78] = 193;
86 garrSortChar[79] = 197;
87 garrSortChar[80] = 214;
88 garrSortChar[81] = 216;
89 garrSortChar[82] = 218;
90 garrSortChar[83] = 220;
91 garrSortChar[84] = 225;
92 garrSortChar[85] = 230;
93 garrSortChar[86] = 240;
94 garrSortChar[87] = 242;
95 garrSortChar[88] = 244;
96 garrSortChar[89] = 246;
97 garrSortChar[90] = 252;
98 garrSortChar[91] = 61;
99 garrSortChar[92] = 62;
100 garrSortChar[93] = 63;
101 garrSortChar[94] = 64;
102 garrSortChar[95] = 66;
103 garrSortChar[96] = 67;
104 garrSortChar[97] = 131;
105 garrSortChar[98] = 148;
106 garrSortChar[99] = 150;
107 garrSortChar[100] = 154;
108 garrSortChar[101] = 158;
109 garrSortChar[102] = 168;
110 garrSortChar[103] = 171;
111 garrSortChar[104] = 173;
112 garrSortChar[105] = 175;
113 garrSortChar[106] = 185;
114 garrSortChar[107] = 187;
115 garrSortChar[108] = 189;
116 garrSortChar[109] = 191;
117 garrSortChar[110] = 193;
118 garrSortChar[111] = 197;
119 garrSortChar[112] = 214;
120 garrSortChar[113] = 216;
121 garrSortChar[114] = 218;
122 garrSortChar[115] = 220;
123 garrSortChar[116] = 225;
124 garrSortChar[117] = 230;
125 garrSortChar[118] = 240;
126 garrSortChar[119] = 242;
127 garrSortChar[120] = 244;
128 garrSortChar[121] = 246;
129 garrSortChar[122] = 252;
130 garrSortChar[123] = 68;
131 garrSortChar[124] = 69;
132 garrSortChar[125] = 70;
133 garrSortChar[126] = 71;
134 garrSortChar[127] = 27;
135 garrSortChar[128] = 114;
136 garrSortChar[129] = 28;
137 garrSortChar[130] = 82;
138 garrSortChar[131] = 170;
139 garrSortChar[132] = 85;
140 garrSortChar[133] = 112;
141 garrSortChar[134] = 109;
142 garrSortChar[135] = 110;
143 garrSortChar[136] = 65;
144 garrSortChar[137] = 113;
145 garrSortChar[138] = 223;
146 garrSortChar[139] = 86;
147 garrSortChar[140] = 213;
148 garrSortChar[141] = 29;
149 garrSortChar[142] = 255;
150 garrSortChar[143] = 30;
151 garrSortChar[144] = 31;
152 garrSortChar[145] = 80;
153 garrSortChar[146] = 81;
154 garrSortChar[147] = 83;
155 garrSortChar[148] = 84;
156 garrSortChar[149] = 111;
157 garrSortChar[150] = 36;
158 garrSortChar[151] = 37;
159 garrSortChar[152] = 79;
160 garrSortChar[153] = 229;
161 garrSortChar[154] = 222;
162 garrSortChar[155] = 87;
163 garrSortChar[156] = 212;
164 garrSortChar[157] = 32;
165 garrSortChar[158] = 254;
166 garrSortChar[159] = 251;
167 garrSortChar[160] = 39;
168 garrSortChar[161] = 72;
169 garrSortChar[162] = 97;
170 garrSortChar[163] = 98;
171 garrSortChar[164] = 99;
172 garrSortChar[165] = 100;
173 garrSortChar[166] = 73;
174 garrSortChar[167] = 101;
175 garrSortChar[168] = 74;
176 garrSortChar[169] = 102;
177 garrSortChar[170] = 133;
178 garrSortChar[171] = 93;
179 garrSortChar[172] = 103;
180 garrSortChar[173] = 35;
181 garrSortChar[174] = 104;
182 garrSortChar[175] = 75;
183 garrSortChar[176] = 105;
184 garrSortChar[177] = 92;
185 garrSortChar[178] = 122;
186 garrSortChar[179] = 124;
187 garrSortChar[180] = 76;
188 garrSortChar[181] = 106;
189 garrSortChar[182] = 107;
190 garrSortChar[183] = 108;
191 garrSortChar[184] = 77;
192 garrSortChar[185] = 120;
193 garrSortChar[186] = 199;
194 garrSortChar[187] = 94;
195 garrSortChar[188] = 116;
196 garrSortChar[189] = 117;
197 garrSortChar[190] = 118;
198 garrSortChar[191] = 78;
199 garrSortChar[192] = 131;
200 garrSortChar[193] = 131;
201 garrSortChar[194] = 131;
202 garrSortChar[195] = 131;
203 garrSortChar[196] = 131;
204 garrSortChar[197] = 131;
205 garrSortChar[198] = 131;
206 garrSortChar[199] = 150;
207 garrSortChar[200] = 158;
208 garrSortChar[201] = 158;
209 garrSortChar[202] = 158;
210 garrSortChar[203] = 158;
211 garrSortChar[204] = 175;
212 garrSortChar[205] = 175;
213 garrSortChar[206] = 175;
214 garrSortChar[207] = 175;
215 garrSortChar[208] = 154;
216 garrSortChar[209] = 193;
217 garrSortChar[210] = 197;
218 garrSortChar[211] = 197;
219 garrSortChar[212] = 197;
220 garrSortChar[213] = 197;
221 garrSortChar[214] = 197;
222 garrSortChar[215] = 95;
223 garrSortChar[216] = 197;
224 garrSortChar[217] = 230;
225 garrSortChar[218] = 230;
226 garrSortChar[219] = 230;
227 garrSortChar[220] = 230;
228 garrSortChar[221] = 246;
229 garrSortChar[222] = 227;
230 garrSortChar[223] = 224;
231 garrSortChar[224] = 131;
232 garrSortChar[225] = 131;
233 garrSortChar[226] = 131;
234 garrSortChar[227] = 131;
235 garrSortChar[228] = 131;
236 garrSortChar[229] = 131;
237 garrSortChar[230] = 131;
238 garrSortChar[231] = 150;
239 garrSortChar[232] = 158;
240 garrSortChar[233] = 158;
241 garrSortChar[234] = 158;
242 garrSortChar[235] = 158;
243 garrSortChar[236] = 175;
244 garrSortChar[237] = 175;
245 garrSortChar[238] = 175;
246 garrSortChar[239] = 175;
247 garrSortChar[240] = 154;
248 garrSortChar[241] = 193;
249 garrSortChar[242] = 197;
250 garrSortChar[243] = 197;
251 garrSortChar[244] = 197;
252 garrSortChar[245] = 197;
253 garrSortChar[246] = 197;
254 garrSortChar[247] = 96;
255 garrSortChar[248] = 197;
256 garrSortChar[249] = 230;
257 garrSortChar[250] = 230;
258 garrSortChar[251] = 230;
259 garrSortChar[252] = 230;
260 garrSortChar[253] = 246;
261 garrSortChar[254] = 227;
262 garrSortChar[255] = 250;
263
264 gaFtsStop[0] = "a";
265 gaFtsStop[1] = "about";
266 gaFtsStop[2] = "after";
267 gaFtsStop[3] = "against";
268 gaFtsStop[4] = "all";
269 gaFtsStop[5] = "also";
270 gaFtsStop[6] = "among";
271 gaFtsStop[7] = "an";
272 gaFtsStop[8] = "and";
273 gaFtsStop[9] = "are";
274 gaFtsStop[10] = "as";
275 gaFtsStop[11] = "at";
276 gaFtsStop[12] = "be";
277 gaFtsStop[13] = "became";
278 gaFtsStop[14] = "because";
279 gaFtsStop[15] = "been";
280 gaFtsStop[16] = "between";
281 gaFtsStop[17] = "but";
282 gaFtsStop[18] = "by";
283 gaFtsStop[19] = "can";
284 gaFtsStop[20] = "come";
285 gaFtsStop[21] = "do";
286 gaFtsStop[22] = "during";
287 gaFtsStop[23] = "each";
288 gaFtsStop[24] = "early";
289 gaFtsStop[25] = "for";
290 gaFtsStop[26] = "form";
291 gaFtsStop[27] = "found";
292 gaFtsStop[28] = "from";
293 gaFtsStop[29] = "had";
294 gaFtsStop[30] = "has";
295 gaFtsStop[31] = "have";
296 gaFtsStop[32] = "he";
297 gaFtsStop[33] = "her";
298 gaFtsStop[34] = "his";
299 gaFtsStop[35] = "however";
300 gaFtsStop[36] = "in";
301 gaFtsStop[37] = "include";
302 gaFtsStop[38] = "into";
303 gaFtsStop[39] = "is";
304 gaFtsStop[40] = "it";
305 gaFtsStop[41] = "its";
306 gaFtsStop[42] = "late";
307 gaFtsStop[43] = "later";
308 gaFtsStop[44] = "made";
309 gaFtsStop[45] = "many";
310 gaFtsStop[46] = "may";
311 gaFtsStop[47] = "me";
312 gaFtsStop[48] = "med";
313 gaFtsStop[49] = "more";
314 gaFtsStop[50] = "most";
315 gaFtsStop[51] = "near";
316 gaFtsStop[52] = "no";
317 gaFtsStop[53] = "non";
318 gaFtsStop[54] = "not";
319 gaFtsStop[55] = "of";
320 gaFtsStop[56] = "on";
321 gaFtsStop[57] = "only";
322 gaFtsStop[58] = "or";
323 gaFtsStop[59] = "other";
324 gaFtsStop[60] = "over";
325 gaFtsStop[61] = "several";
326 gaFtsStop[62] = "she";
327 gaFtsStop[63] = "some";
328 gaFtsStop[64] = "such";
329 gaFtsStop[65] = "than";
330 gaFtsStop[66] = "that";
331 gaFtsStop[67] = "the";
332 gaFtsStop[68] = "their";
333 gaFtsStop[69] = "then";
334 gaFtsStop[70] = "there";
335 gaFtsStop[71] = "these";
336 gaFtsStop[72] = "they";
337 gaFtsStop[73] = "this";
338 gaFtsStop[74] = "through";
339 gaFtsStop[75] = "to";
340 gaFtsStop[76] = "under";
341 gaFtsStop[77] = "until";
342 gaFtsStop[78] = "use";
343 gaFtsStop[79] = "was";
344 gaFtsStop[80] = "we";
345 gaFtsStop[81] = "were";
346 gaFtsStop[82] = "when";
347 gaFtsStop[83] = "where";
348 gaFtsStop[84] = "which";
349 gaFtsStop[85] = "who";
350 gaFtsStop[86] = "with";
351 gaFtsStop[87] = "you";
352
353 gaFtsStem[0] = "ed";
354 gaFtsStem[1] = "es";
355 gaFtsStem[2] = "er";
356 gaFtsStem[3] = "e";
357 gaFtsStem[4] = "s";
358 gaFtsStem[5] = "ingly";
359 gaFtsStem[6] = "ing";
360 gaFtsStem[7] = "ly";
361
362
363 // as javascript 1.3 support unicode instead of ISO-Latin-1
364 // need to transfer come code back to ISO-Latin-1 for compare purpose
365 // Note: Different Language(Code page) maybe need different array:
366 var gaUToC=new Array();
367 gaUToC[8364]=128;
368 gaUToC[8218]=130;
369 gaUToC[402]=131;
370 gaUToC[8222]=132;
371 gaUToC[8230]=133;
372 gaUToC[8224]=134;
373 gaUToC[8225]=135;
374 gaUToC[710]=136;
375 gaUToC[8240]=137;
376 gaUToC[352]=138;
377 gaUToC[8249]=139;
378 gaUToC[338]=140;
379 gaUToC[381]=142;
380 gaUToC[8216]=145;
381 gaUToC[8217]=146;
382 gaUToC[8220]=147;
383 gaUToC[8221]=148;
384 gaUToC[8226]=149;
385 gaUToC[8211]=150;
386 gaUToC[8212]=151;
387 gaUToC[732]=152;
388 gaUToC[8482]=153;
389 gaUToC[353]=154;
390 gaUToC[8250]=155;
391 gaUToC[339]=156;
392 gaUToC[382]=158;
393 gaUToC[376]=159;
394
395 var gsBiggestChar="";
396 function getBiggestChar()
397 {
398         if(gsBiggestChar.length==0)
399         {
400                 if(garrSortChar.length<256)
401                         gsBiggestChar=String.fromCharCode(255);
402                 else
403                 {
404                         var nBiggest=0;
405                         var nBigChar=0;
406                         for(var i=0;i<=255;i++)
407                         {
408                                 if(garrSortChar[i]>nBiggest)
409                                 {
410                                         nBiggest=garrSortChar[i];
411                                         nBigChar=i;
412                                 }
413                         }
414                         gsBiggestChar=String.fromCharCode(nBigChar);
415                 }
416
417         }       
418         return gsBiggestChar;
419 }
420
421 function getCharCode(str,i)
422 {
423         var code=str.charCodeAt(i)
424         if(code>256)
425         {
426                 code=gaUToC[code];
427         }
428         return code;
429 }
430
431 function compare(strText1,strText2)
432 {
433         if(garrSortChar.length<256)
434         {
435                 var strt1=strText1.toLowerCase();
436                 var strt2=strText2.toLowerCase();
437                 if(strt1<strt2) return -1;
438                 if(strt1>strt2) return 1;
439                 return 0;
440         }
441         else
442         {
443                 for(var i=0;i<strText1.length&&i<strText2.length;i++)
444                 {
445                         if(garrSortChar[getCharCode(strText1,i)]<garrSortChar[getCharCode(strText2,i)]) return -1;
446                         if(garrSortChar[getCharCode(strText1,i)]>garrSortChar[getCharCode(strText2,i)]) return 1;
447                 }
448                 if(strText1.length<strText2.length) return -1;
449                 if(strText1.length>strText2.length) return 1;
450                 return 0;
451         }
452 }
453 gbWhLang=true;