PageSourceSearch

https://www.downstateil.org/cf_scripts/scripts/cfform.js

js downstateil.org collected 2026-09-28 09:34:32 UTC 11,048 bytes, 598 lines download raw bytes

1/*ADOBE SYSTEMS INCORPORATED
2Copyright 2012 Adobe Systems Incorporated
3All Rights Reserved.
4
5NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the
6terms of the Adobe license agreement accompanying it.  If you have received this file from a
7source other than Adobe, then your use, modification, or distribution of it requires the prior
8written permission of Adobe.*/
9var _CF_error_messages=new Array();
10var _CF_error_fields=new Object();
11var _CF_FirstErrorField=null;
12var _CF_submit_status=new Array();
13_CF_signalLoad=function(){
14_CF_loaded=1;
15};
16_CF_onError=function(_929,_92a,_92b,_92c){
17if(_CF_error_fields[_92a]==null){
18if(_CF_FirstErrorField==null){
19_CF_FirstErrorField=_92a;
20}
21_CF_error_exists=true;
22_CF_error_fields[_92a]=_92c;
23_CF_error_messages[_CF_error_messages.length]=_92c;
24}
25};
26_CF_onErrorAlert=function(_92d){
27var _92e="";
28for(var i=0;i<_92d.length;i++){
29_92e+=_92d[i]+"\n";
30}
31alert(_92e);
32return false;
33};
34updateHiddenValue=function(val,form,name){
35if(form==null||form==""){
36form=0;
37}
38if(document.forms[form]==null||document.forms[form][name]==null){
39return;
40}
41document.forms[form][name].value=val;
42};
43_CF_hasValue=function(obj,_934,_935){
44if(_934=="TEXT"||_934=="FILE"||_934=="PASSWORD"||_934=="CFTEXTAREA"||_934=="TEXTAREA"||_934=="CFTEXTINPUT"||_934=="DATEFIELD"){
45if(obj.value.length==0){
46return false;
47}else{
48if(_935){
49str=obj.value.replace(/^\s+/,"").replace(/\s+$/,"");
50if(str.length==0){
51return false;
52}
53}
54}
55return true;
56}else{
57if(_934=="SELECT"){
58for(i=0;i<obj.length;i++){
59if(obj.options[i].selected&&obj.options[i].value.length>0){
60return true;
61}
62}
63return false;
64}else{
65if(_934=="SINGLE_VALUE_RADIO"||_934=="SINGLE_VALUE_CHECKBOX"){
66if(obj.checked){
67return true;
68}else{
69return false;
70}
71}else{
72if(_934=="RADIO"||_934=="CHECKBOX"){
73if(obj.length==undefined&&obj.checked){
74return true;
75}else{
76for(i=0;i<obj.length;i++){
77if(obj[i].checked){
78return true;
79}
80}
81}
82return false;
83}else{
84if(_934=="CFTREE"){
85if(obj["value"].length>0){
86return true;
87}else{
88return false;
89}
90}else{
91if(_934=="RICHTEXT"){
92var _936=FCKeditorAPI.GetInstance(obj.id);
93var val=_936.GetXHTML();
94if(val.length==0){
95return false;
96}else{
97if(_935){
98str=val.replace(/^\s+/,"").replace(/\s+$/,"");
99if(str.length==0){
100return false;
101}
102}
103return true;
104}
105}else{
106return true;
107}
108}
109}
110}
111}
112}
113};
114_CF_checkdate=function(_938,_939){
115_938=_938.replace(/^\s+/,"").replace(/\s+$/,"");
116_938=_938=_938.replace(/{d \'/,"").replace(/'}/,"");
117if(_939){
118if(_938.length==0){
119return false;
120}
121}else{
122if(_938.length==0){
123return true;
124}
125}
126if(_938.length==0){
127return true;
128}
129isplit=_938.indexOf("/");
130splitchr="/";
131if(isplit==-1){
132isplit=_938.indexOf(".");
133splitchr=".";
134}
135if(isplit==-1){
136isplit=_938.indexOf("-");
137splitchr="-";
138}
139if(isplit==-1||isplit==_938.length){
140return false;
141}
142var _93a=_938.substring(0,isplit);
143if(_93a.length==4){
144sYear=_938.substring(0,isplit);
145isplit=_938.indexOf(splitchr,isplit+1);
146if(isplit==-1||(isplit+1)==_938.length){
147return false;
148}
149sMonth=_938.substring((sYear.length+1),isplit);
150sDay=_938.substring(isplit+1);
151}else{
152sMonth=_938.substring(0,isplit);
153isplit=_938.indexOf(splitchr,isplit+1);
154if(isplit==-1||(isplit+1)==_938.length){
155return false;
156}
157sDay=_938.substring((sMonth.length+1),isplit);
158sYear=_938.substring(isplit+1);
159}
160if((sDay.length==0)||(sMonth.length==0)||(sYear.length==0)){
161return false;
162}
163if(!_CF_checkinteger(sMonth)){
164return false;
165}else{
166if(!_CF_checkrange(sMonth,1,12)){
167return false;
168}else{
169if(!_CF_checkinteger(sYear)){
170return false;
171}else{
172if(sYear.length!=1&&sYear.length!=2&&sYear.length!=4){
173return false;
174}else{
175if(!_CF_checkrange(sYear,0,9999)){
176return false;
177}else{
178if(!_CF_checkinteger(sDay)){
179return false;
180}else{
181if(!_CF_checkday(sYear,sMonth,sDay)){
182return false;
183}else{
184return true;
185}
186}
187}
188}
189}
190}
191}
192};
193_CF_checkeurodate=function(_93b,_93c){
194_93b=_93b.replace(/^\s+/,"").replace(/\s+$/,"");
195_93b=_93b=_93b.replace(/{d \'/,"").replace(/'}/,"");
196if(_93c){
197if(_93b.length==0){
198return false;
199}
200}else{
201if(_93b.length==0){
202return true;
203}
204}
205isplit=_93b.indexOf("/");
206splitchr="/";
207if(isplit==-1){
208isplit=_93b.indexOf(".");
209splitchr=".";
210}
211if(isplit==-1){
212isplit=_93b.indexOf("-");
213splitchr="-";
214}
215if(isplit==-1||isplit==_93b.length){
216return false;
217}
218var _93d=_93b.substring(0,isplit);
219if(_93d.length==4){
220sYear=_93b.substring(0,isplit);
221isplit=_93b.indexOf(splitchr,isplit+1);
222if(isplit==-1||(isplit+1)==_93b.length){
223return false;
224}
225sMonth=_93b.substring((sYear.length+1),isplit);
226sDay=_93b.substring(isplit+1);
227}else{
228sDay=_93b.substring(0,isplit);
229isplit=_93b.indexOf(splitchr,isplit+1);
230if(isplit==-1||(isplit+1)==_93b.length){
231return false;
232}
233sMonth=_93b.substring((sDay.length+1),isplit);
234sYear=_93b.substring(isplit+1);
235}
236if(!_CF_checkinteger(sMonth)){
237return false;
238}else{
239if(!_CF_checkrange(sMonth,1,12)){
240return false;
241}else{
242if(!_CF_checkinteger(sYear)){
243return false;
244}else{
245if(!_CF_checkrange(sYear,0,null)){
246return false;
247}else{
248if(!_CF_checkinteger(sDay)){
249return false;
250}else{
251if(!_CF_checkday(sYear,sMonth,sDay)){
252return false;
253}else{
254return true;
255}
256}
257}
258}
259}
260}
261};
262_CF_checkday=function(_93e,_93f,_940){
263maxDay=31;
264if(_93f==4||_93f==6||_93f==9||_93f==11){
265maxDay=30;
266}else{
267if(_93f==2){
268if(_93e%4>0){
269maxDay=28;
270}else{
271if(_93e%100==0&&_93e%400>0){
272maxDay=28;
273}else{
274maxDay=29;
275}
276}
277}
278}
279return _CF_checkrange(_940,1,maxDay);
280};
281_CF_checkinteger=function(_941,_942){
282_941=_941.replace(/^\s+/,"").replace(/\s+$/,"");
283_941=_941.replace(/[$£¥€,~+]?/g,"");
284if(_942){
285if(_941.length==0){
286return false;
287}
288}else{
289if(_941.length==0){
290return true;
291}
292}
293var _943=".";
294var _944=_941.indexOf(_943);
295if(_944==-1){
296return _CF_checknumber(_941);
297}else{
298return false;
299}
300};
301_CF_numberrange=function(_945,_946,_947,_948){
302if(_948){
303if(_945.length==0){
304return false;
305}
306}else{
307if(_945.length==0){
308return true;
309}
310}
311if(_946!=null){
312if(_945<_946){
313return false;
314}
315}
316if(_947!=null){
317if(_945>_947){
318return false;
319}
320}
321return true;
322};
323_CF_checknumber=function(_949,_94a){
324var _94b=" .+-0123456789";
325var _94c=" .0123456789";
326var _94d;
327var _94e=false;
328var _94f=false;
329var _950=false;
330_949=_949.replace(/^\s+/,"").replace(/\s+$/,"");
331_949=_949.replace(/[$£¥€,~+]?/g,"");
332if(_94a){
333if(_949.length==0){
334return false;
335}
336}else{
337if(_949.length==0){
338return true;
339}
340}
341_94d=_94b.indexOf(_949.charAt(0));
342if(_94d==1){
343_94e=true;
344}else{
345if(_94d<1){
346return false;
347}
348}
349for(var i=1;i<_949.length;i++){
350_94d=_94c.indexOf(_949.charAt(i));
351if(_94d<0){
352return false;
353}else{
354if(_94d==1){
355if(_94e){
356return false;
357}else{
358_94e=true;
359}
360}else{
361if(_94d==0){
362if(_94e||_950){
363_94f=true;
364}
365}else{
366if(_94f){
367return false;
368}else{
369_950=true;
370}
371}
372}
373}
374}
375return true;
376};
377_CF_checkrange=function(_952,_953,_954,_955){
378_952=_952.replace(/^\s+/,"").replace(/\s+$/,"");
379if(_955){
380if(_952.length==0){
381return false;
382}
383}else{
384if(_952.length==0){
385return true;
386}
387}
388if(!_CF_checknumber(_952)){
389return false;
390}else{
391return (_CF_numberrange((eval(_952)),_953,_954));
392}
393return true;
394};
395_CF_checktime=function(_956,_957){
396_956=_956.replace(/^\s+/,"").replace(/\s+$/,"");
397_956=_956.replace(/\s+:\s+/,":");
398_956=_956=_956.replace(/{t \'/,"").replace(/'}/,"");
399if(_957){
400if(_956.length==0){
401return false;
402}
403}else{
404if(_956.length==0){
405return true;
406}
407}
408var _958=_CF_checkregex(_956,/^((([0-1]?\d)|(2[0-3])):[0-5]?\d)?(:[0-5]?\d)? ?([AP]M|[AP]m|[ap]m|[ap]M)?$/,_957);
409return _958;
410};
411_CF_checkphone=function(_959,_95a){
412_959=_959.replace(/^\s+/,"").replace(/\s+$/,"");
413if(_95a){
414if(_959.length==0){
415return false;
416}
417}else{
418if(_959.length==0){
419return true;
420}
421}
422if(_959.length==0){
423return true;
424}
425return _CF_checkregex(_959,/^(((1))?[ ,\-,\.]?([\\(]?([1-9][0-9]{2})[\\)]?))?[ ,\-,\.]?([^0-1]){1}([0-9]){2}[ ,\-,\.]?([0-9]){4}(( )((x){0,1}([0-9]){1,5}){0,1})?$/,_95a);
426};
427_CF_checkzip=function(_95b,_95c){
428_95b=_95b.replace(/^\s+/,"").replace(/\s+$/,"");
429if(_95c){
430if(_95b.length==0){
431return false;
432}
433}else{
434if(_95b.length==0){
435return true;
436}
437}
438return _CF_checkregex(_95b,/^([0-9]){5,5}$|(([0-9]){5,5}(-| ){1}([0-9]){4,4}$)/,_95c);
439};
440_CF_checkcreditcard=function(_95d,_95e){
441_95d=_95d.replace(/^\s+/,"").replace(/\s+$/,"");
442if(_95e){
443if(_95d.length==0){
444return false;
445}
446}else{
447if(_95d.length==0){
448return true;
449}
450}
451if(_95d.length==0){
452return true;
453}
454var _95f=" -";
455var _960="";
456var _961;
457for(var i=0;i<_95d.length;i++){
458_961=_95f.indexOf(_95d.charAt(i));
459if(_961<0){
460_960+=_95d.substring(i,(i+1));
461}
462}
463if(_960.length<13||_960.length>19){
464return false;
465}
466if(_960.charAt(0)=="+"){
467return false;
468}
469if(!_CF_checkinteger(_960)){
470return false;
471}
472var _963=_960.length%2==1?false:true;
473var _964=0;
474var _965;
475for(var i=0;i<_960.length;i++){
476_965=eval(_960.charAt(i));
477if(_963){
478_965*=2;
479_964+=(_965%10);
480if((_965/10)>=1){
481_964++;
482}
483_963=false;
484}else{
485_964+=_965;
486_963=true;
487}
488}
489return (_964%10)==0?true:false;
490};
491_CF_checkssn=function(_966,_967){
492_966=_966.replace(/^\s+/,"").replace(/\s+$/,"");
493if(_967){
494if(_966.length==0){
495return false;
496}
497}else{
498if(_966.length==0){
499return true;
500}
501}
502return _CF_checkregex(_966,/^[0-9]{3}(-| )[0-9]{2}(-| )[0-9]{4}$/,_967);
503};
504_CF_checkEmail=function(_968,_969){
505_968=_968.replace(/^\s+/,"").replace(/\s+$/,"");
506if(_969){
507if(_968.length==0){
508return false;
509}
510}else{
511if(_968.length==0){
512return true;
513}
514}
515return _CF_checkregex(_968,/^[a-zA-Z_0-9-'\+~]+(\.[a-zA-Z_0-9-'\+~]+)*@([a-zA-Z_0-9-]+\.)+[a-zA-Z]*$/,_969);
516};
517_CF_checkURL=function(_96a,_96b){
518_96a=_96a.replace(/^\s+/,"").replace(/\s+$/,"");
519if(_96b){
520if(_96a.length==0){
521return false;
522}
523}else{
524if(_96a.length==0){
525return true;
526}
527}
528return _CF_checkregex(_96a.toLowerCase(),/^((http|https|ftp|file)\:\/\/([a-zA-Z0-0]*:[a-zA-Z0-0]*(@))?[a-zA-Z0-9-\.]+(\.[a-zA-Z]{2,3})?(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9-\._\?\,\'\/\+&amp;%\$#\=~])*)|((mailto)\:[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]*)|((news)\:[a-zA-Z0-9\.]*)$/,_96b);
529};
530_CF_checkUUID=function(_96c,_96d){
531_96c=_96c.replace(/^\s+/,"").replace(/\s+$/,"");
532if(_96d){
533if(_96c.length==0){
534return false;
535}
536}else{
537if(_96c.length==0){
538return true;
539}
540}
541return _CF_checkregex(_96c,/[A-Fa-f0-9]{8,8}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{16,16}/,_96d);
542};
543_CF_checkGUID=function(_96e,_96f){
544_96e=_96e.replace(/^\s+/,"").replace(/\s+$/,"");
545if(_96f){
546if(_96e.length==0){
547return false;
548}
549}else{
550if(_96e.length==0){
551return true;
552}
553}
554return _CF_checkregex(_96e,/[A-Fa-f0-9]{8,8}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{12,12}/,_96f);
555};
556_CF_checkBoolean=function(_970,_971){
557_970=_970.replace(/^\s+/,"").replace(/\s+$/,"");
558if(_971){
559if(_970.length==0){
560return false;
561}
562}else{
563if(_970.length==0){
564return true;
565}
566}
567if(_970.toUpperCase()=="TRUE"||_970.toUpperCase()=="YES"||(_CF_checknumber(_970)&&_970!="0")){
568return true;
569}else{
570if(_970.toUpperCase()=="FALSE"||_970.toUpperCase()=="NO"||_970=="0"){
571return true;
572}else{
573return false;
574}
575}
576};
577_CF_setFormParam=function(_972,_973,_974){
578var _975="document['"+_972+"']['"+_973+"']";
579var obj=eval(_975);
580if(obj==undefined){
581return false;
582}else{
583obj.value=_974;
584return true;
585}
586};
587_CF_checkregex=function(_977,_978,_979){
588if(_979){
589if(_977.length==0){
590return false;
591}
592}else{
593if(_977.length==0){
594return true;
595}
596}
597return _978.test(_977);
598};

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.