PageSourceSearch

https://www.ophthalmologyweb.com/Media/27/Js/mbox/mbox.js

js ophthalmologyweb.com collected 2026-10-02 05:13:16 UTC 27,724 bytes, 1,433 lines download raw bytes

1
2
3
4
5
6var mboxCopyright = "Copyright 1996-2010. Adobe Systems Incorporated. All rights reserved.";
7
8
9
10
11mboxUrlBuilder = function(a, b) {
12 this.a = a;
13 this.b = b;
14 this.c = new Array();
15 this.d = function(e) { return e; };
16 this.f = null;
17};
18
19
20mboxUrlBuilder.prototype.addParameter = function(g, h) {
21 var i = new RegExp('(\'|")');
22 if (i.exec(g)) {
23 throw "Parameter '" + g + "' contains invalid characters";
24 }
25
26 for (var j = 0; j < this.c.length; j++) {
27 var k = this.c[j];
28 if (k.name == g) {
29 k.value = h;
30 return this;
31 }
32 }
33 var l = new Object();
34 l.name = g;
35 l.value = h;
36 this.c[this.c.length] = l;
37 return this;
38};
39
40
41mboxUrlBuilder.prototype.addParameters = function(c) {
42 if (!c) {
43 return this;
44 }
45 for (var j = 0; j < c.length; j++) {
46 var m = c[j].indexOf('=');
47 if (m == -1 || m == 0) {
48 continue;
49 }
50 this.addParameter(c[j].substring(0, m),
51 c[j].substring(m + 1, c[j].length));
52 }
53 return this;
54};
55
56mboxUrlBuilder.prototype.setServerType = function(n) {
57 this.o = n;
58};
59
60mboxUrlBuilder.prototype.setBasePath = function(f) {
61 this.f = f;
62};
63
64
65mboxUrlBuilder.prototype.setUrlProcessAction = function(p) {
66 this.d = p;
67};
68
69mboxUrlBuilder.prototype.buildUrl = function() {
70 var q = this.f ? this.f :
71 '/m2/' + this.b + '/mbox/' + this.o;
72
73 var r = document.location.protocol == 'file:' ? 'http:' :
74 document.location.protocol;
75
76 var e = r + "//" + this.a + q;
77
78 var s = e.indexOf('?') != -1 ? '&' : '?';
79 for (var j = 0; j < this.c.length; j++) {
80 var k = this.c[j];
81 e += s + encodeURIComponent(k.name) + '=' +
82 encodeURIComponent(k.value);
83 s = '&';
84 }
85 return this.t(this.d(e));
86};
87
88
89mboxUrlBuilder.prototype.getParameters = function() {
90 return this.c;
91};
92
93mboxUrlBuilder.prototype.setParameters = function(c) {
94 this.c = c;
95};
96
97mboxUrlBuilder.prototype.clone = function() {
98 var u = new mboxUrlBuilder(this.a, this.b);
99 u.setServerType(this.o);
100 u.setBasePath(this.f);
101 u.setUrlProcessAction(this.d);
102 for (var j = 0; j < this.c.length; j++) {
103 u.addParameter(this.c[j].name,
104 this.c[j].value);
105 }
106 return u;
107};
108
109mboxUrlBuilder.prototype.t = function(v) {
110 return v.replace(/\"/g, '&quot;').replace(/>/g, '&gt;');
111};
112
113
114mboxStandardFetcher = function() { };
115
116mboxStandardFetcher.prototype.getType = function() {
117 return 'standard';
118};
119
120mboxStandardFetcher.prototype.fetch = function(w) {
121 w.setServerType(this.getType());
122
123 document.write('<' + 'scr' + 'ipt src="' + w.buildUrl() +
124 '" language="JavaScript"><' + '\/scr' + 'ipt>');
125};
126
127mboxStandardFetcher.prototype.cancel = function() { };
128
129
130mboxAjaxFetcher = function() { };
131
132mboxAjaxFetcher.prototype.getType = function() {
133 return 'ajax';
134};
135
136mboxAjaxFetcher.prototype.fetch = function(w) {
137 w.setServerType(this.getType());
138 var e = w.buildUrl();
139
140 this.x = document.createElement('script');
141 this.x.src = e;
142
143 document.body.appendChild(this.x);
144};
145
146mboxAjaxFetcher.prototype.cancel = function() { };
147
148
149mboxMap = function() {
150 this.y = new Object();
151 this.z = new Array();
152};
153
154mboxMap.prototype.put = function(A, h) {
155 if (!this.y[A]) {
156 this.z[this.z.length] = A;
157 }
158 this.y[A] = h;
159};
160
161mboxMap.prototype.get = function(A) {
162 return this.y[A];
163};
164
165mboxMap.prototype.remove = function(A) {
166 this.y[A] = undefined;
167};
168
169mboxMap.prototype.each = function(p) {
170 for (var j = 0; j < this.z.length; j++ ) {
171 var A = this.z[j];
172 var h = this.y[A];
173 if (h) {
174 var B = p(A, h);
175 if (B === false) {
176 break;
177 }
178 }
179 }
180};
181
182
183mboxFactory = function(C, b, D) {
184 this.E = false;
185 this.C = C;
186 this.D = D;
187 this.F = new mboxList();
188
189 mboxFactories.put(D, this);
190
191 
192 
193 this.G =
194 typeof document.createElement('div').replaceChild != 'undefined' &&
195 (function() { return true; })() &&
196 typeof document.getElementById != 'undefined' &&
197 typeof (window.attachEvent || document.addEventListener ||
198 window.addEventListener) != 'undefined' &&
199 typeof encodeURIComponent != 'undefined';
200 this.H = this.G &&
201 mboxGetPageParameter('mboxDisable') == null;
202
203 var I = D == 'default';
204 
205 
206 
207 this.J = new mboxCookieManager(
208 'mbox' +
209 (I ? '' : ('-' + D)),
210 (function() { return mboxCookiePageDomain(); })());
211
212 
213 
214 this.H = this.H && this.J.isEnabled() &&
215 (this.J.getCookie('disable') == null);
216 
217 if (this.isAdmin()) {
218 this.enable();
219 }
220
221 this.K();
222 this.L = mboxGenerateId();
223 this.M = mboxScreenHeight();
224 this.N = mboxScreenWidth();
225 this.O = mboxBrowserWidth();
226 this.P = mboxBrowserHeight();
227 this.Q = mboxScreenColorDepth();
228 this.R = mboxBrowserTimeOffset();
229 this.S = new mboxSession(this.L,
230 'mboxSession',
231 'session', 31 * 60, this.J);
232 this.T = new mboxPC('PC',
233 1209600, this.J);
234
235 this.w = new mboxUrlBuilder(C, b);
236 this.U(this.w, I);
237
238 this.V = new Date().getTime();
239 this.W = this.V;
240
241 var X = this;
242 this.addOnLoad(function() { X.W = new Date().getTime(); });
243 if (this.G) {
244 
245 
246 this.addOnLoad(function() {
247 X.E = true;
248 X.getMboxes().each(function(Y) {
249 Y.setFetcher(new mboxAjaxFetcher());
250 Y.finalize(); });
251 });
252
253 this.limitTraffic(100, 10368000);
254
255 if (this.H) {
256 this.Z();
257 this._ = new mboxSignaler(function(ab, c) {
258 return X.create(ab, c);
259 }, this.J);
260 }
261
262 }
263};
264
265
266
267
268
269mboxFactory.prototype.isEnabled = function() {
270 return this.H;
271};
272
273
274mboxFactory.prototype.getDisableReason = function() {
275 return this.J.getCookie('disable');
276};
277
278
279mboxFactory.prototype.isSupported = function() {
280 return this.G;
281};
282
283
284mboxFactory.prototype.disable = function(bb, cb) {
285 if (typeof bb == 'undefined') {
286 bb = 60 * 60;
287 }
288
289 if (typeof cb == 'undefined') {
290 cb = 'unspecified';
291 }
292
293 if (!this.isAdmin()) {
294 this.H = false;
295 this.J.setCookie('disable', cb, bb);
296 }
297};
298
299mboxFactory.prototype.enable = function() {
300 this.H = true;
301 this.J.deleteCookie('disable');
302};
303
304mboxFactory.prototype.isAdmin = function() {
305 return document.location.href.indexOf('mboxEnv') != -1;
306};
307
308
309mboxFactory.prototype.limitTraffic = function(db, bb) {
310
311};
312
313
314mboxFactory.prototype.addOnLoad = function(eb) {
315
316 
317 
318 
319 
320
321 if (this.isDomLoaded()) {
322 eb();
323 } else {
324 var fb = false;
325 var gb = function() {
326 if (fb) {
327 return;
328 }
329 fb = true;
330 eb();
331 };
332
333 this.hb.push(gb);
334
335 if (this.isDomLoaded() && !fb) {
336 gb();
337 }
338 }
339};
340
341mboxFactory.prototype.getEllapsedTime = function() {
342 return this.W - this.V;
343};
344
345mboxFactory.prototype.getEllapsedTimeUntil = function(ib) {
346 return ib - this.V;
347};
348
349
350mboxFactory.prototype.getMboxes = function() {
351 return this.F;
352};
353
354
355mboxFactory.prototype.get = function(ab, jb) {
356 return this.F.get(ab).getById(jb || 0);
357};
358
359
360mboxFactory.prototype.update = function(ab, c) {
361 if (!this.isEnabled()) {
362 return;
363 }
364 if (!this.isDomLoaded()) {
365 var X = this;
366 this.addOnLoad(function() { X.update(ab, c); });
367 return;
368 }
369 if (this.F.get(ab).length() == 0) {
370 throw "Mbox " + ab + " is not defined";
371 }
372 this.F.get(ab).each(function(Y) {
373 Y.getUrlBuilder()
374 .addParameter('mboxPage', mboxGenerateId());
375 Y.load(c);
376 });
377};
378
379
380mboxFactory.prototype.create = function(
381 ab, c, kb) {
382
383 if (!this.isSupported()) {
384 return null;
385 }
386 var e = this.w.clone();
387 e.addParameter('mboxCount', this.F.length() + 1);
388 e.addParameters(c);
389
390 var jb = this.F.get(ab).length();
391 var lb = this.D + '-' + ab + '-' + jb;
392 var mb;
393
394 if (kb) {
395 mb = new mboxLocatorNode(kb);
396 } else {
397 if (this.E) {
398 throw 'The page has already been loaded, can\'t write marker';
399 }
400 mb = new mboxLocatorDefault(lb);
401 }
402
403 try {
404 var X = this;
405 var nb = 'mboxImported-' + lb;
406 var Y = new mbox(ab, jb, e, mb, nb);
407 if (this.H) {
408 Y.setFetcher(
409 this.E ? new mboxAjaxFetcher() : new mboxStandardFetcher());
410 }
411
412 Y.setOnError(function(ob, n) {
413 Y.setMessage(ob);
414 Y.activate();
415 if (!Y.isActivated()) {
416 X.disable(60 * 60, ob);
417 window.location.reload(false);
418 }
419
420
421 });
422 this.F.add(Y);
423 } catch (pb) {
424 this.disable();
425 throw 'Failed creating mbox "' + ab + '", the error was: ' + pb;
426 }
427
428 var qb = new Date();
429 e.addParameter('mboxTime', qb.getTime() -
430 (qb.getTimezoneOffset() * 60000));
431
432 return Y;
433};
434
435mboxFactory.prototype.getCookieManager = function() {
436 return this.J;
437};
438
439mboxFactory.prototype.getPageId = function() {
440 return this.L;
441};
442
443mboxFactory.prototype.getPCId = function() {
444 return this.T;
445};
446
447mboxFactory.prototype.getSessionId = function() {
448 return this.S;
449};
450
451mboxFactory.prototype.getSignaler = function() {
452 return this._;
453};
454
455mboxFactory.prototype.getUrlBuilder = function() {
456 return this.w;
457};
458
459mboxFactory.prototype.U = function(e, I) {
460 e.addParameter('mboxHost', document.location.hostname)
461 .addParameter('mboxSession', this.S.getId());
462 if (!I) {
463 e.addParameter('mboxFactoryId', this.D);
464 }
465 if (this.T.getId() != null) {
466 e.addParameter('mboxPC', this.T.getId());
467 }
468 e.addParameter('mboxPage', this.L);
469 e.addParameter('screenHeight', this.M);
470 e.addParameter('screenWidth', this.N);
471 e.addParameter('browserWidth', this.O);
472 e.addParameter('browserHeight', this.P);
473 e.addParameter('browserTimeOffset', this.R);
474 e.addParameter('colorDepth', this.Q);
475
476
477
478 e.setUrlProcessAction(function(e) {
479
480 e += '&mboxURL=' + encodeURIComponent(document.location);
481 var rb = encodeURIComponent(document.referrer);
482 if (e.length + rb.length < 2000) {
483 e += '&mboxReferrer=' + rb;
484 }
485
486 e += '&mboxVersion=' + mboxVersion;
487 return e;
488 });
489};
490
491mboxFactory.prototype.sb = function() {
492 return "";
493};
494
495
496mboxFactory.prototype.Z = function() {
497 document.write('<style>.' + 'mboxDefault'
498 + ' { visibility:hidden; }</style>');
499};
500
501mboxFactory.prototype.isDomLoaded = function() {
502 return this.E;
503};
504
505mboxFactory.prototype.K = function() {
506 if (this.hb != null) {
507 return;
508 }
509 this.hb = new Array();
510
511 var X = this;
512 (function() {
513 var tb = document.addEventListener ? "DOMContentLoaded" : "onreadystatechange";
514 var ub = false;
515 var vb = function() {
516 if (ub) {
517 return;
518 }
519 ub = true;
520 for (var i = 0; i < X.hb.length; ++i) {
521 X.hb[i]();
522 }
523 };
524
525 if (document.addEventListener) {
526 document.addEventListener(tb, function() {
527 document.removeEventListener(tb, arguments.callee, false);
528 vb();
529 }, false);
530
531 window.addEventListener("load", function(){
532 document.removeEventListener("load", arguments.callee, false);
533 vb();
534 }, false);
535
536 } else if (document.attachEvent) {
537 if (self !== self.top) {
538 document.attachEvent(tb, function() {
539 if (document.readyState === 'complete') {
540 document.detachEvent(tb, arguments.callee);
541 vb();
542 }
543 });
544 } else {
545 var wb = function() {
546 try {
547 document.documentElement.doScroll('left');
548 vb();
549 } catch (xb) {
550 setTimeout(wb, 13);
551 }
552 };
553 wb();
554 }
555 }
556
557 if (document.readyState === "complete") {
558 vb();
559 }
560
561 })();
562};
563
564
565mboxSignaler = function(yb, J) {
566 this.J = J;
567 var zb =
568 J.getCookieNames('signal-');
569 for (var j = 0; j < zb.length; j++) {
570 var Ab = zb[j];
571 var Bb = J.getCookie(Ab).split('&');
572 var Y = yb(Bb[0], Bb);
573 Y.load();
574 J.deleteCookie(Ab);
575 }
576};
577
578
579mboxSignaler.prototype.signal = function(Cb, ab ) {
580 this.J.setCookie('signal-' +
581 Cb, mboxShiftArray(arguments).join('&'), 45 * 60);
582};
583
584
585mboxList = function() {
586 this.F = new Array();
587};
588
589mboxList.prototype.add = function(Y) {
590 if (Y != null) {
591 this.F[this.F.length] = Y;
592 }
593};
594
595
596mboxList.prototype.get = function(ab) {
597 var B = new mboxList();
598 for (var j = 0; j < this.F.length; j++) {
599 var Y = this.F[j];
600 if (Y.getName() == ab) {
601 B.add(Y);
602 }
603 }
604 return B;
605};
606
607mboxList.prototype.getById = function(Db) {
608 return this.F[Db];
609};
610
611mboxList.prototype.length = function() {
612 return this.F.length;
613};
614
615
616mboxList.prototype.each = function(p) {
617 if (typeof p != 'function') {
618 throw 'Action must be a function, was: ' + typeof(p);
619 }
620 for (var j = 0; j < this.F.length; j++) {
621 p(this.F[j]);
622 }
623};
624
625
626
627
628
629mboxLocatorDefault = function(g) {
630 this.g = 'mboxMarker-' + g;
631
632 document.write('<div id="' + this.g +
633 '" style="visibility:hidden;display:none">&nbsp;</div>');
634};
635
636mboxLocatorDefault.prototype.locate = function() {
637 var Eb = document.getElementById(this.g);
638 while (Eb != null) {
639 
640 if (Eb.nodeType == 1) {
641 if (Eb.className == 'mboxDefault') {
642 return Eb;
643 }
644 }
645 Eb = Eb.previousSibling;
646 }
647
648 return null;
649};
650
651mboxLocatorDefault.prototype.force = function() {
652 
653 var Fb = document.createElement('div');
654 Fb.className = 'mboxDefault';
655
656 var Gb = document.getElementById(this.g);
657 Gb.parentNode.insertBefore(Fb, Gb);
658
659 return Fb;
660};
661
662mboxLocatorNode = function(Hb) {
663 this.Eb = Hb;
664};
665
666mboxLocatorNode.prototype.locate = function() {
667 return typeof this.Eb == 'string' ?
668 document.getElementById(this.Eb) : this.Eb;
669};
670
671mboxLocatorNode.prototype.force = function() {
672 return null;
673};
674
675
676mboxCreate = function(ab ) {
677 var Y = mboxFactoryDefault.create( ab, mboxShiftArray(arguments));
678
679 if (Y) {
680 Y.load();
681 }
682 return Y;
683};
684
685
686mboxDefine = function(kb, ab ) {
687 var Y = mboxFactoryDefault.create(ab,
688 mboxShiftArray(mboxShiftArray(arguments)), kb);
689
690 return Y;
691};
692
693mboxUpdate = function(ab ) {
694 mboxFactoryDefault.update(ab, mboxShiftArray(arguments));
695};
696
697
698mbox = function(g, Ib, w, Jb, nb) {
699 this.Kb = null;
700 this.Lb = 0;
701 this.mb = Jb;
702 this.nb = nb;
703 this.Mb = null;
704
705 this.Nb = new mboxOfferContent();
706 this.Fb = null;
707 this.w = w;
708
709 
710 this.message = '';
711 this.Ob = new Object();
712 this.Pb = 0;
713
714 this.Ib = Ib;
715 this.g = g;
716
717 this.Qb();
718
719 w.addParameter('mbox', g)
720 .addParameter('mboxId', Ib);
721
722 this.Rb = function() {};
723 this.Sb = function() {};
724
725 this.Tb = null;
726};
727
728mbox.prototype.getId = function() {
729 return this.Ib;
730};
731
732mbox.prototype.Qb = function() {
733 if (this.g.length > 250) {
734 throw "Mbox Name " + this.g + " exceeds max length of "
735 + "250 characters.";
736 } else if (this.g.match(/^\s+|\s+$/g)) {
737 throw "Mbox Name " + this.g + " has leading/trailing whitespace(s).";
738 }
739};
740
741mbox.prototype.getName = function() {
742 return this.g;
743};
744
745
746mbox.prototype.getParameters = function() {
747 var c = this.w.getParameters();
748 var B = new Array();
749 for (var j = 0; j < c.length; j++) {
750 
751 if (c[j].name.indexOf('mbox') != 0) {
752 B[B.length] = c[j].name + '=' + c[j].value;
753 }
754 }
755 return B;
756};
757
758
759mbox.prototype.setOnLoad = function(p) {
760 this.Sb = p;
761 return this;
762};
763
764mbox.prototype.setMessage = function(ob) {
765 this.message = ob;
766 return this;
767};
768
769
770mbox.prototype.setOnError = function(Rb) {
771 this.Rb = Rb;
772 return this;
773};
774
775mbox.prototype.setFetcher = function(Ub) {
776 if (this.Mb) {
777 this.Mb.cancel();
778 }
779 this.Mb = Ub;
780 return this;
781};
782
783mbox.prototype.getFetcher = function() {
784 return this.Mb;
785};
786
787
788mbox.prototype.load = function(c) {
789 if (this.Mb == null) {
790 return this;
791 }
792
793 this.setEventTime("load.start");
794 this.cancelTimeout();
795 this.Lb = 0;
796
797 var w = (c && c.length > 0) ?
798 this.w.clone().addParameters(c) : this.w;
799 this.Mb.fetch(w);
800
801 var X = this;
802 this.Vb = setTimeout(function() {
803 X.Rb('browser timeout', X.Mb.getType());
804 }, 15000);
805
806 this.setEventTime("load.end");
807
808 return this;
809};
810
811
812mbox.prototype.loaded = function() {
813 this.cancelTimeout();
814 if (!this.activate()) {
815 var X = this;
816 setTimeout(function() { X.loaded(); }, 100);
817 }
818};
819
820
821mbox.prototype.activate = function() {
822 if (this.Lb) {
823 return this.Lb;
824 }
825 this.setEventTime('activate' + (++this.Pb) + '.start');
826 if (this.show()) {
827 this.cancelTimeout();
828 this.Lb = 1;
829 }
830 this.setEventTime('activate' + this.Pb + '.end');
831 return this.Lb;
832};
833
834
835mbox.prototype.isActivated = function() {
836 return this.Lb;
837};
838
839
840mbox.prototype.setOffer = function(Nb) {
841 if (Nb && Nb.show && Nb.setOnLoad) {
842 this.Nb = Nb;
843 } else {
844 throw 'Invalid offer';
845 }
846 return this;
847};
848
849mbox.prototype.getOffer = function() {
850 return this.Nb;
851};
852
853
854mbox.prototype.show = function() {
855 this.setEventTime('show.start');
856 var B = this.Nb.show(this);
857 this.setEventTime(B == 1 ? "show.end.ok" : "show.end");
858
859 return B;
860};
861
862
863mbox.prototype.showContent = function(Wb) {
864 if (Wb == null) {
865 
866 return 0;
867 }
868 
869 
870 if (this.Fb == null || !this.Fb.parentNode) {
871 this.Fb = this.getDefaultDiv();
872 if (this.Fb == null) {
873 
874 return 0;
875 }
876 }
877
878 if (this.Fb != Wb) {
879 this.Xb(this.Fb);
880 this.Fb.parentNode.replaceChild(Wb, this.Fb);
881 this.Fb = Wb;
882 }
883
884 this.Yb(Wb);
885
886 this.Sb();
887
888 
889 return 1;
890};
891
892
893mbox.prototype.hide = function() {
894 this.setEventTime('hide.start');
895 var B = this.showContent(this.getDefaultDiv());
896 this.setEventTime(B == 1 ? 'hide.end.ok' : 'hide.end.fail');
897 return B;
898};
899
900
901mbox.prototype.finalize = function() {
902 this.setEventTime('finalize.start');
903 this.cancelTimeout();
904
905 if (this.getDefaultDiv() == null) {
906 if (this.mb.force() != null) {
907 this.setMessage('No default content, an empty one has been added');
908 } else {
909 this.setMessage('Unable to locate mbox');
910 }
911 }
912
913 if (!this.activate()) {
914 this.hide();
915 this.setEventTime('finalize.end.hide');
916 }
917 this.setEventTime('finalize.end.ok');
918};
919
920mbox.prototype.cancelTimeout = function() {
921 if (this.Vb) {
922 clearTimeout(this.Vb);
923 }
924 if (this.Mb != null) {
925 this.Mb.cancel();
926 }
927};
928
929mbox.prototype.getDiv = function() {
930 return this.Fb;
931};
932
933
934mbox.prototype.getDefaultDiv = function() {
935 if (this.Tb == null) {
936 this.Tb = this.mb.locate();
937 }
938 return this.Tb;
939};
940
941mbox.prototype.setEventTime = function(Zb) {
942 this.Ob[Zb] = (new Date()).getTime();
943};
944
945mbox.prototype.getEventTimes = function() {
946 return this.Ob;
947};
948
949mbox.prototype.getImportName = function() {
950 return this.nb;
951};
952
953mbox.prototype.getURL = function() {
954 return this.w.buildUrl();
955};
956
957mbox.prototype.getUrlBuilder = function() {
958 return this.w;
959};
960
961mbox.prototype._b = function(Fb) {
962 return Fb.style.display != 'none';
963};
964
965mbox.prototype.Yb = function(Fb) {
966 this.ac(Fb, true);
967};
968
969mbox.prototype.Xb = function(Fb) {
970 this.ac(Fb, false);
971};
972
973mbox.prototype.ac = function(Fb, bc) {
974 Fb.style.visibility = bc ? "visible" : "hidden";
975 Fb.style.display = bc ? "block" : "none";
976};
977
978mboxOfferContent = function() {
979 this.Sb = function() {};
980};
981
982mboxOfferContent.prototype.show = function(Y) {
983 var B = Y.showContent(document.getElementById(Y.getImportName()));
984 if (B == 1) {
985 this.Sb();
986 }
987 return B;
988};
989
990mboxOfferContent.prototype.setOnLoad = function(Sb) {
991 this.Sb = Sb;
992};
993
994
995mboxOfferAjax = function(Wb) {
996 this.Wb = Wb;
997 this.Sb = function() {};
998};
999
1000mboxOfferAjax.prototype.setOnLoad = function(Sb) {
1001 this.Sb = Sb;
1002};
1003
1004mboxOfferAjax.prototype.show = function(Y) {
1005 var cc = document.createElement('div');
1006
1007 cc.id = Y.getImportName();
1008 cc.innerHTML = this.Wb;
1009
1010 var B = Y.showContent(cc);
1011 if (B == 1) {
1012 this.Sb();
1013 }
1014 return B;
1015};
1016
1017
1018mboxOfferDefault = function() {
1019 this.Sb = function() {};
1020};
1021
1022mboxOfferDefault.prototype.setOnLoad = function(Sb) {
1023 this.Sb = Sb;
1024};
1025
1026mboxOfferDefault.prototype.show = function(Y) {
1027 var B = Y.hide();
1028 if (B == 1) {
1029 this.Sb();
1030 }
1031 return B;
1032};
1033
1034mboxCookieManager = function mboxCookieManager(g, dc) {
1035 this.g = g;
1036 
1037 this.dc = dc == '' || dc.indexOf('.') == -1 ? '' :
1038 '; domain=' + dc;
1039 this.ec = new mboxMap();
1040 this.loadCookies();
1041};
1042
1043mboxCookieManager.prototype.isEnabled = function() {
1044 this.setCookie('check', 'true', 60);
1045 this.loadCookies();
1046 return this.getCookie('check') == 'true';
1047};
1048
1049
1050mboxCookieManager.prototype.setCookie = function(g, h, bb) {
1051 if (typeof g != 'undefined' && typeof h != 'undefined' &&
1052 typeof bb != 'undefined') {
1053 var fc = new Object();
1054 fc.name = g;
1055 fc.value = escape(h);
1056 
1057 fc.expireOn = Math.ceil(bb + new Date().getTime() / 1000);
1058 this.ec.put(g, fc);
1059 this.saveCookies();
1060 }
1061};
1062
1063mboxCookieManager.prototype.getCookie = function(g) {
1064 var fc = this.ec.get(g);
1065 return fc ? unescape(fc.value) : null;
1066};
1067
1068mboxCookieManager.prototype.deleteCookie = function(g) {
1069 this.ec.remove(g);
1070 this.saveCookies();
1071};
1072
1073mboxCookieManager.prototype.getCookieNames = function(gc) {
1074 var hc = new Array();
1075 this.ec.each(function(g, fc) {
1076 if (g.indexOf(gc) == 0) {
1077 hc[hc.length] = g;
1078 }
1079 });
1080 return hc;
1081};
1082
1083mboxCookieManager.prototype.saveCookies = function() {
1084
1085 var ic = new Array();
1086 var jc = 0;
1087 this.ec.each(function(g, fc) {
1088 ic[ic.length] = g + '#' + fc.value + '#' +
1089 fc.expireOn;
1090 if (jc < fc.expireOn) {
1091 jc = fc.expireOn;
1092 }
1093 });
1094
1095 var kc = new Date(jc * 1000);
1096 document.cookie = this.g + '=' + ic.join('|') +
1097 
1098 '; expires=' + kc.toGMTString() +
1099 '; path=/' + this.dc;
1100
1101};
1102
1103mboxCookieManager.prototype.loadCookies = function() {
1104 this.ec = new mboxMap();
1105 var lc = document.cookie.indexOf(this.g + '=');
1106 if (lc != -1) {
1107 var mc = document.cookie.indexOf(';', lc);
1108 if (mc == -1) {
1109 mc = document.cookie.indexOf(',', lc);
1110 if (mc == -1) {
1111 mc = document.cookie.length;
1112 }
1113 }
1114 var nc = document.cookie.substring(
1115 lc + this.g.length + 1, mc).split('|');
1116
1117 var oc = Math.ceil(new Date().getTime() / 1000);
1118 for (var j = 0; j < nc.length; j++) {
1119 var fc = nc[j].split('#');
1120 if (oc <= fc[2]) {
1121 var pc = new Object();
1122 pc.name = fc[0];
1123 pc.value = fc[1];
1124 pc.expireOn = fc[2];
1125 this.ec.put(pc.name, pc);
1126 }
1127 }
1128 }
1129};
1130
1131
1132mboxSession = function(qc, rc, Ab, sc,
1133 J) {
1134 this.rc = rc;
1135 this.Ab = Ab;
1136 this.sc = sc;
1137 this.J = J;
1138
1139 this.tc = false;
1140
1141 this.Ib = typeof mboxForceSessionId != 'undefined' ?
1142 mboxForceSessionId : mboxGetPageParameter(this.rc);
1143
1144 if (this.Ib == null || this.Ib.length == 0) {
1145 this.Ib = J.getCookie(Ab);
1146 if (this.Ib == null || this.Ib.length == 0) {
1147 this.Ib = qc;
1148 this.tc = true;
1149 }
1150 }
1151
1152 J.setCookie(Ab, this.Ib, sc);
1153};
1154
1155
1156mboxSession.prototype.getId = function() {
1157 return this.Ib;
1158};
1159
1160mboxSession.prototype.forceId = function(uc) {
1161 this.Ib = uc;
1162
1163 this.J.setCookie(this.Ab, this.Ib, this.sc);
1164};
1165
1166
1167mboxPC = function(Ab, sc, J) {
1168 this.Ab = Ab;
1169 this.sc = sc;
1170 this.J = J;
1171
1172 this.Ib = typeof mboxForcePCId != 'undefined' ?
1173 mboxForcePCId : J.getCookie(Ab);
1174 if (this.Ib != null) {
1175 J.setCookie(Ab, this.Ib, sc);
1176 }
1177
1178};
1179
1180
1181mboxPC.prototype.getId = function() {
1182 return this.Ib;
1183};
1184
1185
1186mboxPC.prototype.forceId = function(uc) {
1187 if (this.Ib != uc) {
1188 this.Ib = uc;
1189 this.J.setCookie(this.Ab, this.Ib, this.sc);
1190 return true;
1191 }
1192 return false;
1193};
1194
1195mboxGetPageParameter = function(g) {
1196 var B = null;
1197 var vc = new RegExp(g + "=([^\&]*)");
1198 var wc = vc.exec(document.location);
1199
1200 if (wc != null && wc.length >= 2) {
1201 B = wc[1];
1202 }
1203 return B;
1204};
1205
1206mboxSetCookie = function(g, h, bb) {
1207 return mboxFactoryDefault.getCookieManager().setCookie(g, h, bb);
1208};
1209
1210mboxGetCookie = function(g) {
1211 return mboxFactoryDefault.getCookieManager().getCookie(g);
1212};
1213
1214mboxCookiePageDomain = function() {
1215 var dc = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1];
1216 var xc = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;
1217
1218 if (!xc.exec(dc)) {
1219 var yc =
1220 (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(dc);
1221 if (yc) {
1222 dc = yc[0];
1223 }
1224 }
1225
1226 return dc ? dc: "";
1227};
1228
1229mboxShiftArray = function(zc) {
1230 var B = new Array();
1231 for (var j = 1; j < zc.length; j++) {
1232 B[B.length] = zc[j];
1233 }
1234 return B;
1235};
1236
1237mboxGenerateId = function() {
1238 return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);
1239};
1240
1241mboxScreenHeight = function() {
1242 return screen.height;
1243};
1244
1245mboxScreenWidth = function() {
1246 return screen.width;
1247};
1248
1249mboxBrowserWidth = function() {
1250 return (window.innerWidth) ? window.innerWidth :
1251 document.documentElement ? document.documentElement.clientWidth :
1252 document.body.clientWidth;
1253};
1254
1255mboxBrowserHeight = function() {
1256 return (window.innerHeight) ? window.innerHeight :
1257 document.documentElement ? document.documentElement.clientHeight :
1258 document.body.clientHeight;
1259};
1260
1261mboxBrowserTimeOffset = function() {
1262 return -new Date().getTimezoneOffset();
1263};
1264
1265mboxScreenColorDepth = function() {
1266 return screen.pixelDepth;
1267};
1268
1269if (typeof mboxVersion == 'undefined') {
1270 var mboxVersion = 40;
1271 var mboxFactories = new mboxMap();
1272 var mboxFactoryDefault = new mboxFactory('comparenetworks2.tt.omtrdc.net', 'comparenetworks2',
1273 'default');
1274};
1275
1276if (mboxGetPageParameter("mboxDebug") != null ||
1277 mboxFactoryDefault.getCookieManager()
1278 .getCookie("debug") != null) {
1279 setTimeout(function() {
1280 if (typeof mboxDebugLoaded == 'undefined') {
1281 alert('Could not load the remote debug.\nPlease check your connection'
1282 + ' to Test&amp;Target servers');
1283 }
1284 }, 60*60);
1285 document.write('<' + 'scr' + 'ipt language="Javascript1.2" src='
1286 + '"http://admin16.testandtarget.omniture.com/admin/mbox/mbox_debug.jsp?mboxServerHost=comparenetworks2.tt.omtrdc.net'
1287 + '&clientCode=comparenetworks2"><' + '\/scr' + 'ipt>');
1288};
1289
1290
1291
1292
1293mboxScPluginFetcher = function(b, Ac) {
1294 this.b = b;
1295 this.Ac = Ac;
1296};
1297
1298
1299mboxScPluginFetcher.prototype.Bc = function(w) {
1300 w.setBasePath('/m2/' + this.b + '/sc/standard');
1301 this.Cc(w);
1302
1303 var e = w.buildUrl();
1304 e += '&scPluginVersion=1';
1305 return e;
1306};
1307
1308
1309mboxScPluginFetcher.prototype.Cc = function(w) {
1310 var Dc = [
1311 "dynamicVariablePrefix","visitorID","vmk","ppu","charSet",
1312 "visitorNamespace","cookieDomainPeriods","cookieLifetime","pageName",
1313 "currencyCode","variableProvider","channel","server",
1314 "pageType","transactionID","purchaseID","campaign","state","zip","events",
1315 "products","linkName","linkType","resolution","colorDepth",
1316 "javascriptVersion","javaEnabled","cookiesEnabled","browserWidth",
1317 "browserHeight","connectionType","homepage","pe","pev1","pev2","pev3",
1318 "visitorSampling","visitorSamplingGroup","dynamicAccountSelection",
1319 "dynamicAccountList","dynamicAccountMatch","trackDownloadLinks",
1320 "trackExternalLinks","trackInlineStats","linkLeaveQueryString",
1321 "linkDownloadFileTypes","linkExternalFilters","linkInternalFilters",
1322 "linkTrackVars","linkTrackEvents","linkNames","lnk","eo" ];
1323
1324 for (var j = 0; j < Dc.length; j++) {
1325 this.Ec(Dc[j], w);
1326 }
1327
1328 for (var j = 1; j <= 50; j++) {
1329 this.Ec('prop' + j, w);
1330 this.Ec('eVar' + j, w);
1331 this.Ec('hier' + j, w);
1332 }
1333};
1334
1335mboxScPluginFetcher.prototype.Ec = function(g, w) {
1336 var h = this.Ac[g];
1337 if (typeof(h) === 'undefined' || h === null || h === '') {
1338 return;
1339 }
1340 w.addParameter(g, h);
1341};
1342
1343mboxScPluginFetcher.prototype.cancel = function() { };
1344
1345
1346mboxStandardScPluginFetcher = function(b, Ac) {
1347 mboxScPluginFetcher.call(this, b, Ac);
1348};
1349mboxStandardScPluginFetcher.prototype = new mboxScPluginFetcher;
1350
1351mboxStandardScPluginFetcher.prototype.getType = function() {
1352 return 'standard';
1353};
1354
1355mboxStandardScPluginFetcher.prototype.fetch = function(w) {
1356 w.setServerType(this.getType());
1357 var e = this.Bc(w);
1358
1359 document.write('<' + 'scr' + 'ipt src="' + e +
1360 '" language="JavaScript"><' + '\/scr' + 'ipt>');
1361};
1362
1363
1364mboxAjaxScPluginFetcher = function(b, Ac) {
1365 mboxScPluginFetcher.call(this, b, Ac);
1366};
1367mboxAjaxScPluginFetcher.prototype = new mboxScPluginFetcher;
1368
1369mboxAjaxScPluginFetcher.prototype.fetch = function(w) {
1370 w.setServerType(this.getType());
1371 var e = this.Bc(w);
1372
1373 this.x = document.createElement('script');
1374 this.x.src = e;
1375
1376 document.body.appendChild(this.x);
1377};
1378
1379mboxAjaxScPluginFetcher.prototype.getType = function() {
1380 return 'ajax';
1381};
1382
1383
1384
1385function mboxLoadSCPlugin(Ac) {
1386 if (!Ac) {
1387 return null;
1388 }
1389 Ac.m_tt = function(Ac) {
1390
1391 var Fc = Ac.m_i('tt');
1392
1393 Fc.H = true;
1394 Fc.b = 'comparenetworks2';
1395
1396 
1397 Fc['_t'] = function() {
1398 if (!this.isEnabled()) {
1399 return;
1400 }
1401
1402 var Y = this.Hc();
1403 if (Y) {
1404 
1405 
1406 var Ub = mboxFactoryDefault.isDomLoaded() ?
1407 new mboxAjaxScPluginFetcher(this.b, this.s) :
1408 new mboxStandardScPluginFetcher(this.b, this.s);
1409 Y.setFetcher(Ub);
1410 Y.load();
1411 }
1412 };
1413
1414 Fc.isEnabled = function() {
1415 return this.H && mboxFactoryDefault.isEnabled();
1416 };
1417
1418 Fc.Hc = function() {
1419 var ab = this.Ic();
1420 var Fb = document.createElement('DIV');
1421 return mboxFactoryDefault.create(ab, new Array(), Fb);
1422 };
1423
1424 Fc.Ic = function() {
1425 var Jc = this.s.events && this.s.events.indexOf('purchase') != -1;
1426 return 'SiteCatalyst: ' + (Jc ? 'purchase' : 'event');
1427 };
1428 };
1429
1430 return Ac.loadModule('tt');
1431};
1432
1433var mboxTrack=function(mbox,params){var m,u,i,f=mboxFactoryDefault;if(f.isEnabled()){if(f.getMboxes().length()>0){m=f.getMboxes().getById(0);u=m.getURL().replace("mbox="+escape(m.getName()),"mbox="+mbox).replace("/undefined","/ajax").replace("mboxPage="+f.getPageId(),"mboxPage="+mboxGenerateId())+'&'+params,i=new Image();i.style.display='none';i.src=u;document.body.appendChild(i)}else{mboxTrackDefer(mbox,params)}}},mboxTrackDefer=function(mbox,params){var f=mboxFactoryDefault;if(f.isEnabled()){mboxFactoryDefault.getSignaler().signal(mbox,mbox+'&'+params)}},mboxTrackLink=function(mbox,params,url){mboxTrack(mbox,params);setTimeout("location='"+url+"'",500)};

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.