PageSourceSearch

https://south-carolina-registered-agents.com/WebResource.axd?d=mx-…9HIF3OyR2ME43ZgcYjQAQ2&t=639030533500000000

js south-carolina-registered-agents.com collected 2026-10-01 05:56:39 UTC 38,198 bytes, 836 lines download raw bytes

1//Used for getting the ReturnValue property in a Async callback:
2function GetCallback() {    
3
4    //Since this is a shared function by the Page, UserControl, and WebControl classes, we have to determine which controls are currently on the
5    //page and then which one is the current control being used for this method:
6    var pageControl = document.getElementById("hidCallbackPage_ReturnValue");
7    var userControl = document.getElementById("hidCallbackUserControl_ReturnValue");
8    var webControl = document.getElementById("hidCallbackWebControl_ReturnValue");
9
10    if (pageControl) {        
11
12        if (pageControl.getAttribute("currentflag") == "1") {            
13        
14            //Reset the currentflag attribute so there are no conflicts:
15            pageControl.setAttribute("currentflag", "0");            
16        
17            //Get the returnValueItems array from the hidden return value element:
18            var returnValueItems = Callback_GetReturnValueItems(Callback_HtmlDecode(pageControl.value));  
19            
20            //Now, pass the ReturnType and ReturnValueString to the ConvertToReturnType method to get the return object in it's correct datatype:
21            this.ReturnValue = Callback_CType(returnValueItems[0], returnValueItems[1]);            
22            
23            return this;
24        
25        }
26    
27    }
28
29    if (userControl) {        
30    
31        if (userControl.getAttribute("currentflag") == "1"){
32        
33            //Reset the currentflag attribute so there are no conflicts:
34            userControl.setAttribute("currentflag", "0");            
35            
36            //Get the returnValueItems array from the hidden return value element:
37            var returnValueItems = Callback_GetReturnValueItems(Callback_HtmlDecode(userControl.value));
38            
39            //Now, pass the ReturnType and ReturnValueString to the ConvertToReturnType method to get the return object in it's correct datatype:
40            this.ReturnValue = Callback_CType(returnValueItems[0], returnValueItems[1]);        
41            
42            return this;
43        
44        }
45    
46    }	
47    
48    if (webControl){
49    
50        if (webControl.getAttribute("currentflag") == "1"){
51        
52            //Reset the currentflag attribute so there are no conflicts:
53            webControl.setAttribute("currentflag", "0");            
54            
55            //Get the returnValueItems array from the hidden return value element:
56            var returnValueItems = Callback_GetReturnValueItems(Callback_HtmlDecode(webControl.value));
57            
58            //Now, pass the ReturnType and ReturnValueString to the ConvertToReturnType method to get the return object in it's correct datatype:
59            this.ReturnValue = Callback_CType(returnValueItems[0], returnValueItems[1]);        
60            
61            return this;            
62        
63        }
64    
65    }	
66	
67}
68//------------------------------------------------------------------------------------------------------------------------------------------------
69//Cross browser method for creating the XMLHttp object:
70function Callback_CreateXmlHttpObject(){
71    
72    if (typeof XMLHttpRequest != "undefined"){        
73               
74        //IE7, FireFox, Netscape, Safari, Opera:
75        return new XMLHttpRequest();
76    
77    }
78    else if (window.ActiveXObject){
79    
80        //IE5, IE6:
81        var versions = ["MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp"]; 
82    
83        for (var i = 0; i < versions.length; i++){
84        
85            try {
86            
87                var xmlHttp = new ActiveXObject(versions[i]);
88                
89                return xmlHttp;
90                
91            }
92            catch (err){
93            
94                //Do nothing
95            
96            }
97        
98        }
99    
100    }
101    
102    throw new Error("XMLHttp object could not be created.");
103
104}
105//------------------------------------------------------------------------------------------------------------------------------------------------
106//Note: The ExecuteAsyncCallback function is found inside CallbackPage.js, CallbackWebControl.js, and CallbackUserControl.js:
107function Callback_ExecuteSyncCallback(serverFunction, classType) {    
108
109    //HtmlEncode the serverFunction arg or ASP.NET will consider it a security violation due to the column delimiters and
110    //then we must URL Encode the string since HtmlEncode will put in "&" characters which are part of a url:
111    serverFunction = Callback_Escape(Callback_HtmlEncode(serverFunction));
112    
113    //Instantiate the browser specific XmlHttp object:      
114    var xmlHttp = Callback_CreateXmlHttpObject();
115        
116    //Open a Synchronous post to the current page and set the request header:
117    xmlHttp.open("POST", document.location.href, false);
118    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
119    
120    //Send the callback sync method to the server which will be executed via reflection:
121    xmlHttp.send("InenviXmlHttpCallbackMethod=" + serverFunction + "&ClassType=" + classType);    
122    
123    //Get the returnValueItems array from the server method which was just executed:
124    var returnValueItems = Callback_GetReturnValueItems(Callback_HtmlDecode(xmlHttp.responseText));    
125            
126    //Now, pass the ReturnType and ReturnValueString to the ConvertToReturnType method to get the return object in it's correct datatype:
127    var returnValue = Callback_CType(returnValueItems[0], returnValueItems[1]);    
128    
129    //Return the ReturnValue property:
130    return returnValue;
131    
132}
133//------------------------------------------------------------------------------------------------------------------------------------------------
134function Callback_GetReturnValueItems(returnValueItemsString) {    
135
136    var returnValueItems = returnValueItemsString.split("<cb20_returntype>");  
137    return returnValueItems;
138
139}
140//------------------------------------------------------------------------------------------------------------------------------------------------
141//CLIENT SIDE DATATABLE, DATAROW, DATACOLUMN, AND RESULT CLASSES:
142//------------------------------------------------------------------------------------------------------------------------------------------------
143function DataTable(dataTableString){
144
145    //Split out the dataTableString into an array of rows, the 1st item in the array contains the DataColumn properties and the
146    //rest of the rows contain the DataRows and DataCells:
147    var rows = dataTableString.split("<cb20_datarow>");
148    
149    //Split the 1st row into an array of DataColumns:
150    var dataColumns = rows[0].split("<cb20_datacol>");
151    
152    //Loop thru the dataColumns array and replace each item with a new DataColumn object:
153    for (var c = 0; c < dataColumns.length; c++){
154    
155        //Get the DataColumnProperties array:
156        var dataColumnProperties = dataColumns[c].split("<cb20_datacol_prop>");
157    
158        //Replace the existing string item with a DataColumn object:
159        dataColumns[c] = new DataColumn(dataColumnProperties[0], dataColumnProperties[1]);    
160    
161    }
162    
163    //Set the DataColumns property equal to the new dataColumns collection we just built:
164    this.DataColumns = dataColumns;   
165    
166    //Set the GetDataColumn method, this will allow the developer to get a DataColumn either by index or ColumnName:
167    this.GetDataColumn = Callback_GetDataColumn; 
168    
169    //Create a DataRows array where the length is 1 less than the rows array since the 1st item is just DataColumn properties:
170    var dataRows = new Array(rows.length -1);
171    for (r = 1; r < rows.length; r++){
172    
173        //Get the dataRowString from the row item:
174        var dataRowString = rows[r];   
175        
176        //Create a new DataRow object from the dataRowString and set it into the dataRows collection:
177        dataRows[r - 1] = new DataRow(dataRowString, this);       
178    
179    }   
180    
181    //Set the DataRows property (Collection of DataRows) of the DataTable:
182    this.DataRows = dataRows;
183
184}
185//--------------------------------------------------------------------------------------------------------------------------------------------------
186function DataColumn(columnName, dataType){
187
188    this.ColumnName = Callback_Replace(columnName, " ", "_"); //Make sure column names do not have spaces since they are used a properties
189    this.DataType = dataType;
190
191}
192//--------------------------------------------------------------------------------------------------------------------------------------------------
193function DataRow(dataRowString, dataTable){
194
195    //Declare this outside the if block since this is used to set the DataRow properties below in the DataCells loop:
196    var dataColumns = null;
197
198    //If no dataTable was passed, then we are creating a stand-a-lone DataRow so we need to extract the DataColumns and set the property here:
199    if (dataTable == null){
200    
201        //Split out the dataRowString into an array of rows, the 1st item in the array contains the DataColumn properties and the
202        //2nd row contains the actual DataRow and DataCells:
203        var rows = dataRowString.split("<cb20_datarow>");
204    
205        //Split the 1st row into an array of DataColumns:
206        dataColumns = rows[0].split("<cb20_datacol>");
207    
208        //Loop thru the dataColumns array and replace each item with a new DataColumn object:
209        for (var c = 0; c < dataColumns.length; c++){
210        
211            //Get the DataColumnProperties array:
212            var dataColumnProperties = dataColumns[c].split("<cb20_datacol_prop>");
213        
214            //Replace the existing string item with a DataColumn object:
215            dataColumns[c] = new DataColumn(dataColumnProperties[0], dataColumnProperties[1]);    
216        
217        }
218        
219        //Set the DataColumns property equal to the new dataColumns collection we just built:
220        this.DataColumns = dataColumns;          
221        
222        //Then reset the dataRowString to the DataRow that was passed in the 2nd item in the rows array:
223        dataRowString = rows[1];
224    
225    }
226    else {
227    
228        //Get a reference to the ParentDataTable:
229        this.ParentDataTable = dataTable; 
230        
231        dataColumns = dataTable.DataColumns;
232    
233    }
234
235    //Split the dataRowString string into an array of DataCells:
236    var dataCells = dataRowString.split("<cb20_datacol>");
237        
238    //Loop thru the aray and replace each item with a new DataCell object:    
239    for (var c = 0; c < dataCells.length; c++){
240            
241        //Set the datacell property, notice we set it to an empty string because once the property is dynamically created,
242        //we then reset the property to it's correct value/datatype in the following line:
243        eval("this." + dataColumns[c].ColumnName + " = \"\"");
244        
245        //Convert the datacell property the matching datatype:
246        this[dataColumns[c].ColumnName] = Callback_CType(dataColumns[c].DataType, dataCells[c]);
247                  
248    }    
249    
250    //Set the GetValue method so the user could iterate through the datacell colleciton if they needed to by index:
251    this.GetValue = Callback_GetDataCellValue;
252
253}
254//--------------------------------------------------------------------------------------------------------------------------------------------------
255function Callback_GetDataColumn(index){
256
257    //If no index was passed, return null:
258    if (index == null){    
259        
260        return null;
261         
262    }
263    else {
264    
265        //Find out if an integer or column name was passed:
266        var isInteger = Callback_IsInteger(index);
267        
268        //If it's a column name, then we need to figure out what the columnname index is by looping thru the DataTable.ColumnNames property:
269        if (!isInteger){  
270        
271            for (var c = 0; c < this.DataColumns.length; c++){
272            
273                //If we find a match, reset the index and break from the loop:
274                var columnName = this.DataColumns[c].ColumnName.toLowerCase();
275                if (columnName == index.toLowerCase()){
276                
277                    index = c;
278                    break;
279                
280                }  
281            
282            }           
283        
284        }
285        
286        //If it's not null, then return the dataCell if it exists:
287        var dataColumn = this.DataColumns[index];          
288         
289        return dataColumn;
290    
291    }
292
293}
294//--------------------------------------------------------------------------------------------------------------------------------------------------
295function Callback_GetDataCellValue(index){
296   
297    //Figure out what the columnName is if an integer index was passed: 
298    var columnName = "";
299    
300    //If no index was passed, return null:
301    if (index == null){    
302        
303        return null;
304         
305    }
306    else {
307    
308        //Find out if an integer or column name was passed:
309        var isInteger = Callback_IsInteger(index);
310        
311        //If its an integer, then we need to figure out what the columnname is by looping thru the DataTable.ColumnNames property:
312        if (isInteger){ 
313        
314            //Make sure it's a integer and not a string representing one:
315            index = index * 1;
316        
317            if (this.ParentDataTable){
318            
319                for (var c = 0; c < this.ParentDataTable.DataColumns.length; c++){
320                
321                    //If we find a match, set the columName and break from the loop:                    
322                    if (c == index){
323                    
324                        columnName = this.ParentDataTable.DataColumns[c].ColumnName;
325                        break;
326                    
327                    }  
328                
329                }    
330                
331            }
332            else {
333            
334                for (var c = 0; c < this.DataColumns.length; c++){                    
335                    
336                    //If we find a match, set the columName and break from the loop:                    
337                    if (c == index){
338                    
339                        columnName = this.DataColumns[c].ColumnName;
340                        break;
341                    
342                    }  
343                
344                }    
345            
346            }       
347            
348        }
349        else {
350        
351            //ColumnName was passed:
352            columnName = index;
353        
354        }    
355                 
356        //Return the data cell value:
357        return this[columnName];
358        
359    }
360
361}
362//--------------------------------------------------------------------------------------------------------------------------------------------------
363function Result(success, returnValue, exceptionMessage) {
364
365    this.Success = CBln(success);
366    this.ReturnValue = returnValue;
367    this.ExceptionMessage = exceptionMessage;
368
369}
370//--------------------------------------------------------------------------------------------------------------------------------------------------
371//UTILITY FUNCTIONS:
372//------------------------------------------------------------------------------------------------------------------------------------------------
373function Callback_CType(dataType, value){    
374
375    var returnValueObject = null;
376    
377    switch (dataType.toLowerCase()){
378    
379        case "boolean":
380        
381            returnValueObject = CBln(value);
382            
383            break;
384    
385        case "string": 
386        
387            returnValueObject = value; 
388            
389            break;
390        
391        case "int16":
392        case "int32":
393        case "int64":
394        case "integer":
395        case "decimal":
396        case "double":
397        
398            returnValueObject = (value * 1);
399            
400            break;
401            
402        case "datetime":
403        
404            returnValueObject = new Date(value);  
405            
406            break;  
407            
408        case "datarow":
409        
410            returnValueObject = new DataRow(value);
411        
412            break;
413            
414        case "datatable":
415        
416            returnValueObject = new DataTable(value);
417        
418            break;
419            
420        case "string[]":
421        
422            returnValueObject = value.split("<cb20_array>");
423
424            break;
425
426        case "result":
427
428            //The Inenvi.Data.Result object should have been converted to a delimited string via the Inenvi.Data.Result.ToPropertyArray() and Join() methods:
429            var arrayItems = value.split("<cb20_array>");
430
431            returnValueObject = new Result(arrayItems[0], arrayItems[1], arrayItems[2]);
432
433            break;
434        
435    
436    }
437    
438    return returnValueObject;
439
440}
441//--------------------------------------------------------------------------------------------------------------------------------------------------
442function Callback_Replace(text, find, replace){
443
444	text = text.toString();	
445
446	return text.split(find).join(replace);	
447}
448//--------------------------------------------------------------------------------------------------------------------------------------------------
449function Callback_Escape(text){
450
451    //This function inherits from the window escape() method and adds special formatting for the "+" symbol by
452    //replacing it with "&pls", and "·" with "&middot" this is necessary because Synchronous callbacks need these encoded and they are not
453    //encoded natively by HtmlEncode or UrlEncode (escape), also handle middots as well:
454    return escape(Callback_Replace(Callback_Replace(text, "+", "&pls;"), "·", "&middot;"));
455
456}
457//--------------------------------------------------------------------------------------------------------------------------------------------------
458function Callback_Trim(value){
459
460    if (value == null) value = "";
461    
462    value = value.toString();
463    
464    //First LTrim it:
465    var space = value.search(/^\s*(\S.*)/);
466	value = ((space == -1)?"":RegExp.$1);
467
468	//Then RTrim it:
469	space = value.search( /\s+$/ );
470	value = ((space == -1)?value:value.substr(0, space));
471
472	return value;
473	
474}
475//--------------------------------------------------------------------------------------------------------------------------------------------------
476function Callback_IsInteger(value){
477
478    //Make sure its a string:
479    value = value.toString();
480
481	if (value == ""){
482		return true;
483	}
484	
485	//Since this is a function for checking for integers, the
486	//isNaN() function does most of the work for us, however,
487	//the isNaN() function allows "." and "-" so we must 
488	//check for the presence of these two symbols.  If either
489	//exist in the string, then we return false:
490	if (value.indexOf(".") != -1){
491		return false;
492	}	
493	if (value.indexOf("-") != -1){
494		return false;
495	}		
496	if (value.indexOf(",") != -1){
497		return false;
498	}		
499	
500	//Check for e or E since isNaN allows them:
501	if (value.indexOf("e") != -1){
502		return false;
503	}
504	if (value.indexOf("E") != -1){
505		return false;
506	}
507	
508	//Finish the validation:
509	if (isNaN(value)){
510		return false;
511	}
512	
513	//If we made it here, then its a integer so we return true:
514	return true;
515	
516}
517//--------------------------------------------------------------------------------------------------------------------------------------------------
518function CBln(value){ 
519
520	value = Trim(value.toLowerCase());
521	return (value == "true"?true:false);
522	
523}
524//--------------------------------------------------------------------------------------------------------------------------------------------------
525function Callback_HtmlEncode(text) {
526    
527	return text.replace(/&/g, "&amp;").replace(/\"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
528	
529}
530//--------------------------------------------------------------------------------------------------------------------------------------------------
531function Callback_HtmlDecode(text){ 
532
533      var out = ""; 
534      if (text==null) return;   
535
536      var l = text.length; 
537      for (var i=0; i<l; i++){ 
538
539            var ch = text.charAt(i);    
540            if (ch == '&'){ 
541
542				var semicolonIndex = text.indexOf(';', i+1);                   
543
544            if (semicolonIndex > 0){ 
545
546   
546                     var entity = text.substring(i + 1, semicolonIndex); 
547
548                        if (entity.length > 1 && entity.charAt(0) == '#'){ 
549
550                              if (entity.charAt(1) == 'x' || entity.charAt(1) == 'X') 
551
552                                    ch = String.fromCharCode(eval('0'+entity.substring(1))); 
553
554                              else 
555
556                                    ch = String.fromCharCode(eval(entity.substring(1))); 
557
558                        } 
559
560                    else 
561
562                      { 
563
564								switch (entity){ 
565									case 'quot': ch = String.fromCharCode(0x0022); break; 
566									case 'amp': ch = String.fromCharCode(0x0026); break; 
567									case 'lt': ch = String.fromCharCode(0x003c); break; 
568									case 'gt': ch = String.fromCharCode(0x003e); break; 
569									case 'nbsp': ch = String.fromCharCode(0x00a0); break; 
570									case 'iexcl': ch = String.fromCharCode(0x00a1); break; 
571									case 'cent': ch = String.fromCharCode(0x00a2); break; 
572									case 'pound': ch = String.fromCharCode(0x00a3); break;
573									case 'curren': ch = String.fromCharCode(0x00a4); break;
574									case 'yen': ch = String.fromCharCode(0x00a5); break; 
575									case 'brvbar': ch = String.fromCharCode(0x00a6); break;
576									case 'sect': ch = String.fromCharCode(0x00a7); break; 
577									case 'uml': ch = String.fromCharCode(0x00a8); break; 
578									case 'copy': ch = String.fromCharCode(0x00a9); break;
579									case 'ordf': ch = String.fromCharCode(0x00aa); break;
580									case 'laquo': ch = String.fromCharCode(0x00ab); break;
581									case 'not': ch = String.fromCharCode(0x00ac); break; 
582									case 'shy': ch = String.fromCharCode(0x00ad); break; 
583									case 'reg': ch = String.fromCharCode(0x00ae); break; 
584									case 'macr': ch = String.fromCharCode(0x00af); break;
585									case 'deg': ch = String.fromCharCode(0x00b0); break; 
586									case 'plusmn': ch = String.fromCharCode(0x00b1); break;
587									case 'sup2': ch = String.fromCharCode(0x00b2); break; 
588									case 'sup3': ch = String.fromCharCode(0x00b3); break; 
589									case 'acute': ch = String.fromCharCode(0x00b4); break;
590									case 'micro': ch = String.fromCharCode(0x00b5); break;
591									case 'para': ch = String.fromCharCode(0x00b6); break; 
592									case 'middot': ch = String.fromCharCode(0x00b7); break;
593									case 'cedil': ch = String.fromCharCode(0x00b8); break; 
594									case 'sup1': ch = String.fromCharCode(0x00b9); break; 
595									case 'ordm': ch = String.fromCharCode(0x00ba); break; 
596									case 'raquo': ch = String.fromCharCode(0x00bb); break;
597									case 'frac14': ch = String.fromCharCode(0x00bc); break; 
598									case 'frac12': ch = String.fromCharCode(0x00bd); break; 
599									case 'frac34': ch = String.fromCharCode(0x00be); break; 
600									case 'iquest': ch = String.fromCharCode(0x00bf); break; 
601									case 'Agrave': ch = String.fromCharCode(0x00c0); break; 
602									case 'Aacute': ch = String.fromCharCode(0x00c1); break; 
603									case 'Acirc': ch = String.fromCharCode(0x00c2); break; 
604									case 'Atilde': ch = String.fromCharCode(0x00c3); break;
605									case 'Auml': ch = String.fromCharCode(0x00c4); break; 
606									case 'Aring': ch = String.fromCharCode(0x00c5); break;
607									case 'AElig': ch = String.fromCharCode(0x00c6); break;
608									case 'Ccedil': ch = String.fromCharCode(0x00c7); break;
609									case 'Egrave': ch = String.fromCharCode(0x00c8); break;
610									case 'Eacute': ch = String.fromCharCode(0x00c9); break;
611									case 'Ecirc': ch = String.fromCharCode(0x00ca); break; 
612									case 'Euml': ch = String.fromCharCode(0x00cb); break; 
613									case 'Igrave': ch = String.fromCharCode(0x00cc); break;
614									case 'Iacute': ch = String.fromCharCode(0x00cd); break;
615									case 'Icirc': ch = String.fromCharCode(0x00ce ); break;
616									case 'Iuml': ch = String.fromCharCode(0x00cf); break; 
617									case 'ETH': ch = String.fromCharCode(0x00d0); break; 
618									case 'Ntilde': ch = String.fromCharCode(0x00d1); break;
619									case 'Ograve': ch = String.fromCharCode(0x00d2); break;
620									case 'Oacute': ch = String.fromCharCode(0x00d3); break;
621									case 'Ocirc': ch = String.fromCharCode(0x00d4); break; 
622									case 'Otilde': ch = String.fromCharCode(0x00d5); break;
623									case 'Ouml': ch = String.fromCharCode(0x00d6); break; 
624									case 'times': ch = String.fromCharCode(0x00d7); break;
625									case 'Oslash': ch = String.fromCharCode(0x00d8); break;
626									case 'Ugrave': ch = String.fromCharCode(0x00d9); break;
627									case 'Uacute': ch = String.fromCharCode(0x00da); break;
628									case 'Ucirc': ch = String.fromCharCode(0x00db); break; 
629									case 'Uuml': ch = String.fromCharCode(0x00dc); break; 
630									case 'Yacute': ch = String.fromCharCode(0x00dd); break;
631									case 'THORN': ch = String.fromCharCode(0x00de); break; 
632									case 'szlig': ch = String.fromCharCode(0x00df); break; 
633									case 'agrave': ch = String.fromCharCode(0x00e0); break;
634									case 'aacute': ch = String.fromCharCode(0x00e1); break;
635									case 'acirc': ch = String.fromCharCode(0x00e2); break; 
636									case 'atilde': ch = String.fromCharCode(0x00e3); break;
637									case 'auml': ch = String.fromCharCode(0x00e4); break; 
638									case 'aring': ch = String.fromCharCode(0x00e5); break;
639									case 'aelig': ch = String.fromCharCode(0x00e6); break;
640									case 'ccedil': ch = String.fromCharCode(0x00e7); break;
641									case 'egrave': ch = String.fromCharCode(0x00e8); break;
642									case 'eacute': ch = String.fromCharCode(0x00e9); break;
643									case 'ecirc': ch = String.fromCharCode(0x00ea); break; 
644									case 'euml': ch = String.fromCharCode(0x00eb); break; 
645									case 'igrave': ch = String.fromCharCode(0x00ec); break;
646									case 'iacute': ch = String.fromCharCode(0x00ed); break;
647									case 'icirc': ch = String.fromCharCode(0x00ee); break; 
648									case 'iuml': ch = String.fromCharCode(0x00ef); break; 
649									case 'eth': ch = String.fromCharCode(0x00f0); break; 
650									case 'ntilde': ch = String.fromCharCode(0x00f1); break;
651									case 'ograve': ch = String.fromCharCode(0x00f2); break;
652									case 'oacute': ch = String.fromCharCode(0x00f3); break;
653									case 'ocirc': ch = String.fromCharCode(0x00f4); break; 
654									case 'otilde': ch = String.fromCharCode(0x00f5); break; 
655									case 'ouml': ch = String.fromCharCode(0x00f6); break; 
656									case 'divide': ch = String.fromCharCode(0x00f7); break;
657									case 'oslash': ch = String.fromCharCode(0x00f8); break;
658									case 'ugrave': ch = String.fromCharCode(0x00f9); break;
659									case 'uacute': ch = String.fromCharCode(0x00fa); break;
660									case 'ucirc': ch = String.fromCharCode(0x00fb); break; 
661									case 'uuml': ch = String.fromCharCode(0x00fc); break; 
662									case 'yacute': ch = String.fromCharCode(0x00fd); break;
663									case 'thorn': ch = String.fromCharCode(0x00fe); break; 
664									case 'yuml': ch = String.fromCharCode(0x00ff); break; 
665									case 'OElig': ch = String.fromCharCode(0x0152); break;
666									case 'oelig': ch = String.fromCharCode(0x0153); break;
667									case 'Scaron': ch = String.fromCharCode(0x0160); break;
668									case 'scaron': ch = String.fromCharCode(0x0161); break;
669									case 'Yuml': ch = String.fromCharCode(0x0178); break; 
670									case 'fnof': ch = String.fromCharCode(0x0192); break; 
671									case 'circ': ch = String.fromCharCode(0x02c6); break; 
672									case 'tilde': ch = String.fromCharCode(0x02dc); break;
673									case 'Alpha': ch = String.fromCharCode(0x0391); break;
674									case 'Beta': ch = String.fromCharCode(0x0392); break; 
675									case 'Gamma': ch = String.fromCharCode(0x0393); break;
676									case 'Delta': ch = String.fromCharCode(0x0394); break;
677									case 'Epsilon': ch = String.fromCharCode(0x0395); break;
678									case 'Zeta': ch = String.fromCharCode(0x0396); break; 
679									case 'Eta': ch = String.fromCharCode(0x0397); break; 
680									case 'Theta': ch = String.fromCharCode(0x0398); break;
681									case 'Iota': ch = String.fromCharCode(0x0399); break; 
682									case 'Kappa': ch = String.fromCharCode(0x039a); break;
683									case 'Lambda': ch = String.fromCharCode(0x039b); break;
684									case 'Mu': ch = String.fromCharCode(0x039c); break; 
685									case 'Nu': ch = String.fromCharCode(0x039d); break; 
686									case 'Xi': ch = String.fromCharCode(0x039e); break; 
687									case 'Omicron': ch = String.fromCharCode(0x039f); break;
688									case 'Pi': ch = String.fromCharCode(0x03a0); break; 
689									case ' Rho ': ch = String.fromCharCode(0x03a1); break;
690									case 'Sigma': ch = String.fromCharCode(0x03a3); break;
691									case 'Tau': ch = String.fromCharCode(0x03a4); break; 
692									case 'Upsilon': ch = String.fromCharCode(0x03a5); break;
693									case 'Phi': ch = String.fromCharCode(0x03a6); break; 
694									case 'Chi': ch = String.fromCharCode(0x03a7); break; 
695									case 'Psi': ch = String.fromCharCode(0x03a8); break; 
696									case 'Omega': ch = String.fromCharCode(0x03a9); break;
697									case 'alpha': ch = String.fromCharCode(0x03b1); break;
698									case 'beta': ch = String.fromCharCode(0x03b2); break; 
699									case 'gamma': ch = String.fromCharCode(0x03b3); break;
700									case 'delta': ch = String.fromCharCode(0x03b4); break;
701									case 'epsilon': ch = String.fromCharCode(0x03b5); break;
702									case 'zeta': ch = String.fromCharCode(0x03b6); break; 
703									case 'eta': ch = String.fromCharCode(0x03b7); break; 
704									case 'theta': ch = String.fromCharCode(0x03b8); break;
705									case 'iota': ch = String.fromCharCode(0x03b9); break; 
706									case 'kappa': ch = String.fromCharCode(0x03ba); break;
707									case 'lambda': ch = String.fromCharCode(0x03bb); break;
708									case 'mu': ch = String.fromCharCode(0x03bc); break; 
709									case 'nu': ch = String.fromCharCode(0x03bd); break; 
710									case 'xi': ch = String.fromCharCode(0x03be); break; 
711									case 'omicron': ch = String.fromCharCode(0x03bf); break;
712									case 'pi': ch = String.fromCharCode(0x03c0); break; 
713									case 'rho': ch = String.fromCharCode(0x03c1); break; 
714									case 'sigmaf': ch = String.fromCharCode(0x03c2); break;
715									case 'sigma': ch = String.fromCharCode(0x03c3); break; 
716									case 'tau': ch = String.fromCharCode(0x03c4); break; 
717									case 'upsilon': ch = String.fromCharCode(0x03c5); break;
718									case 'phi': ch = String.fromCharCode(0x03c6); break; 
719									case 'chi': ch = String.fromCharCode(0x03c7); break; 
720									case 'psi': ch = String.fromCharCode(0x03c8); break; 
721									case 'omega': ch = String.fromCharCode(0x03c9); break;
722									case 'thetasym': ch = String.fromCharCode(0x03d1); break;
723									case 'upsih': ch = String.fromCharCode(0x03d2); break; 
724									case 'piv': ch = String.fromCharCode(0x03d6); break; 
725									case 'ensp': ch = String.fromCharCode(0x2002); break;
726									case 'emsp': ch = String.fromCharCode(0x2003); break;
727									case 'thinsp': ch = String.fromCharCode(0x2009); break;
728									case 'zwnj': ch = String.fromCharCode(0x200c); break; 
729									case 'zwj': ch = String.fromCharCode(0x200d); break; 
730									case 'lrm': ch = String.fromCharCode(0x200e); break; 
731									case 'rlm': ch = String.fromCharCode(0x200f); break; 
732									case 'ndash': ch = String.fromCharCode(0x2013); break;
733									case 'mdash': ch = String.fromCharCode(0x2014); break;
734									case 'lsquo': ch = String.fromCharCode(0x2018); break;
735									case 'rsquo': ch = String.fromCharCode(0x2019); break;
736									case 'sbquo': ch = String.fromCharCode(0x201a); break;
737									case 'ldquo': ch = String.fromCharCode(0x201c); break;
738									case 'rdquo': ch = String.fromCharCode(0x201d); break;
739									case 'bdquo': ch = String.fromCharCode(0x201e); break;
740									case 'dagger': ch = String.fromCharCode(0x2020); break;
741									case 'Dagger': ch = String.fromCharCode(0x2021); break;
742									case 'bull': ch = String.fromCharCode(0x2022); break; 
743									case 'hellip': ch = String.fromCharCode(0x2026); break;
744									case 'permil': ch = String.fromCharCode(0x2030); break;
745									case 'prime': ch = String.fromCharCode(0x2032); break; 
746									case 'Prime': ch = String.fromCharCode(0x2033); break; 
747									case 'lsaquo': ch = String.fromCharCode(0x2039); break;
748									case 'rsaquo': ch = String.fromCharCode(0x203a); break;
749									case 'oline': ch = String.fromCharCode(0x203e); break; 
750									case 'frasl': ch = String.fromCharCode(0x2044); break; 
751									case 'euro': ch = String.fromCharCode(0x20ac); break; 
752									case 'image': ch = String.fromCharCode(0x2111); break;
753									case 'weierp': ch = String.fromCharCode(0x2118); break;
754									case 'real': ch = String.fromCharCode(0x211c); break; 
755									case 'trade': ch = String.fromCharCode(0x2122); break;
756									case 'alefsym': ch = String.fromCharCode(0x2135); break; 
757									case 'larr': ch = String.fromCharCode(0x2190); break; 
758									case 'uarr': ch = String.fromCharCode(0x2191); break; 
759									case 'rarr': ch = String.fromCharCode(0x2192); break; 
760									case 'darr': ch = String.fromCharCode(0x2193); break; 
761									case 'harr': ch = String.fromCharCode(0x2194); break; 
762									case 'crarr': ch = String.fromCharCode(0x21b5); break; 
763									case 'lArr': ch = String.fromCharCode(0x21d0); break; 
764									case 'uArr': ch = String.fromCharCode(0x21d1); break; 
765									case 'rArr': ch = String.fromCharCode(0x21d2); break; 
766									case 'dArr': ch = String.fromCharCode(0x21d3); break; 
767									case 'hArr': ch = String.fromCharCode(0x21d4); break; 
768									case 'forall': ch = String.fromCharCode(0x2200); break;
769									case 'part': ch = String.fromCharCode(0x2202); break; 
770									case 'exist': ch = String.fromCharCode(0x2203); break;
771									case 'empty': ch = String.fromCharCode(0x2205); break;
772									case 'nabla': ch = String.fromCharCode(0x2207); break;
773									case 'isin': ch = String.fromCharCode(0x2208); break; 
774									case 'notin': ch = String.fromCharCode(0x2209); break;
775									case 'ni': ch = String.fromCharCode(0x220b); break; 
776									case 'prod': ch = String.fromCharCode(0x220f); break;
777									case 'sum': ch = String.fromCharCode(0x2211); break; 
778									case 'minus': ch = String.fromCharCode(0x2212); break;
779									case 'lowast': ch = String.fromCharCode(0x2217); break;
780									case 'radic': ch = String.fromCharCode(0x221a); break; 
781									case 'prop': ch = String.fromCharCode(0x221d); break; 
782									case 'infin': ch = String.fromCharCode(0x221e); break;
783									case 'ang': ch = String.fromCharCode(0x2220); break; 
784									case 'and': ch = String.fromCharCode(0x2227); break; 
785									case 'or': ch = String.fromCharCode(0x2228); break; 
786									case 'cap': ch = String.fromCharCode(0x2229); break;
787									case 'cup': ch = String.fromCharCode(0x222a); break;
788									case 'int': ch = String.fromCharCode(0x222b); break;
789									case 'there4': ch = String.fromCharCode(0x2234); break;
790									case 'sim': ch = String.fromCharCode(0x223c); break; 
791									case 'cong': ch = String.fromCharCode(0x2245); break;
792									case 'asymp': ch = String.fromCharCode(0x2248); break;
793									case 'ne': ch = String.fromCharCode(0x2260); break; 
794									case 'equiv': ch = String.fromCharCode(0x2261); break;
795									case 'le': ch = String.fromCharCode(0x2264); break; 
796									case 'ge': ch = String.fromCharCode(0x2265); break; 
797									case 'sub': ch = String.fromCharCode(0x2282); break;
798									case 'sup': ch = String.fromCharCode(0x2283); break;
799									case 'nsub': ch = String.fromCharCode(0x2284); break;
800									case 'sube': ch = String.fromCharCode(0x2286); break;
801									case 'supe': ch = String.fromCharCode(0x2287); break;
802									case 'oplus': ch = String.fromCharCode(0x2295); break;
803									case 'otimes': ch = String.fromCharCode(0x2297); break;
804									case 'perp': ch = String.fromCharCode(0x22a5); break; 
805									case 'sdot': ch = String.fromCharCode(0x22c5); break; 
806									case 'lceil': ch = String.fromCharCode(0x2308); break;
807									case 'rceil': ch = String.fromCharCode(0x2309); break;
808									case 'lfloor': ch = String.fromCharCode(0x230a); break; 
809									case 'rfloor': ch = String.fromCharCode(0x230b); break; 
810									case 'lang': ch = String.fromCharCode(0x2329); break; 
811									case 'rang': ch = String.fromCharCode(0x232a); break; 
812									case 'loz': ch = String.fromCharCode(0x25ca); break; 
813									case 'spades': ch = String.fromCharCode(0x2660); break;
814									case 'clubs': ch = String.fromCharCode(0x2663); break; 
815									case 'hearts': ch = String.fromCharCode(0x2665); break;
816									case 'diams': ch = String.fromCharCode(0x2666); break; 
817									default: ch = ''; break; 
818
819                              } 
820
821                        } 
822
823                        i = semicolonIndex; 
824
825                  } 
826
827            } 
828
829            out += ch; 
830
831      } 
832
833      return out; 
834
835} 
836//------------------------------------------------------------------------------------------------------------------------------------------------

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.