Guest User

NonExistentImage gif 127.0.0.1

a guest
May 17th, 2014
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Hashtable() {
  2.     var j = {
  3.         __indexToValue: [],
  4.         __indexToKeys: []
  5.     };
  6.     var f = [];
  7.     var h = 0;
  8.     var k = this;
  9.  
  10.     function g(b) {
  11.         var a = null;
  12.         var c = 0;
  13.         while (typeof f[c] == "number") {
  14.             c += 1
  15.         }
  16.         f[c] = 0;
  17.         this.hasNext = this.hasMoreElements = function () {
  18.             if (f[c] < h) {
  19.                 return true
  20.             } else {
  21.                 if (typeof f[c] == "number") {
  22.                     f[c] = null
  23.                 }
  24.                 return false
  25.             }
  26.         };
  27.         this.next = this.nextElement = function () {
  28.             if (this.hasNext) {
  29.                 a = f[c];
  30.                 return j[b][f[c]++]
  31.             } else {
  32.                 return null
  33.             }
  34.         };
  35.         this.remove = function () {
  36.             if (typeof a == "number") {
  37.                 k.remove(j.__indexToKeys[a]);
  38.                 a = null
  39.             }
  40.         }
  41.     }
  42.     this.get = function (a) {
  43.         if (typeof j[a] == "number") {
  44.             return j.__indexToValue[j[a]]
  45.         } else {
  46.             return null
  47.         }
  48.     };
  49.     this.put = function (b, a) {
  50.         if (typeof j[b] == "number") {
  51.             j.__indexToValue[j[b]] = a
  52.         } else {
  53.             j[b] = h;
  54.             j.__indexToValue[h] = a;
  55.             j.__indexToKeys[h++] = b
  56.         }
  57.     };
  58.     this.remove = function (b) {
  59.         var c = j[b];
  60.         if (typeof c == "number") {
  61.             var a = 0;
  62.             delete j[b];
  63.             h -= 1;
  64.             for (a = c; a < h; a++) {
  65.                 j.__indexToValue[a] = j.__indexToValue[a + 1];
  66.                 j[(j.__indexToKeys[a] = j.__indexToKeys[a + 1])] = a
  67.             }
  68.             for (a = 0; a < f.length; a++) {
  69.                 if ((f[a]) && (c < f[a])) {
  70.                     f[a] -= 1
  71.                 }
  72.             }
  73.         }
  74.     };
  75.     this.size = function () {
  76.         return h
  77.     };
  78.     this.__enumerate = function (a) {
  79.         return new g(a)
  80.     };
  81.     Hashtable.prototype.elements = function () {
  82.         return this.__enumerate("__indexToValue")
  83.     };
  84.     Hashtable.prototype.keys = function () {
  85.         return this.__enumerate("__indexToKeys")
  86.     };
  87.     Hashtable.prototype.clear = function () {
  88.         var a = this.keys();
  89.         while (a.hasNext()) {
  90.             this.remove(a.next())
  91.         }
  92.     };
  93.     Hashtable.prototype.toString = function () {
  94.         var d = " =&gt; ";
  95.         var b = "\r\n";
  96.         var a, c = this.keys();
  97.         var e = "";
  98.         while (c.hasNext()) {
  99.             a = c.next();
  100.             e += a + d + this.get(a) + b
  101.         }
  102.         return e
  103.     };
  104.     Hashtable.prototype.contains = function (b) {
  105.         var a = this.elements();
  106.         while (a.hasNext()) {
  107.             if (a.next() == b) {
  108.                 return true
  109.             }
  110.         }
  111.         return false
  112.     };
  113.     Hashtable.prototype.containsValue = Hashtable.prototype.contains;
  114.     Hashtable.prototype.containsKey = function (a) {
  115.         return (this.get(a) !== null)
  116.     };
  117.     Hashtable.prototype.isEmpty = function () {
  118.         return (this.size() === 0)
  119.     };
  120.     Hashtable.prototype.putAll = function (b) {
  121.         if (b.constructor == Hashtable) {
  122.             var a, c = b.keys();
  123.             while (c.hasNext()) {
  124.                 a = c.next();
  125.                 this.put(a, b.get(a))
  126.             }
  127.         }
  128.     };
  129.     Hashtable.prototype.clone = function () {
  130.         var a = new Hashtable();
  131.         a.putAll(this);
  132.         return a
  133.     };
  134.     Hashtable.prototype.equals = function (a) {
  135.         return (a == this)
  136.     }
  137. }
  138.  
  139. function startsWith(c, d) {
  140.     return (c.indexOf(d) === 0)
  141. }
  142.  
  143. function DomDataCollection(n) {
  144.     var j = this;
  145.     j.config = {
  146.         recursion_level: 1,
  147.         collection_mode: "partial",
  148.         functionsToExclude: [],
  149.         function_list_size: 1024,
  150.         json_script: n ? n : "json2.js"
  151.     };
  152.     j.emptyDomData = function () {
  153.         j.dom_data = {
  154.             functions: {
  155.                 names: [],
  156.                 excluded: {
  157.                     size: 0,
  158.                     count: 0
  159.                 },
  160.                 truncated: false
  161.             },
  162.             inputs: [],
  163.             iFrames: [],
  164.             scripts: [],
  165.             collection_status: DomDataCollection.NotStarted
  166.         }
  167.     };
  168.     j.startInspection = function () {
  169.         var b = false;
  170.         var c = true;
  171.         try {
  172.             j.inspectJSFunctions();
  173.             c = false
  174.         } catch (a) {
  175.             b = b || true
  176.         }
  177.         try {
  178.             j.inspectFrames();
  179.             c = false
  180.         } catch (a) {
  181.             b = b || true
  182.         }
  183.         try {
  184.             j.inspectScripts();
  185.             c = false
  186.         } catch (a) {
  187.             b = b || true
  188.         }
  189.         try {
  190.             j.inspectInputFields();
  191.             c = false
  192.         } catch (a) {
  193.             b = b || true
  194.         }
  195.         if (b) {
  196.             if (c) {
  197.                 j.dom_data.collection_status = DomDataCollection.Fail
  198.             } else {
  199.                 j.dom_data.collection_status = DomDataCollection.Partial
  200.             }
  201.         } else {
  202.             j.dom_data.collection_status = DomDataCollection.Success
  203.         }
  204.         j.handleSizeLimit()
  205.     };
  206.     j.domDataAsJSON = function () {
  207.         return stripIllegalChars(JSON.stringify(j.dom_data))
  208.     };
  209.     j.recursiveGetAllFunctionNamesUnderElement = function (B, e, A) {
  210.         var C;
  211.         var d;
  212.         var g;
  213.         var x = j.config;
  214.         var D = x.recursion_level;
  215.         var a = x.collection_mode;
  216.         if (j.dom_data.functions === undefined || j.dom_data.functions.names === undefined) {
  217.             j.dom_data.functions = {
  218.                 names: [],
  219.                 excluded: {
  220.                     size: 0,
  221.                     count: 0
  222.                 },
  223.                 truncated: false
  224.             }
  225.         }
  226.         var f = j.dom_data.functions;
  227.         var c = f.excluded;
  228.         for (var E in e) {
  229.             try {
  230.                 var F = e[E];
  231.                 C = "" + F;
  232.                 if (B.length > 0) {
  233.                     prefix = B + "."
  234.                 } else {
  235.                     prefix = ""
  236.                 }
  237.                 d = prefix + E;
  238.                 if (k(F)) {
  239.                     if (j.functionShouldBeCollected(F, E)) {
  240.                         var G = f.names;
  241.                         g = G.length;
  242.                         G[g] = d
  243.                     } else {
  244.                         if (a == "partial") {
  245.                             c.size += C.length;
  246.                             c.count++
  247.                         }
  248.                     }
  249.                 }
  250.                 if (A + 1 < D) {
  251.                     j.recursiveGetAllFunctionNamesUnderElement(d, F, A + 1)
  252.                 } else {
  253.                     f.names.sort()
  254.                 }
  255.             } catch (b) {
  256.                 if (!window.console) {
  257.                     window.console = {};
  258.                     window.console.info = o;
  259.                     window.console.log = o;
  260.                     window.console.warn = o;
  261.                     window.console.error = o
  262.                 }
  263.                 if (console && console.log) {
  264.                     console.log("error counting functions: " + b.toString())
  265.                 }
  266.             }
  267.         }
  268.     };
  269.  
  270.     function o() {}
  271.  
  272.     function k(a) {
  273.         return typeof a == "function"
  274.     }
  275.  
  276.     function h(a) {
  277.         return a.length
  278.     }
  279.     var l = new Hashtable();
  280.     j.initFunctionsToExclude = function () {
  281.         if (l) {
  282.             l.clear()
  283.         }
  284.         var a = j.config.functionsToExclude;
  285.         var b = a.length;
  286.         while (b--) {
  287.             l.put(a[b], "")
  288.         }
  289.     };
  290.     j.functionShouldBeCollected = function m(a, b) {
  291.         if (j.config.collection_mode == "full") {
  292.             return true
  293.         } else {
  294.             if (l.size() === 0) {
  295.                 j.initFunctionsToExclude()
  296.             }
  297.             if (l.containsKey(b)) {
  298.                 return false
  299.             } else {
  300.                 return true
  301.             }
  302.         }
  303.     };
  304.     j.inspectJSFunctions = function () {
  305.         j.dom_data.functions = [];
  306.         j.recursiveGetAllFunctionNamesUnderElement("", window, 0)
  307.     };
  308.     j.handleSizeLimit = function () {
  309.         var x = j.dom_data;
  310.         var g = j.config;
  311.         var v = g.function_list_size;
  312.         var e = x.functions;
  313.         e.names.sort();
  314.         var b = JSON.stringify(x);
  315.         if (v < 0) {
  316.             v = 0
  317.         }
  318.         var a = 0;
  319.         if (g.colllection_mode != "full" && b.length > v) {
  320.             var c = e.names;
  321.             var d = c.toString();
  322.             var y = b.length - JSON.stringify(c).length + "[]".length;
  323.             var f = false;
  324.             var w = c.length;
  325.             while (!f) {
  326.                 if (a++ == 1000) {
  327.                     f = true
  328.                 }
  329.                 lastComma = d.lastIndexOf(",");
  330.                 if (lastComma >= 0 && w > 0) {
  331.                     quotation_marks = w * 2;
  332.                     if (y + lastComma + quotation_marks > v) {
  333.                         d = d.substring(0, lastComma - 1);
  334.                         w--
  335.                     } else {
  336.                         f = true
  337.                     }
  338.                 } else {
  339.                     f = true
  340.                 }
  341.             }
  342.             if (w > 1) {
  343.                 e.truncated = true;
  344.                 e.names = e.names.slice(0, w - 1);
  345.                 x.functions.truncated = true
  346.             } else {
  347.                 j.emptyDomData();
  348.                 x = j.dom_data;
  349.                 x.collection_status = DomDataCollection.Partial;
  350.                 x.functions.truncated = true
  351.             }
  352.         }
  353.     };
  354.     j.inspectFrames = function () {
  355.         j.countElements("iframe")
  356.     };
  357.     j.countElements = function (e) {
  358.         var d;
  359.         var c = document.getElementsByTagName(e);
  360.         if (j.dom_data.iFrames === undefined) {
  361.             j.dom_data.iFrames = []
  362.         }
  363.         var b = j.dom_data.iFrames;
  364.         var a = b.length;
  365.         for (i = 0; i < c.length; i++) {
  366.             b[a + i] = "" + c[i].src
  367.         }
  368.         b.sort()
  369.     };
  370.     j.inspectScripts = function () {
  371.         var b = document.getElementsByTagName("script");
  372.         j.dom_data.scripts = [];
  373.         for (var a = 0; a < b.length; a++) {
  374.             j.dom_data.scripts[a] = b[a].text.length
  375.         }
  376.     };
  377.     j.collectFields = function (b) {
  378.         var r = document.getElementsByTagName(b);
  379.         if (j.dom_data.inputs === undefined) {
  380.             j.dom_data.inputs = []
  381.         }
  382.         var e = j.dom_data.inputs;
  383.         var g = e.length;
  384.         var a = r.length;
  385.         while (a--) {
  386.             var c = r[a];
  387.             var d = c.name;
  388.             var f = c.id;
  389.             if (d && d.length > 0) {
  390.                 element_name = d
  391.             } else {
  392.                 if (f && f.length > 0) {
  393.                     element_name = f
  394.                 } else {
  395.                     element_name = "NO_NAME"
  396.                 }
  397.             }
  398.             e[g + a] = element_name
  399.         }
  400.         e.sort()
  401.     };
  402.     j.inspectInputFields = function () {
  403.         j.collectFields("input");
  404.         j.collectFields("textarea");
  405.         j.collectFields("select");
  406.         j.collectFields("button")
  407.     };
  408.     loadJSON = function () {
  409.         if (!window.JSON) {
  410.             var a = document.getElementsByTagName("head")[0];
  411.             var b = document.createElement("script");
  412.             b.type = "text/javascript";
  413.             b.src = j.config.json_script;
  414.             a.appendChild(b)
  415.         }
  416.     };
  417.     j.emptyDomData();
  418.     loadJSON()
  419. }
  420. DomDataCollection.Success = 0;
  421. DomDataCollection.Fail = 1;
  422. DomDataCollection.Partial = 2;
  423. DomDataCollection.NotStarted = 3;
  424.  
  425. function IE_FingerPrint() {
  426.     this.deviceprint_browser = function () {
  427.         var a = navigator.userAgent.toLowerCase();
  428.         t = a + SEP + navigator.appVersion + SEP + navigator.platform;
  429.         t += SEP + navigator.appMinorVersion + SEP + navigator.cpuClass + SEP + navigator.browserLanguage;
  430.         t += SEP + ScriptEngineBuildVersion();
  431.         return t
  432.     };
  433.     this.deviceprint_software = function () {
  434.         var b = "";
  435.         var l = true;
  436.         try {
  437.             document.body.addBehavior("#default#clientCaps");
  438.             var k;
  439.             var m = d.length;
  440.             for (i = 0; i < m; i++) {
  441.                 k = activeXDetect(d[i]);
  442.                 var j = c[i];
  443.                 if (k) {
  444.                     if (l === true) {
  445.                         b += j + PAIR + k;
  446.                         l = false
  447.                     } else {
  448.                         b += SEP + j + PAIR + k
  449.                     }
  450.                 } else {
  451.                     b += "";
  452.                     l = false
  453.                 }
  454.             }
  455.         } catch (a) {}
  456.         return b
  457.     };
  458.     var c = ["abk", "wnt", "aol", "arb", "chs", "cht", "dht", "dhj", "dan", "dsh", "heb", "ie5", "icw", "ibe", "iec", "ieh", "iee", "jap", "krn", "lan", "swf", "shw", "msn", "wmp", "obp", "oex", "net", "pan", "thi", "tks", "uni", "vtc", "vnm", "mvm", "vbs", "wfd"];
  459.     var d = ["7790769C-0471-11D2-AF11-00C04FA35D02", "89820200-ECBD-11CF-8B85-00AA005B4340", "47F67D00-9E55-11D1-BAEF-00C04FC2D130", "76C19B38-F0C8-11CF-87CC-0020AFEECF20", "76C19B34-F0C8-11CF-87CC-0020AFEECF20", "76C19B33-F0C8-11CF-87CC-0020AFEECF20", "9381D8F2-0288-11D0-9501-00AA00B911A5", "4F216970-C90C-11D1-B5C7-0000F8051515", "283807B5-2C60-11D0-A31D-00AA00B92C03", "44BBA848-CC51-11CF-AAFA-00AA00B6015C", "76C19B36-F0C8-11CF-87CC-0020AFEECF20", "89820200-ECBD-11CF-8B85-00AA005B4383", "5A8D6EE0-3E18-11D0-821E-444553540000", "630B1DA0-B465-11D1-9948-00C04F98BBC9", "08B0E5C0-4FCB-11CF-AAA5-00401C608555", "45EA75A0-A269-11D1-B5BF-0000F8051515", "DE5AED00-A4BF-11D1-9948-00C04F98BBC9", "76C19B30-F0C8-11CF-87CC-0020AFEECF20", "76C19B31-F0C8-11CF-87CC-0020AFEECF20", "76C19B50-F0C8-11CF-87CC-0020AFEECF20", "D27CDB6E-AE6D-11CF-96B8-444553540000", "2A202491-F00D-11CF-87CC-0020AFEECF20", "5945C046-LE7D-LLDL-BC44-00C04FD912BE", "22D6F312-B0F6-11D0-94AB-0080C74C7E95", "3AF36230-A269-11D1-B5BF-0000F8051515", "44BBA840-CC51-11CF-AAFA-00AA00B6015C", "44BBA842-CC51-11CF-AAFA-00AA00B6015B", "76C19B32-F0C8-11CF-87CC-0020AFEECF20", "76C19B35-F0C8-11CF-87CC-0020AFEECF20", "CC2A9BA0-3BDD-11D0-821E-444553540000", "3BF42070-B3B1-11D1-B5C5-0000F8051515", "10072CEC-8CC1-11D1-986E-00A0C955B42F", "76C19B37-F0C8-11CF-87CC-0020AFEECF20", "08B0E5C0-4FCB-11CF-AAA5-00401C608500", "4F645220-306D-11D2-995D-00C04F98BBC9", "73FA19D0-2D75-11D2-995D-00C04F98BBC9"]
  460. }
  461. IE_FingerPrint.prototype = new FingerPrint();
  462.  
  463. function Mozilla_FingerPrint() {}
  464. Mozilla_FingerPrint.prototype = new FingerPrint();
  465.  
  466. function Opera_FingerPrint() {}
  467. Opera_FingerPrint.prototype = new FingerPrint();
  468.  
  469. function Timer() {
  470.     this.startTime = new Date().getTime()
  471. }
  472. Timer.prototype.start = function () {
  473.     this.startTime = new Date().getTime()
  474. };
  475. Timer.prototype.duration = function () {
  476.     return (new Date().getTime()) - this.startTime
  477. };
  478.  
  479. function getRandomPort() {
  480.     return Math.floor(Math.random() * 60000 + 4000)
  481. }
  482. var ProxyCollector = {};
  483. ProxyCollector.internalIP = "127.0.0.1";
  484. ProxyCollector.externalIP;
  485. ProxyCollector.internalPingTime;
  486. ProxyCollector.externalPingTime;
  487. ProxyCollector.setInternalPingTime = function (b) {
  488.     ProxyCollector.internalPingTime = b
  489. };
  490. ProxyCollector.setExternalPingTime = function (b) {
  491.     ProxyCollector.externalPingTime = b
  492. };
  493. ProxyCollector.PROXY_DETECTION_TIMEOUT = 5000;
  494. ProxyCollector.TIMEOUT_CHECK_FREQUENCY = 1000;
  495. ProxyCollector.isTimedOut = function (d, e, f) {
  496.     _timer = new Timer();
  497.     if ((e - _timer.duration() <= 0) && (((typeof ProxyCollector.internalPingTime === "undefined") && ((new RegExp("internalPingTime")).test(d))) || ((typeof ProxyCollector.externalPingTime === "undefined") && ((new RegExp("externalPingTime")).test(d))))) {
  498.         d.call(this, -1);
  499.         f.abort()
  500.     } else {
  501.         if (((typeof ProxyCollector.internalPingTime === "undefined") && ((new RegExp("internalPingTime")).test(d))) || ((typeof ProxyCollector.externalPingTime === "undefined") && ((new RegExp("externalPingTime")).test(d)))) {
  502.             setTimeout(function () {
  503.                 ProxyCollector.isTimedOut(d, e - (_timer.duration() + ProxyCollector.TIMEOUT_CHECK_FREQUENCY), f)
  504.             }, ProxyCollector.TIMEOUT_CHECK_FREQUENCY)
  505.         }
  506.     }
  507. };
  508. ProxyCollector.doAjax = function (k, l) {
  509.     var j = document.location.protocol + "//" + k + ":" + getRandomPort() + "/NonExistentImage" + getRandomPort() + ".gif";
  510.     var m;
  511.     var o;
  512.     if (window.XDomainRequest) {
  513.         m = new window.XDomainRequest();
  514.         o = new Timer();
  515.         try {
  516.             m.timeout = ProxyCollector.PROXY_DETECTION_TIMEOUT;
  517.             m.ontimeout = function () {
  518.                 l.call(this, -1);
  519.                 m.abort()
  520.             };
  521.             m.onprogress = function () {
  522.                 l.call(this, o.duration());
  523.                 m.abort()
  524.             };
  525.             m.onerror = function () {
  526.                 l.call(this, o.duration());
  527.                 m.abort()
  528.             };
  529.             m.open("GET", j, true);
  530.             m.send()
  531.         } catch (h) {
  532.             ProxyCollector.doAjaxViaImage(l, j)
  533.         }
  534.     } else {
  535.         m = new XMLHttpRequest();
  536.         var n = "ontimeout" in m;
  537.         o = new Timer();
  538.         try {
  539.             m.onreadystatechange = function () {
  540.                 if (m.readyState == 4) {
  541.                     if (((typeof ProxyCollector.internalPingTime === "undefined") && ((new RegExp("internalPingTime")).test(l))) || ((typeof ProxyCollector.externalPingTime === "undefined") && ((new RegExp("externalPingTime")).test(l)))) {
  542.                         l.call(this, o.duration())
  543.                     }
  544.                 }
  545.             };
  546.             m.timeout = ProxyCollector.PROXY_DETECTION_TIMEOUT;
  547.             m.ontimeout = function () {
  548.                 l.call(this, -1);
  549.                 m.abort()
  550.             };
  551.             m.open("GET", j, true);
  552.             m.send();
  553.             if (!n) {
  554.                 ProxyCollector.isTimedOut(l, ProxyCollector.PROXY_DETECTION_TIMEOUT - o.duration(), m)
  555.             }
  556.         } catch (h) {
  557.             ProxyCollector.doAjaxViaImage(l, j)
  558.         }
  559.     }
  560. };
  561. ProxyCollector.doAjaxViaImage = function (g, e) {
  562.     var f = new Image();
  563.     var h = new Timer();
  564.     f.onerror = function () {
  565.         g.call(this, h.duration())
  566.     };
  567.     f.src = e
  568. };
  569. ProxyCollector.collect = function () {
  570.     ProxyCollector.doAjax(ProxyCollector.externalIP, ProxyCollector.setExternalPingTime);
  571.     if (typeof XDomainRequest == "object") {
  572.         if (!ProxyCollector.externalPingTime) {
  573.             forceIE89Synchronicity()
  574.         }
  575.     } else {
  576.         ProxyCollector.doAjax(ProxyCollector.internalIP, ProxyCollector.setInternalPingTime)
  577.     }
  578. };
  579. forceIE89Synchronicity = function () {
  580.     if (!ProxyCollector.externalPingTime) {
  581.         setTimeout(forceIE89Synchronicity, 100)
  582.     } else {
  583.         ProxyCollector.doAjax(ProxyCollector.internalIP, ProxyCollector.setInternalPingTime)
  584.     }
  585. };
  586. ProxyCollector.isValidIPAddress = function (h) {
  587.     var e = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
  588.     if (e.test(h)) {
  589.         var g = h.split(".");
  590.         if (parseInt(parseFloat(g[0])) == 0) {
  591.             return false
  592.         }
  593.         for (var f = 0; f < g.length; f++) {
  594.             if (parseInt(parseFloat(g[f])) > 255) {
  595.                 return false
  596.             }
  597.         }
  598.         return true
  599.     } else {
  600.         return false
  601.     }
  602. };
  603. ProxyCollector.initProxyCollection = function () {
  604.     if (ProxyCollector.isValidIPAddress(ProxyCollector.externalIP) && ProxyCollector.isValidIPAddress(ProxyCollector.internalIP)) {
  605.         ProxyCollector.collect()
  606.     }
  607. };
  608.  
  609. function BlackberryLocationCollector() {
  610.     var m = this;
  611.     var q = null;
  612.     this.getGeolocationWatchId = function () {
  613.         return q
  614.     };
  615.     var n = null;
  616.     this.getGeolocationLastPosition = function () {
  617.         return n
  618.     };
  619.     var r = 4;
  620.     this.getGeolocationStatusCode = function () {
  621.         return r
  622.     };
  623.     var l = "";
  624.     this.getGeolocationErrorMessage = function () {
  625.         return l
  626.     };
  627.     var k = {
  628.         aidMode: 2,
  629.         timeout: 180,
  630.         relevancy: 120,
  631.         expiration: 48,
  632.         alertDebug: false
  633.     };
  634.     var o = -1;
  635.     var j = 0;
  636.     this.getInvokeCount = function () {
  637.         return j
  638.     };
  639.     this.handleBlackBerryLocationTimeout = function () {
  640.         if (o != -1) {
  641.             m.stopWatch();
  642.             r = 3;
  643.             if (j === 0 && k.aidMode !== 0) {
  644.                 j++;
  645.                 m.startLocationWatch()
  646.             }
  647.         }
  648.     };
  649.     this.handlePosition = function () {
  650.         clearTimeout(o);
  651.         o = -1;
  652.         var c = false;
  653.         if (blackberry.location.latitude === 0 && blackberry.location.longitude === 0) {
  654.             if (k.alertDebug) {
  655.                 alert("Got empty position")
  656.             }
  657.             if (n === null) {
  658.                 r = 2
  659.             }
  660.         } else {
  661.             var a = null;
  662.             if (blackberry.location.timestamp) {
  663.                 a = getTimestampInMillis(blackberry.location.timestamp)
  664.             } else {
  665.                 a = new Date().getTime()
  666.             }
  667.             var b = new Date().getTime();
  668.             if ((b - a) <= (k.expiration * 60 * 60 * 1000)) {
  669.                 if (n === null || a > n.timestamp) {
  670.                     var d = n === null ? 0 : n.timestamp;
  671.                     if (k.alertDebug) {
  672.                         alert("Saved new position. New timestamp: " + a + " Old: " + d)
  673.                     }
  674.                     n = {
  675.                         timestamp: a,
  676.                         coords: {
  677.                             latitude: blackberry.location.latitude,
  678.                             longitude: blackberry.location.longitude
  679.                         }
  680.                     };
  681.                     r = 0
  682.                 } else {
  683.                     if (k.alertDebug) {
  684.                         alert("New position is not saved. New timestamp: " + a + " Old: " + n.timestamp)
  685.                     }
  686.                 }
  687.             } else {
  688.                 if (k.alertDebug) {
  689.                     alert("New position is not saved. It is expired: " + ((b - a) * 1000 * 60 * 60) + " hours old")
  690.                 }
  691.             }
  692.         } if (n !== null) {
  693.             var b = new Date().getTime();
  694.             c = (b - n.timestamp) < (k.relevancy * 1000)
  695.         }
  696.         m.stopWatch();
  697.         if (k.alertDebug) {
  698.             alert("Relevant position? " + c)
  699.         }
  700.         if ((j === 0 && k.aidMode !== 0) || !c) {
  701.             j++;
  702.             m.startLocationWatch()
  703.         }
  704.     };
  705.     this.init = function (a, b, d, c) {
  706.         if (a >= 0 && a <= 2) {
  707.             k.aidMode = a
  708.         }
  709.         if (b !== null && b >= 90 && b <= 300) {
  710.             k.timeout = b
  711.         }
  712.         if (d !== null && d >= 60 && d <= 240) {
  713.             k.relevancy = d
  714.         }
  715.         if (c !== null && c >= 24 && c <= 60) {
  716.             k.expiration = c
  717.         }
  718.     };
  719.     this.startLocationWatch = function () {
  720.         if (j === 0) {
  721.             blackberry.location.setAidMode(0)
  722.         } else {
  723.             blackberry.location.setAidMode(k.aidMode)
  724.         }
  725.         var a = k.timeout * 1000;
  726.         o = setTimeout("geoLocator.handleBlackBerryLocationTimeout()", a);
  727.         blackberry.location.onLocationUpdate(m.handlePosition);
  728.         blackberry.location.refreshLocation();
  729.         q = 1;
  730.         return true
  731.     };
  732.     this.stopWatch = function () {
  733.         try {
  734.             blackberry.location.removeLocationUpdate(m.handlePosition)
  735.         } catch (a) {}
  736.         q = -2
  737.     };
  738.     this.generateGeolocationJSONStruct = function () {
  739.         var b = null;
  740.         if (n !== null) {
  741.             var a = convertTimestampToGMT(n.timestamp);
  742.             b = {
  743.                 GeoLocationInfo: [{
  744.                     Status: r,
  745.                     Longitude: n.coords.longitude,
  746.                     Latitude: n.coords.latitude,
  747.                     Timestamp: a
  748.                 }]
  749.             }
  750.         } else {
  751.             b = {
  752.                 GeoLocationInfo: [{
  753.                     Status: r
  754.                 }]
  755.             }
  756.         }
  757.         return JSON.stringify(b)
  758.     }
  759. }
  760.  
  761. function detectFields() {
  762.     var u = "form";
  763.     var n = "input";
  764.     var j = document.getElementsByTagName("form");
  765.     var w = j.length;
  766.     var m;
  767.     var v;
  768.     var q = [];
  769.     q.push("url=" + window.location.href);
  770.     for (var r = 0; r < w; r++) {
  771.         q.push(u + "=" + j[r].name);
  772.         m = j[r].getElementsByTagName("input");
  773.         v = m.length;
  774.         for (var s = 0; s < v; s++) {
  775.             if (m[s].type != "hidden") {
  776.                 q.push(n + "=" + m[s].name)
  777.             }
  778.         }
  779.     }
  780.     var o = q.join("|");
  781.     return o
  782. }
  783. var SEP = "|";
  784. var PAIR = "=";
  785. var DEV = "~";
  786.  
  787. function FingerPrint() {
  788.     var d = "3.4.0.0_2";
  789.     var c = new Hashtable();
  790.     c.put("npnul32", "def");
  791.     c.put("npqtplugin6", "qt6");
  792.     c.put("npqtplugin5", "qt5");
  793.     c.put("npqtplugin4", "qt4");
  794.     c.put("npqtplugin3", "qt3");
  795.     c.put("npqtplugin2", "qt2");
  796.     c.put("npqtplugin", "qt1");
  797.     c.put("nppdf32", "pdf");
  798.     c.put("NPSWF32", "swf");
  799.     c.put("NPJava11", "j11");
  800.     c.put("NPJava12", "j12");
  801.     c.put("NPJava13", "j13");
  802.     c.put("NPJava32", "j32");
  803.     c.put("NPJava14", "j14");
  804.     c.put("npoji600", "j61");
  805.     c.put("NPJava131_16", "j16");
  806.     c.put("NPOFFICE", "mso");
  807.     c.put("npdsplay", "wpm");
  808.     c.put("npwmsdrm", "drm");
  809.     c.put("npdrmv2", "drn");
  810.     c.put("nprjplug", "rjl");
  811.     c.put("nppl3260", "rpl");
  812.     c.put("nprpjplug", "rpv");
  813.     c.put("npchime", "chm");
  814.     c.put("npCortona", "cor");
  815.     c.put("np32dsw", "dsw");
  816.     c.put("np32asw", "asw");
  817.     this.deviceprint_version = function () {
  818.         return d
  819.     };
  820.     this.deviceprint_browser = function () {
  821.         var a = navigator.userAgent.toLowerCase();
  822.         var b = a + SEP + navigator.appVersion + SEP + navigator.platform;
  823.         return b
  824.     };
  825.     this.deviceprint_software = function () {
  826.         var a = "";
  827.         var q = true;
  828.         var b = "";
  829.         var n = "";
  830.         var s = navigator.plugins;
  831.         var o = navigator.mimeTypes;
  832.         if (s.length > 0) {
  833.             var r = "";
  834.             var u = "Plugins";
  835.             var m = s.length;
  836.             for (i = 0; i < m; i++) {
  837.                 plugin = s[i];
  838.                 r = stripFullPath(plugin.filename, u, ".");
  839.                 if (q === true) {
  840.                     n = c.containsKey(r);
  841.                     if (n) {
  842.                         b += c.get(r);
  843.                         q = false
  844.                     } else {
  845.                         b = "";
  846.                         q = false
  847.                     }
  848.                 } else {
  849.                     n = c.containsKey(r);
  850.                     if (n) {
  851.                         b += SEP + c.get(r)
  852.                     } else {
  853.                         b += ""
  854.                     }
  855.                 }
  856.             }
  857.             a = stripIllegalChars(b)
  858.         } else {
  859.             if (o.length > 0) {
  860.                 n = "";
  861.                 for (i = 0; i < o.length; i++) {
  862.                     mimeType = o[i];
  863.                     if (q === true) {
  864.                         n = c.containsKey(mimeType);
  865.                         if (n) {
  866.                             a += c.get(mimeType) + PAIR + mimeType;
  867.                             q = false
  868.                         } else {
  869.                             a += "unknown" + PAIR + mimeType;
  870.                             q = false
  871.                         }
  872.                     } else {
  873.                         n = c.containsKey(mimeType);
  874.                         if (n) {
  875.                             a += SEP + c.get(mimeType) + PAIR + mimeType
  876.                         } else {
  877.                             b += ""
  878.                         }
  879.                     }
  880.                 }
  881.             }
  882.         }
  883.         return a
  884.     };
  885.     this.deviceprint_display = function () {
  886.         var a = "";
  887.         if (self.screen) {
  888.             a += screen.colorDepth + SEP + screen.width + SEP + screen.height + SEP + screen.availHeight
  889.         }
  890.         return a
  891.     };
  892.     this.deviceprint_all_software = function () {
  893.         var m = "";
  894.         var r = true;
  895.         var q = navigator.plugins;
  896.         var b = q.length;
  897.         if (b > 0) {
  898.             var o = "";
  899.             var a = "";
  900.             var n = "";
  901.             for (i = 0; i < b; i++) {
  902.                 var l = q[i];
  903.                 a = l.filename;
  904.                 a = stripFullPath(a, "Plugins", ".");
  905.                 if (r === true) {
  906.                     o += a;
  907.                     r = false
  908.                 } else {
  909.                     o += SEP + a
  910.                 }
  911.             }
  912.             m = stripIllegalChars(o)
  913.         }
  914.         return m
  915.     };
  916.     this.deviceprint_timezone = function () {
  917.         var a = (new Date().getTimezoneOffset() / 60) * (-1);
  918.         var b = new Date();
  919.         if (b.deviceprint_dst()) {
  920.             a--
  921.         } else {}
  922.         return a
  923.     };
  924.     Date.prototype.deviceprint_stdTimezoneOffset = function () {
  925.         var b = new Date(this.getFullYear(), 0, 1);
  926.         var a = new Date(this.getFullYear(), 6, 1);
  927.         return Math.max(b.getTimezoneOffset(), a.getTimezoneOffset())
  928.     };
  929.     Date.prototype.deviceprint_dst = function () {
  930.         return this.getTimezoneOffset() < this.deviceprint_stdTimezoneOffset()
  931.     };
  932.     this.deviceprint_language = function () {
  933.         var j;
  934.         var a = navigator.language;
  935.         var k = navigator.browserLanguage;
  936.         var b = navigator.systemLanguage;
  937.         var h = navigator.userLanguage;
  938.         if (typeof (a) !== "undefined") {
  939.             j = "lang" + PAIR + a + SEP
  940.         } else {
  941.             if (typeof (k) !== "undefined") {
  942.                 j = "lang" + PAIR + k + SEP
  943.             } else {
  944.                 j = "lang" + PAIR + "" + SEP
  945.             }
  946.         } if ((typeof (b) !== "undefined")) {
  947.             j += "syslang" + PAIR + b + SEP
  948.         } else {
  949.             j += "syslang" + PAIR + "" + SEP
  950.         } if ((typeof (h) !== "undefined")) {
  951.             j += "userlang" + PAIR + h
  952.         } else {
  953.             j += "userlang" + PAIR + ""
  954.         }
  955.         return j
  956.     };
  957.     this.deviceprint_java = function () {
  958.         var a = (navigator.javaEnabled()) ? 1 : 0;
  959.         return a
  960.     };
  961.     this.deviceprint_cookie = function () {
  962.         var a = (navigator.cookieEnabled) ? 1 : 0;
  963.         if (typeof navigator.cookieEnabled === "undefined" && !a) {
  964.             document.cookie = "testcookie";
  965.             a = (document.cookie.indexOf("testcookie") !== -1) ? 1 : 0
  966.         }
  967.         return a
  968.     };
  969.     this.deviceprint_appName = function () {
  970.         var a = navigator.appName;
  971.         return (typeof (a) != "undefined") ? a : ""
  972.     };
  973.     this.deviceprint_appCodeName = function () {
  974.         var a = navigator.appCodeName;
  975.         return (typeof (a) != "undefined") ? a : ""
  976.     };
  977.     this.deviceprint_online = function () {
  978.         var a = navigator.onLine;
  979.         return (typeof (a) != "undefined") ? a : ""
  980.     };
  981.     this.deviceprint_opsProfile = function () {
  982.         var a = navigator.opsProfile;
  983.         return ((typeof (a) != "undefined") && (a !== null)) ? a : ""
  984.     };
  985.     this.deviceprint_userProfile = function () {
  986.         var a = navigator.userProfile;
  987.         return ((typeof (a) != "undefined") && (a !== null)) ? a : ""
  988.     };
  989.     this.deviceprint_screen_availWidth = function () {
  990.         var a = screen.availWidth;
  991.         return (typeof (a) != "undefined") ? a : ""
  992.     };
  993.     this.deviceprint_screen_pixelDepth = function () {
  994.         var a = screen.pixelDepth;
  995.         return (typeof (a) != "undefined") ? a : ""
  996.     };
  997.     this.deviceprint_screen_bufferDepth = function () {
  998.         var a = screen.bufferDepth;
  999.         return (typeof (a) != "undefined") ? a : ""
  1000.     };
  1001.     this.deviceprint_screen_deviceXDPI = function () {
  1002.         var a = screen.deviceXDPI;
  1003.         return (typeof (a) != "undefined") ? a : ""
  1004.     };
  1005.     this.deviceprint_screen_deviceYDPI = function () {
  1006.         var a = screen.deviceYDPI;
  1007.         return (typeof (a) != "undefined") ? a : ""
  1008.     };
  1009.     this.deviceprint_screen_logicalXDPI = function () {
  1010.         var a = screen.logicalXDPI;
  1011.         return (typeof (a) != "undefined") ? a : ""
  1012.     };
  1013.     this.deviceprint_screen_logicalYDPI = function () {
  1014.         var a = screen.logicalYDPI;
  1015.         return (typeof (a) != "undefined") ? a : ""
  1016.     };
  1017.     this.deviceprint_screen_fontSmoothingEnabled = function () {
  1018.         var a = screen.fontSmoothingEnabled;
  1019.         return (typeof (a) != "undefined") ? a : ""
  1020.     };
  1021.     this.deviceprint_screen_updateInterval = function () {
  1022.         var a = screen.updateInterval;
  1023.         return (typeof (a) != "undefined") ? a : ""
  1024.     };
  1025.     this.deviceprint_ping_in = function () {
  1026.         if (ProxyCollector && ProxyCollector.internalPingTime) {
  1027.             return ProxyCollector.internalPingTime
  1028.         } else {
  1029.             return ""
  1030.         }
  1031.     };
  1032.     this.deviceprint_ping_ex = function () {
  1033.         if (ProxyCollector && ProxyCollector.externalPingTime) {
  1034.             return ProxyCollector.externalPingTime
  1035.         } else {
  1036.             return ""
  1037.         }
  1038.     }
  1039. }
  1040.  
  1041. function urlEncode(c) {
  1042.     var d = encodeURIComponent(c).replace(/\~/g, "%7E").replace(/\!/g, "%21").replace(/\*/g, "%2A").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\'/g, "%27").replace(/\-/g, "%2D").replace(/\_/g, "%5F").replace(/\./g, "%2E");
  1043.     return d
  1044. }
  1045.  
  1046. function encode_deviceprint() {
  1047.     var b = add_deviceprint();
  1048.     return urlEncode(b)
  1049. }
  1050.  
  1051. function decode_deviceprint() {
  1052.     var b = encode_deviceprint;
  1053.     return decodeURIComponent(urlEncode(b))
  1054. }
  1055.  
  1056. function post_deviceprint() {
  1057.     document.forms[0].pm_fp.value = encode_deviceprint();
  1058.     return true
  1059. }
  1060.  
  1061. function post_fingerprints(b) {
  1062.     b.deviceprint.value = encode_deviceprint()
  1063. }
  1064.  
  1065. function add_deviceprint() {
  1066.     BrowserDetect.init();
  1067.     var d;
  1068.     switch (BrowserDetect.browser) {
  1069.     case "Explorer":
  1070.         d = new IE_FingerPrint();
  1071.         break;
  1072.     case "Firefox":
  1073.         d = new Mozilla_FingerPrint();
  1074.         break;
  1075.     case "Opera":
  1076.         d = new Opera_FingerPrint();
  1077.         break;
  1078.     default:
  1079.         d = new FingerPrint()
  1080.     }
  1081.     var c = "version=" + d.deviceprint_version() + "&pm_fpua=" + d.deviceprint_browser() + "&pm_fpsc=" + d.deviceprint_display() + "&pm_fpsw=" + d.deviceprint_software() + "&pm_fptz=" + d.deviceprint_timezone() + "&pm_fpln=" + d.deviceprint_language() + "&pm_fpjv=" + d.deviceprint_java() + "&pm_fpco=" + d.deviceprint_cookie();
  1082.     c = c + "&pm_fpasw=" + d.deviceprint_all_software();
  1083.     c = c + "&pm_fpan=" + d.deviceprint_appName() + "&pm_fpacn=" + d.deviceprint_appCodeName() + "&pm_fpol=" + d.deviceprint_online() + "&pm_fposp=" + d.deviceprint_opsProfile() + "&pm_fpup=" + d.deviceprint_userProfile() + "&pm_fpsaw=" + d.deviceprint_screen_availWidth() + "&pm_fpspd=" + d.deviceprint_screen_pixelDepth() + "&pm_fpsbd=" + d.deviceprint_screen_bufferDepth() + "&pm_fpsdx=" + d.deviceprint_screen_deviceXDPI() + "&pm_fpsdy=" + d.deviceprint_screen_deviceYDPI() + "&pm_fpslx=" + d.deviceprint_screen_logicalXDPI() + "&pm_fpsly=" + d.deviceprint_screen_logicalYDPI() + "&pm_fpsfse=" + d.deviceprint_screen_fontSmoothingEnabled() + "&pm_fpsui=" + d.deviceprint_screen_updateInterval();
  1084.     c = c + "&pm_os=" + BrowserDetect.OS + "&pm_brmjv=" + parseInt(BrowserDetect.version, 10) + "&pm_br=" + BrowserDetect.browser;
  1085.     c = c + "&pm_inpt=" + d.deviceprint_ping_in() + "&pm_expt=" + d.deviceprint_ping_ex();
  1086.     return c
  1087. }
  1088.  
  1089. function form_add_data(d, e, f) {
  1090.     if (d && d.length > 0) {
  1091.         d += "&"
  1092.     } else {
  1093.         d = ""
  1094.     }
  1095.     d += e + "=" + escape(f.toString());
  1096.     return d
  1097. }
  1098.  
  1099. function form_add_deviceprint(d, e, f) {
  1100.     d = form_add_data(d, e + "d", f);
  1101.     return d
  1102. }
  1103. var HTML5 = "HTML5";
  1104. var BLACKBERRY = "blackberry";
  1105. var UNDEFINED = "undefined";
  1106. var GEO_LOCATION_DEFAULT_STRUCT = '{"GeoLocationInfo":[{"Status":4}]}';
  1107. var geoLocator = null;
  1108. var geoLocatorStatus = false;
  1109.  
  1110. function detectDeviceCollectionAPIMode() {
  1111.     if (typeof (navigator.geolocation) != UNDEFINED) {
  1112.         return HTML5
  1113.     } else {
  1114.         if (typeof (window.blackberry) != UNDEFINED && blackberry.location.GPSSupported) {
  1115.             return BLACKBERRY
  1116.         } else {
  1117.             return UNDEFINED
  1118.         }
  1119.     }
  1120. }
  1121.  
  1122. function init(j, k, h, g, l) {
  1123.     var m = detectDeviceCollectionAPIMode();
  1124.     if (m == HTML5) {
  1125.         geoLocator = new HTML5LocationCollector();
  1126.         geoLocator.init(j, k, h, g);
  1127.         return true
  1128.     } else {
  1129.         if (m == BLACKBERRY) {
  1130.             geoLocator = new BlackberryLocationCollector();
  1131.             geoLocator.init(l, k, h, g);
  1132.             return true
  1133.         }
  1134.     }
  1135.     return false
  1136. }
  1137.  
  1138. function startCollection(h, j, g, f, k) {
  1139.     geoLocatorStatus = init(h, j, g, f, k);
  1140.     if (geoLocatorStatus) {
  1141.         return geoLocator.startLocationWatch()
  1142.     } else {
  1143.         return false
  1144.     }
  1145. }
  1146.  
  1147. function stopCollection() {
  1148.     if (geoLocatorStatus) {
  1149.         geoLocator.stopWatch()
  1150.     }
  1151. }
  1152.  
  1153. function getGeolocationStruct() {
  1154.     if (geoLocatorStatus) {
  1155.         return geoLocator.generateGeolocationJSONStruct()
  1156.     } else {
  1157.         return GEO_LOCATION_DEFAULT_STRUCT
  1158.     }
  1159. }
  1160.  
  1161. function HTML5LocationCollector() {
  1162.     var k = this;
  1163.     var m = -1;
  1164.     this.getGeolocationWatchId = function () {
  1165.         return m
  1166.     };
  1167.     var l = null;
  1168.     this.getGeolocationLastPosition = function () {
  1169.         return l
  1170.     };
  1171.     var g = 4;
  1172.     this.getGeolocationStatusCode = function () {
  1173.         return g
  1174.     };
  1175.     var j = "";
  1176.     this.getGeolocationErrorMessage = function () {
  1177.         return j
  1178.     };
  1179.     var h = {
  1180.         accuracy: 100,
  1181.         timeout: 180,
  1182.         relevancy: 120,
  1183.         expiration: 48
  1184.     };
  1185.     this.getGeolocationConfig = function () {
  1186.         return h
  1187.     };
  1188.     this.startLocationWatch = function () {
  1189.         var a = {
  1190.             enableHighAccuracy: true,
  1191.             timeout: (h.timeout * 1000),
  1192.             maximumAge: h.expiration
  1193.         };
  1194.         if (navigator.geolocation) {
  1195.             m = navigator.geolocation.watchPosition(this.handlePosition, this.handleError, a);
  1196.             return true
  1197.         } else {
  1198.             g = 4
  1199.         }
  1200.         return false
  1201.     };
  1202.     this.init = function (a, b, d, c) {
  1203.         if (a !== null && a >= 0 && a <= 200) {
  1204.             h.accuracy = a
  1205.         }
  1206.         if (b !== null && b >= 90 && b <= 300) {
  1207.             h.timeout = b
  1208.         }
  1209.         if (d !== null && d >= 60 && d <= 240) {
  1210.             h.relevancy = d
  1211.         }
  1212.         if (c !== null && c >= 24 && c <= 60) {
  1213.             h.expiration = c
  1214.         }
  1215.     };
  1216.     this.handlePosition = function (d) {
  1217.         var c = new Date().getTime();
  1218.         var b = getTimestampInMillis(d.timestamp);
  1219.         if ((c - b) <= (h.expiration * 60 * 60 * 1000)) {
  1220.             if (l === null || d.timestamp > l.timestamp || d.coords.accuracy < l.coords.accuracy) {
  1221.                 l = d;
  1222.                 g = 0
  1223.             }
  1224.         }
  1225.         if (l !== null) {
  1226.             var a = c - l.timestamp;
  1227.             if (a <= (h.relevancy * 1000) && l.coords.accuracy <= h.accuracy) {
  1228.                 k.stopWatch()
  1229.             }
  1230.         }
  1231.     };
  1232.     this.generateGeolocationJSONStruct = function () {
  1233.         var b = null;
  1234.         if (l !== null) {
  1235.             var a = convertTimestampToGMT(l.timestamp);
  1236.             b = {
  1237.                 GeoLocationInfo: [{
  1238.                     Status: g,
  1239.                     Longitude: l.coords.longitude,
  1240.                     Latitude: l.coords.latitude,
  1241.                     Altitude: Math.round(l.coords.altitude),
  1242.                     HorizontalAccuracy: Math.round(l.coords.accuracy),
  1243.                     AltitudeAccuracy: Math.round(l.coords.altitudeAccuracy),
  1244.                     Heading: Math.round(l.coords.heading),
  1245.                     Speed: Math.round(l.coords.speed),
  1246.                     Timestamp: a
  1247.                 }]
  1248.             }
  1249.         } else {
  1250.             b = {
  1251.                 GeoLocationInfo: [{
  1252.                     Status: g
  1253.                 }]
  1254.             }
  1255.         }
  1256.         return JSON.stringify(b)
  1257.     };
  1258.     this.handleError = function (a) {
  1259.         switch (a.code) {
  1260.         case a.TIMEOUT:
  1261.             k.stopWatch();
  1262.             g = 3;
  1263.             break;
  1264.         case a.POSITION_UNAVAILABLE:
  1265.             g = 2;
  1266.             j = a.message;
  1267.             break;
  1268.         case a.PERMISSION_DENIED:
  1269.             g = 1;
  1270.             break;
  1271.         case a.UNKNOWN_ERROR:
  1272.             g = 2;
  1273.             j = a.message;
  1274.             break
  1275.         }
  1276.     };
  1277.     this.stopWatch = function () {
  1278.         navigator.geolocation.clearWatch(m);
  1279.         m = -2
  1280.     }
  1281. }
  1282. var UIEventCollector = (function () {
  1283.     var K = null;
  1284.     var N = null;
  1285.     var Y = null;
  1286.     var M = null;
  1287.     var F = ["output_size_limit"];
  1288.     O();
  1289.     R();
  1290.  
  1291.     function O(b) {
  1292.         M = {
  1293.             output_size_limit: 1024,
  1294.             collection_mode: "partial"
  1295.         };
  1296.         if (b) {
  1297.             for (p in b) {
  1298.                 if (!(p._config === undefined)) {
  1299.                     var a = false;
  1300.                     for (var c = F.length - 1; c >= 0; c--) {
  1301.                         if (F[c] == p) {
  1302.                             found = true;
  1303.                             continue
  1304.                         }
  1305.                     }
  1306.                     if (!a) {
  1307.                         M[p] = b[p]
  1308.                     }
  1309.                 }
  1310.             }
  1311.         }
  1312.         Y = false;
  1313.         N = X();
  1314.         K = {
  1315.             elements: new UIElementList(),
  1316.             events: [],
  1317.             collection_status: 0,
  1318.             toString: function () {
  1319.                 return "RecordedData: {elements: " + this.elements + ", events: " + this.events + "}"
  1320.             }
  1321.         };
  1322.         R()
  1323.     }
  1324.  
  1325.     function J() {
  1326.         var c = V();
  1327.         for (var a = 0, b = c.length; a < b; a++) {
  1328.             T(c[a])
  1329.         }
  1330.     }
  1331.  
  1332.     function V() {
  1333.         var a = [];
  1334.         var e = document.getElementsByTagName("input");
  1335.         for (var b = 0, c = e.length; b < c; b++) {
  1336.             var d = e[b];
  1337.             if (G(d)) {
  1338.                 a.push(d)
  1339.             }
  1340.         }
  1341.         return a
  1342.     }
  1343.  
  1344.     function G(b) {
  1345.         if (b.tagName && b.tagName.toLowerCase() == "input") {
  1346.             var a = b.getAttribute("type");
  1347.             if (a == "text" || a == "checkbox" || a == "checkbox") {
  1348.                 return true
  1349.             }
  1350.         }
  1351.         return false
  1352.     }
  1353.  
  1354.     function X() {
  1355.         var a = (document.createEvent) ? document.createEvent("Event") : document.createEventObject();
  1356.         var b = a.timeStamp || new Date();
  1357.         b = new Date(b);
  1358.         if (b.getYear() > 2100) {
  1359.             b = new Date(b / 1000)
  1360.         }
  1361.         b = b.getTime();
  1362.         return b
  1363.     }
  1364.  
  1365.     function T(a) {
  1366.         var b = null;
  1367.         var c = K.elements;
  1368.         var d = c.size();
  1369.         var e = Z(a);
  1370.         if (!K.elements.containsKey(e)) {
  1371.             b = new InteractionElement();
  1372.             b.id(e);
  1373.             b.type(D(a));
  1374.             b.length(a.value ? a.value.length : 0);
  1375.             c.put(b)
  1376.         } else {
  1377.             b = c.get(e)
  1378.         }
  1379.         return b
  1380.     }
  1381.  
  1382.     function P(d) {
  1383.         var f = d || window.event;
  1384.         var a = W(f);
  1385.         if (G(a)) {
  1386.             var b = T(a);
  1387.             b.incrementEventCount();
  1388.             var c = new UIEvent();
  1389.             c.index(b.index());
  1390.             c.type(aa(f));
  1391.             var e = I(f);
  1392.             c.offset(e - N);
  1393.             K.events.push(c)
  1394.         }
  1395.         return true
  1396.     }
  1397.  
  1398.     function E(a) {
  1399.         var b = a || window.event;
  1400.         if (H(b)) {
  1401.             var c = {
  1402.                 target: W(b),
  1403.                 type: "paste"
  1404.             };
  1405.             return P(c)
  1406.         } else {
  1407.             return P(b)
  1408.         }
  1409.     }
  1410.  
  1411.     function H(b) {
  1412.         if (b.type == "keydown") {
  1413.             var a = b.which || b.charCode || b.keyCode;
  1414.             var c = (typeof KeyboardEvent != "undefined" && a == KeyboardEvent.DOM_VK_V) || a == 118 || a == 86;
  1415.             if (c && (b.ctrlKey || b.metaKey)) {
  1416.                 return true
  1417.             }
  1418.         }
  1419.         return false
  1420.     }
  1421.  
  1422.     function W(a) {
  1423.         return a.target ? a.target : a.srcElement
  1424.     }
  1425.  
  1426.     function I(b) {
  1427.         var a;
  1428.         if (b.timeStamp && b.timeStamp !== 0) {
  1429.             a = b.timeStamp;
  1430.             if (new Date(a).getYear() > 2100) {
  1431.                 a = a / 1000
  1432.             }
  1433.         } else {
  1434.             a = new Date().getTime()
  1435.         }
  1436.         return a
  1437.     }
  1438.  
  1439.     function L(a) {}
  1440.  
  1441.     function Q() {
  1442.         J();
  1443.         var b = K.elements;
  1444.         for (var e = b.size(); e >= 1; e--) {
  1445.             var c = b.getByIndex(e);
  1446.             var d = c.id();
  1447.             var a = document.getElementById(d);
  1448.             if (!a) {
  1449.                 var f = document.getElementsByName(d);
  1450.                 if (f.length > 0) {
  1451.                     a = f[0]
  1452.                 }
  1453.             }
  1454.             if (a && a.value) {
  1455.                 c.length(a.value.length)
  1456.             }
  1457.         }
  1458.     }
  1459.  
  1460.     function S(d) {
  1461.         var f = d || window.event;
  1462.         var a = d.target;
  1463.         if (a.nodeType == 1) {
  1464.             var c = a.getElementsByTagName("form");
  1465.             for (var e = c.length - 1; e >= 0; e--) {
  1466.                 var b = c[e];
  1467.                 b.onsubmit = recordFormSubmitEvent
  1468.             }
  1469.         }
  1470.     }
  1471.  
  1472.     function R() {
  1473.         var a = P;
  1474.         var b = document;
  1475.         if (b.addEventListener) {
  1476.             b.addEventListener("keydown", E, false);
  1477.             b.addEventListener("paste", a, false);
  1478.             b.addEventListener("focus", a, true);
  1479.             b.addEventListener("blur", a, true)
  1480.         } else {
  1481.             if (b.attachEvent) {
  1482.                 b.onkeydown = E;
  1483.                 b.onfocusin = a;
  1484.                 b.onfocusout = a
  1485.             }
  1486.         }
  1487.     }
  1488.  
  1489.     function U() {
  1490.         return private_config
  1491.     }
  1492.  
  1493.     function aa(a) {
  1494.         if (a.type == "keydown") {
  1495.             return UIEvent.KeyDown
  1496.         } else {
  1497.             if (a.type == "submit") {
  1498.                 return UIEvent.Submit
  1499.             } else {
  1500.                 if (a.type == "paste") {
  1501.                     return UIEvent.Paste
  1502.                 } else {
  1503.                     if (a.type == "focus" || a.type == "focusin") {
  1504.                         return UIEvent.Focus
  1505.                     } else {
  1506.                         if (a.type == "blur" || a.type == "focusout") {
  1507.                             return UIEvent.Blur
  1508.                         } else {
  1509.                             return UIEvent.Unknown
  1510.                         }
  1511.                     }
  1512.                 }
  1513.             }
  1514.         }
  1515.     }
  1516.  
  1517.     function C(a) {
  1518.         if (a == UIEvent.KeyDown) {
  1519.             return "keydown"
  1520.         } else {
  1521.             if (a == UIEvent.Submit) {
  1522.                 return "submit"
  1523.             } else {
  1524.                 if (a == UIEvent.Focus) {
  1525.                     return "focus"
  1526.                 } else {
  1527.                     if (a == UIEvent.Blur) {
  1528.                         return "blur"
  1529.                     } else {
  1530.                         if (a == UIEvent.Paste) {
  1531.                             return "paste"
  1532.                         } else {
  1533.                             return "unknown"
  1534.                         }
  1535.                     }
  1536.                 }
  1537.             }
  1538.         }
  1539.     }
  1540.  
  1541.     function D(a) {
  1542.         return a.nodeName + (a.type ? (":" + a.type) : "")
  1543.     }
  1544.  
  1545.     function Z(a) {
  1546.         return a.id ? a.id : (a.name ? a.name : a.nodeName)
  1547.     }
  1548.     return {
  1549.         addElement: function (a) {
  1550.             return T(a)
  1551.         },
  1552.         getEventType: function (a) {
  1553.             return aa(a)
  1554.         },
  1555.         getEventCode: function (a) {
  1556.             return C(a)
  1557.         },
  1558.         getRecordedData: function () {
  1559.             return K
  1560.         },
  1561.         getElementType: function (a) {
  1562.             return D(a)
  1563.         },
  1564.         getElementId: function (a) {
  1565.             return Z(a)
  1566.         },
  1567.         initEventCollection: function (a) {
  1568.             O(a)
  1569.         },
  1570.         getConfig: function () {
  1571.             return M
  1572.         },
  1573.         serialize: function () {
  1574.             Q();
  1575.             var c = this.getRecordedData();
  1576.             var m = c.elements;
  1577.             var B = [];
  1578.             for (var e = 0; e < m.length; e++) {
  1579.                 B[e] = false
  1580.             }
  1581.             var A = c.events;
  1582.             var q = c.collection_status;
  1583.             var ac = this.getConfig().collection_mode == "partial";
  1584.             var f = this.getConfig().output_size_limit;
  1585.             var v = A.length;
  1586.             var o = "@";
  1587.             var ad = ";";
  1588.             var a = ",";
  1589.             var g = 2 * o.length;
  1590.             var d = ("" + N) + a + ("" + q);
  1591.             var r = 1;
  1592.             g += r;
  1593.             g += a.length;
  1594.             g += d.length;
  1595.             var u = "";
  1596.             L("serializing elements ");
  1597.             for (var n = m.size(); n > 0; n--) {
  1598.                 var b = m.getByIndex(n);
  1599.                 var j = b.serialize() + ad;
  1600.                 L("elementsStr.length: " + u.length);
  1601.                 if (ac && ((g + u.length + j.length) > f)) {
  1602.                     Y = true;
  1603.                     break
  1604.                 }
  1605.                 var s = b.type().match("INPUT:checkbox");
  1606.                 if (s == null) {
  1607.                     if (b.length() > 0 && b.eventCount() == 0) {
  1608.                         L("collecting element without input: " + b);
  1609.                         u = j + u
  1610.                     }
  1611.                 }
  1612.             }
  1613.             g += u.length;
  1614.             var y = "";
  1615.             L("serializing events ");
  1616.             while (v--) {
  1617.                 var k = A[v];
  1618.                 var l = k.index();
  1619.                 var w = k.serialize() + ad;
  1620.                 var j = m.getByIndex(l).serialize() + ad;
  1621.                 var z = w.length;
  1622.                 if (!B[l]) {
  1623.                     z += j.length
  1624.                 }
  1625.                 L("eventsStr.length: " + y.length);
  1626.                 if (ac && ((g + y.length + z) > f)) {
  1627.                     Y = true;
  1628.                     break
  1629.                 }
  1630.                 L("collecting event: " + k);
  1631.                 if (!B[l]) {
  1632.                     u = j + u;
  1633.                     g += j.length;
  1634.                     L("also adding element event: " + j)
  1635.                 }
  1636.                 B[l] = true;
  1637.                 y = w + y
  1638.             }
  1639.             if (u.length > 0) {
  1640.                 u = u.substring(0, u.length - 1)
  1641.             }
  1642.             if (y.length > 0) {
  1643.                 y = y.substring(0, y.length - 1)
  1644.             }
  1645.             var h = Y ? 1 : 0;
  1646.             var x = u + o + y + o + h + a + d;
  1647.             return x
  1648.         }
  1649.     }
  1650. })();
  1651.  
  1652. function UIEvent() {
  1653.     var b = (this === window) ? {} : this;
  1654.     b.index = function (a) {
  1655.         if (arguments.length === 0) {
  1656.             return b._index
  1657.         } else {
  1658.             b._index = arguments[0]
  1659.         }
  1660.     };
  1661.     b.offset = function (a) {
  1662.         if (arguments.length === 0) {
  1663.             return b._offset
  1664.         } else {
  1665.             b._offset = arguments[0]
  1666.         }
  1667.     };
  1668.     b.type = function (a) {
  1669.         if (arguments.length === 0) {
  1670.             return b._type
  1671.         } else {
  1672.             b._type = arguments[0]
  1673.         }
  1674.     };
  1675.     b.serialize = function () {
  1676.         var a = ",";
  1677.         var d = "0";
  1678.         return b.index() + a + b.type() + a + d
  1679.     };
  1680.     b.toString = function () {
  1681.         return "UIEvent: [index: " + b.index() + ", type: " + b.type() + ", offset: " + b.offset() + "]"
  1682.     }
  1683. }
  1684. UIEvent.Unknown = 0;
  1685. UIEvent.KeyDown = 1;
  1686. UIEvent.Submit = 2;
  1687. UIEvent.Focus = 3;
  1688. UIEvent.Blur = 4;
  1689. UIEvent.Paste = 5;
  1690.  
  1691. function InteractionElement() {
  1692.     var b = (this === window) ? {} : this;
  1693.     b._eventCount = 0;
  1694.     b.id = function (a) {
  1695.         if (arguments.length === 0) {
  1696.             return b._id
  1697.         } else {
  1698.             b._id = arguments[0]
  1699.         }
  1700.     };
  1701.     b.index = function (a) {
  1702.         if (arguments.length === 0) {
  1703.             return b._index
  1704.         } else {
  1705.             b._index = arguments[0]
  1706.         }
  1707.     };
  1708.     b.length = function (a) {
  1709.         if (arguments.length === 0) {
  1710.             return b._length
  1711.         } else {
  1712.             b._length = arguments[0]
  1713.         }
  1714.     };
  1715.     b.type = function (a) {
  1716.         if (arguments.length === 0) {
  1717.             return b._type
  1718.         } else {
  1719.             b._type = arguments[0]
  1720.         }
  1721.     };
  1722.     b.incrementEventCount = function () {
  1723.         b._eventCount++
  1724.     };
  1725.     b.eventCount = function () {
  1726.         return b._eventCount
  1727.     };
  1728.     b.serialize = function () {
  1729.         var a = ",";
  1730.         var d = b.index();
  1731.         return b.index() + a + d + a + b.type() + a + b.length()
  1732.     };
  1733.     b.toString = function () {
  1734.         return "InteractionElement: [id: " + b.id() + ", index: " + b.index() + ", length: " + b.length() + ", type: " + b.type() + "]"
  1735.     }
  1736. }
  1737.  
  1738. function UIElementList() {
  1739.     var e = (this === window) ? {} : this;
  1740.     var d = new Hashtable();
  1741.     var f = new Hashtable();
  1742.     e.get = function (a) {
  1743.         return d.get(a)
  1744.     };
  1745.     e.getByIndex = function (a) {
  1746.         return f.get(a)
  1747.     };
  1748.     e.containsKey = function (a) {
  1749.         return d.containsKey(a)
  1750.     };
  1751.     e.indexByKey = function (a) {
  1752.         return get(a).index()
  1753.     };
  1754.     e.size = function () {
  1755.         return d.size()
  1756.     };
  1757.     e.put = function (a) {
  1758.         var b = a.id();
  1759.         if (!d.containsKey(b)) {
  1760.             d.put(b, a);
  1761.             var c = d.size();
  1762.             a.index(c);
  1763.             f.put(c, a)
  1764.         }
  1765.     };
  1766.     e.toString = function () {
  1767.         return "[size: " + d.size() + ", names: [" + d + "], indexes: [" + f + "]]"
  1768.     }
  1769. }
  1770.  
  1771. function activeXDetect(e) {
  1772.     var f = null;
  1773.     try {
  1774.         f = document.body.getComponentVersion("{" + e + "}", "ComponentID")
  1775.     } catch (d) {}
  1776.     return (f !== null) ? f : false
  1777. }
  1778.  
  1779. function stripIllegalChars(h) {
  1780.     t = "";
  1781.     h = h.toLowerCase();
  1782.     var g = h.length;
  1783.     for (var f = 0; f < g; f++) {
  1784.         var e = h.charAt(f);
  1785.         if (e != "\n" && e != "/" && e != "\\") {
  1786.             t += e
  1787.         } else {
  1788.             if (e == "\n") {
  1789.                 t += "n"
  1790.             }
  1791.         }
  1792.     }
  1793.     return t
  1794. }
  1795.  
  1796. function stripFullPath(k, n, m) {
  1797.     var q = n;
  1798.     var o = m;
  1799.     var l = k;
  1800.     var j = l.lastIndexOf(q);
  1801.     if (j >= 0) {
  1802.         filenameLen = l.length;
  1803.         l = l.substring(j + q.length, filenameLen)
  1804.     }
  1805.     var r = l.indexOf(o);
  1806.     if (r >= 0) {
  1807.         l = l.slice(0, r)
  1808.     }
  1809.     return l
  1810. }
  1811. var BrowserDetect = {
  1812.     init: function () {
  1813.         this.browser = this.searchString(this.dataBrowser) || "an unknown browser";
  1814.         this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
  1815.         this.OS = this.searchString(this.dataOS) || "an unknown OS"
  1816.     },
  1817.     searchString: function (l) {
  1818.         var k = l.length;
  1819.         for (var o = 0; o < k; o++) {
  1820.             var h = l[o];
  1821.             var n = h.string;
  1822.             var m = h.prop;
  1823.             var j = h.identity;
  1824.             this.versionSearchString = h.versionSearch || j;
  1825.             if (n) {
  1826.                 if (n.toLowerCase().indexOf(h.subString.toLowerCase()) !== -1) {
  1827.                     return j
  1828.                 }
  1829.             } else {
  1830.                 if (m) {
  1831.                     return j
  1832.                 }
  1833.             }
  1834.         }
  1835.     },
  1836.     searchVersion: function (d) {
  1837.         var e = d.toLowerCase().indexOf(this.versionSearchString.toLowerCase());
  1838.         if (e === -1) {
  1839.             return
  1840.         }
  1841.         var f = d.substring(e + this.versionSearchString.length);
  1842.         if (f.indexOf(" ") === 0 || f.indexOf("/") === 0) {
  1843.             f = f.substring(1)
  1844.         }
  1845.         return parseFloat(f)
  1846.     },
  1847.     dataBrowser: [{
  1848.         string: navigator.userAgent,
  1849.         subString: "Chrome",
  1850.         identity: "Chrome"
  1851.     }, {
  1852.         string: navigator.userAgent,
  1853.         subString: "OmniWeb",
  1854.         versionSearch: "OmniWeb/",
  1855.         identity: "OmniWeb"
  1856.     }, {
  1857.         string: navigator.userAgent.toLowerCase(),
  1858.         subString: "opera",
  1859.         identity: "Opera",
  1860.         versionSearch: "version"
  1861.     }, {
  1862.         string: navigator.vendor,
  1863.         subString: "Apple",
  1864.         identity: "Safari",
  1865.         versionSearch: "Version"
  1866.     }, {
  1867.         string: navigator.userAgent,
  1868.         subString: "mobile safari",
  1869.         identity: "Mobile Safari",
  1870.         versionSearch: "mobile safari"
  1871.     }, {
  1872.         string: navigator.vendor,
  1873.         subString: "iCab",
  1874.         identity: "iCab"
  1875.     }, {
  1876.         string: navigator.vendor,
  1877.         subString: "KDE",
  1878.         identity: "Konqueror"
  1879.     }, {
  1880.         string: navigator.userAgent,
  1881.         subString: "Firefox",
  1882.         identity: "Firefox"
  1883.     }, {
  1884.         string: navigator.vendor,
  1885.         subString: "Camino",
  1886.         identity: "Camino"
  1887.     }, {
  1888.         string: navigator.userAgent.toLocaleLowerCase(),
  1889.         subString: "blackberry",
  1890.         identity: "BlackBerry",
  1891.         versionSearch: "0/"
  1892.     }, {
  1893.         string: navigator.userAgent,
  1894.         subString: "Netscape",
  1895.         identity: "Netscape"
  1896.     }, {
  1897.         string: navigator.userAgent,
  1898.         subString: "MSIE",
  1899.         identity: "Explorer",
  1900.         versionSearch: "MSIE"
  1901.     }, {
  1902.         string: navigator.userAgent,
  1903.         subString: "Gecko",
  1904.         identity: "Mozilla",
  1905.         versionSearch: "rv"
  1906.     }, {
  1907.         string: navigator.userAgent,
  1908.         subString: "Mozilla",
  1909.         identity: "Netscape",
  1910.         versionSearch: "Mozilla"
  1911.     }],
  1912.     dataOS: [{
  1913.         string: navigator.userAgent,
  1914.         subString: "BlackBerry",
  1915.         identity: "BlackBerry"
  1916.     }, {
  1917.         string: navigator.userAgent.toLowerCase(),
  1918.         subString: "android",
  1919.         identity: "Android"
  1920.     }, {
  1921.         string: navigator.userAgent,
  1922.         subString: "Symbian",
  1923.         identity: "Symbian"
  1924.     }, {
  1925.         string: navigator.platform,
  1926.         subString: "Mac",
  1927.         identity: "Mac"
  1928.     }, {
  1929.         string: navigator.userAgent,
  1930.         subString: "iPhone",
  1931.         identity: "iPhone/iPod"
  1932.     }, {
  1933.         string: navigator.platform,
  1934.         subString: "Linux",
  1935.         identity: "Linux"
  1936.     }, {
  1937.         string: navigator.userAgent,
  1938.         subString: "Windows CE",
  1939.         identity: "Windows CE"
  1940.     }, {
  1941.         string: navigator.platform,
  1942.         subString: "Win",
  1943.         identity: "Windows"
  1944.     }]
  1945. };
  1946.  
  1947. function convertTimestampToGMT(c) {
  1948.     var d = c;
  1949.     if (!(c instanceof Date)) {
  1950.         d = new Date(c)
  1951.     }
  1952.     offsetFromGmt = d.getTimezoneOffset() * 60000;
  1953.     return d.getTime() + offsetFromGmt
  1954. }
  1955.  
  1956. function getTimestampInMillis(c) {
  1957.     var d = c;
  1958.     if (c instanceof Date) {
  1959.         d = c.getTime()
  1960.     }
  1961.     return d
  1962. }
  1963.  
  1964. function debug(b) {};
Advertisement
Add Comment
Please, Sign In to add comment