PageSourceSearch

https://lewiscarrollresources.net/LCRComponents/Javascript/LCRGlobalV1.js

js lewiscarrollresources.net collected 2026-10-02 11:37:29 UTC 7,324 bytes, 129 lines download raw bytes

1// JavaScript Document
2function LCRLoading(){
3if  (document.getElementById('RESULTSAREA').innerHTML.length == 0)
4    {document.getElementById('RESULTSAREA').innerHTML = '<div class="LCRDataPanel" style="height:500px;"><p style="margin:10px;font-size:15px;color:#999999;">Loading ...</p></div>';}
5}
6
7function FinderParam(){
8if   (Params['Finder'])
9     {return '&Finder=' + Params['Finder'];}
10else {return '';}
11}
12
13// Standard routine to create the top section of any page within a Resource
14function LCRPageStart(SECTION,OPTIONALTITLE,OPTIONALLOGO) {
15var WC = 934;
16var WW = 0;
17var NA = '';
18var X = '';
19if   (OPTIONALTITLE)
20     {TITLE = OPTIONALTITLE;}
21else {TITLE = MenuItemTitle[SECTION];}
22if   (OPTIONALLOGO)
23     {LOGOFILE = OPTIONALLOGO;}
24else {LOGOFILE = FacilityKey;}
25query = window.location.search.substring(1);
26params = query.split('&');
27Params = {};
28queryout = '';
29for  (i = 0; i < query.split('&').length; i++)
30     {Params[query.split('&')[i].split('=')[0]] = query.split('&')[i].split('=')[1];}
31
32
33document.write('<div class="LCRHeadPanel"><img src="/' + LOGOFILE + '/logo.jpg" height="80" style="float:right;">');
34
35document.write('<div class="LCRSendFeedback" style="border:2px solid #FFFFFF;color:#FFFFFF;float:right;margin:10px 10px 0px 0px;padding:14px 8px 14px 8px;text-align:center;font-size:12px;cursor:pointer;border-radius: 12px;" onclick="window.open(\'http://lewiscarrollresources.net/cgi-bin/systemscripts/LCRSystem.pl?FeedbackAction=Start&Resource=' + FacilityKey + '\');">Send<br>Feedback</div>');
36
37if   (Params['Finder'])
38     {document.write('<div class="LCRBackToFinder" style="border:2px solid #FFFFFF;color:#FFFFFF;float:right;margin:10px 10px 0px 0px;padding:7px 15px 6px 15px;text-align:center;font-size:12px;cursor:pointer;border-radius: 12px;" onclick="window.location.replace(\'https://lewiscarrollresources.net/finder/index.html?Action=SearchGo&SearchText=' + Params['Finder'] + '\');">Back To<br>Finder<br>Results</div>');}
39
40document.write('<p class="LCRSiteHead">' + FacilityTitle + '</p>');
41
42document.write('<p class="LCRSiteSubHead" id="XSiteSubHead">'+ TITLE +'</p></div>');
43document.write('<div class="LCRMenuPanel">');
44for (var i in MenuItemTitle)
45    {if  (SECTION == i) {X =  'style="color:#FFFFFF;"';} else {X = '';}
46     document.write('<div class="LCRMenuEntry" style="width:' + MenuItemWidth[i] + 'px;"><a href="' + MenuItemLink[i] + '" class="LCRMenuLink"' + X + '>' + i + '</a></div>');
47     WC = WC -  MenuItemWidth[i] - 3;}
48
49
50// If the BackToKey is filled in, then create the Back Button accordingly
51if  (typeof BackToKey !== 'undefined')
52    {if   (BackToKey == 'chronologies')
53          {document.write('<div class="LCRMenuEntry" style="width:' + WC + 'px;text-align:right;"><a href="/chronologies" class="LCRMenuLinkMain">Chronologies Menu</a></div>');}
54     // in theory, there could be an empty or illegal BackKey - in which case create the regular Back Button
55     else {document.write('<div class="LCRMenuEntry" style="width:' + WC + 'px;text-align:right;"><a href="/" class="LCRMenuLinkMain">Go To Main Menu</a></div>');}}
56// Otherwise, just create the regular Back Button
57else {document.write('<div class="LCRMenuEntry" style="width:' + WC + 'px;text-align:right;"><a href="/" class="LCRMenuLinkMain">Go To Main Menu</a></div>');}
58//document.write('<div class="LCRMenuEntry" style="width:' + WC + 'px;text-align:right;"><a href="/" class="LCRMenuLinkMain">Go To Main Menu</a></div>');
59document.write('<div style="clear:both;width:0px;height:0px;margin:0px;padding:0px;"></div>');
60document.write('</div>');
61document.write('<div id="J"></div>');
62}
63// Standard routine to create the bottom section of any page within a Resource
64// This includes a call to LCRPageLoad which is used to create the footer data and to log the page visit
65function LCRPageEnd(TYPE,TEXT,FILE) {
66if   (document.cookie)
67     {COOKIETEXT = 'Cookies are being used on this page to allow you access to these facilites.';}
68else {COOKIETEXT = 'Cookies are not being used on this page.';}
69document.write('<div class="LCRFooterPanel" id="FOOTER"></div><p style="font-size:10px;text-align:center;">' + COOKIETEXT + '</p>');
70var request = new XMLHttpRequest();
71request.onreadystatechange = function () {if (request.readyState == 4)  {document.getElementById('FOOTER').innerHTML = request.responseText;}};
72request.open('GET','/cgi-bin/systemscripts/LCRPageLoad.pl?Type=' + TYPE + '&Page=' + window.location.href + '&Referrer=' + document.referrer + '&Text=' + TEXT + '&File=' + FILE, true);
73request.setRequestHeader('cache-control', 'no-cache, must-revalidate, post-check=0, pre-check=0');
74request.setRequestHeader('cache-control', 'max-age=0');
75request.setRequestHeader('expires', 'Tue, 01 Jan 1980 1:00:00 GMT');
76request.setRequestHeader('pragma', 'no-cache');
77request.send();
78}
79
80// Standard routine retrieve data for any page within a resource, based on the parameters in the URL
81function LCRDataLoad(scriptname,parameterlist,source) {
82ALLOW = RegExp('Action=|Debug=|Finder=|' + parameterlist,"");
83query = window.location.search.substring(1);
84params = query.split('&');
85OUT = '';
86Params = {};
87queryout = '';
88for (i = 0; i < query.split('&').length; i++)
89    {if  (query.split('&')[i].match(ALLOW))
90      	 {Params[query.split('&')[i].split('=')[0]] = query.split('&')[i].split('=')[1];}}
91for (par in Params)
92    {queryout += par + '=' + Params[par] + '&';}
93queryout += 'Source=' + source;
94var Area = document.getElementById('RESULTSAREA');
95var request = new XMLHttpRequest();
96request.onreadystatechange = function () {if (request.readyState == 4){DATA = request.responseText.split("#=#"); Area.innerHTML = DATA[0];  window.scrollTo(0,DATA[1]);};};
97request.open('GET','../../cgi-bin/resourcesscripts/' + FacilityKey + '/' + scriptname + '?' + queryout, true);
98request.setRequestHeader('cache-control', 'no-cache, must-revalidate, post-check=0, pre-check=0');
99request.setRequestHeader('cache-control', 'max-age=0');
100request.setRequestHeader('expires', 'Tue, 01 Jan 1980 1:00:00 GMT');
101request.setRequestHeader('pragma', 'no-cache');
102request.send();
103}
104
105function LCRDataLoadSimple(scriptname,parameters,location) {
106var Area = document.getElementById(location);
107var request = new XMLHttpRequest();
108request.onreadystatechange = function () {if (request.readyState == 4){DATA = request.responseText.split("#=#"); Area.innerHTML = DATA[0];};};
109request.open('GET','../../cgi-bin/resourcesscripts/' + FacilityKey + '/' + scriptname + '?' + parameters, true);
110request.setRequestHeader('cache-control', 'no-cache, must-revalidate, post-check=0, pre-check=0');
111request.setRequestHeader('cache-control', 'max-age=0');
112request.setRequestHeader('expires', 'Tue, 01 Jan 1980 1:00:00 GMT');
113request.setRequestHeader('pragma', 'no-cache');
114request.send();
115}
116
117function LCRJump() {
118if  (window.scrollY == 0)
119    {window.scrollTo(0, document.body.scrollHeight);}
120else {window.scrollTo(0,0);}
121}
122
123function LCRShowHidden(divid){
124  if (document.getElementById('HIDDEN-' + divid).style.display=='block')
125     {document.getElementById('HIDDEN-' + divid).style.display='none';
126      document.getElementById('HIDDENX-' + divid).innerHTML='Click Here for Full Details'}
127   else
128   {document.getElementById('HIDDEN-' + divid).style.display='block';
129    document.getElementById('HIDDENX-' + divid).innerHTML='Hide These Details'};}

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.