if (typeof(V_COUNTER) == 'undefined') { var V_COUNTER = {}; }
V_COUNTER = {
ec: 0,
ce: null,
rpc: function(s,p) {
var h = document.getElementsByTagName('head').item(0);
var j = document.createElement('script');
j.setAttribute('language', 'javascript');
j.setAttribute('type', 'text/javascript');
j.setAttribute('src',s+'?'+p);
h.appendChild(j);
return false;
},
rp: function() {
var n = document.getElementById('counter_phone');
if (n !== null) {
n.setAttribute('style','display: block; padding: 10px; position: fixed; left: 0; bottom: 0; z-index:10000;');
var s = n.getAttribute('data-phone');
var c = n.getAttribute('data-color');
var t = s.replace(/[^\d+]/g, "");
var h = 'tel:' + t;
n.innerHTML = '\
\
';
}
},
tL: 0,
psT: 0,
gdh: function() {
return Math.max(
document.body.scrollHeight || 0,
document.documentElement.scrollHeight || 0,
document.body.offsetHeight || 0,
document.documentElement.offsetHeight || 0,
document.body.clientHeight || 0,
document.documentElement.clientHeight || 0
);
},
as: function() {
var wh = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;
var sT= window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop || 0;
this.psT = Math.max(Math.floor( (wh + sT) / this.gdh() * 100),this.psT);
},
frmx: function (z) {
var p = window.location.pathname;
var u = window.location.protocol+'//'+window.location.hostname+'/usecurezp.js'
+'?page='+escape(p)
+'&name='+escape(z)
+'&type='+escape('frmx')
+'&k='+this.k;
var x = new XMLHttpRequest();
x.open("GET", u, true);
x.send();
},
evs: function(e) {
if (e.target) {
var n = e.target.getAttribute('data-event-name');
if (n === null) {
n = '';
}
var t = e.type;
var p = window.location.pathname;
var u = window.location.protocol+'//'+window.location.hostname+'/usecurezp.js'
+'?page='+escape(p)
+'&name='+escape(n)
+'&type='+escape(t)
+'&k='+this.k;
navigator.sendBeacon(u);
}
},
evp: function(e,v) {
if (e.target) {
var t='';
var l='';
if (e.target.text) { t = e.target.text; }
if (e.target.href) { l = e.target.href; }
var p = window.location.pathname;
var u = window.location.protocol+'//'+window.location.hostname+'/usecurezp.js'
+'?page='+escape(p)
+'&name='+escape(t)
+'&type='+escape(v)
+'&s='+escape(l)
+'&k='+this.k;
navigator.sendBeacon(u);
}
},
ex: function(e) {
if (e.currentTarget) {
var l = e.currentTarget.getAttribute('href');
if (!l) { } else {
var p = window.location.pathname;
var x = document.createElement('a');
x.href = l;
if ('' == x.hostname || window.location.hostname == x.hostname) { } else {
var u = window.location.protocol+'//'+window.location.hostname+'/usecurezp.js'
+'?page='+escape(p)
+'&name='+escape(l)
+'&type='+escape('exit')
+'&k='+this.k;
navigator.sendBeacon(u);
}
}
}
},
evl: function () {
("blur load focus change select submit keyup click auxclick mouseover touchend cut copy paste ended pause playing seeked volumechange".split(" ")).forEach(
function(e) {
var x = document.querySelectorAll('[data-event-type="'+e+'"]');
let index = 0;
for( index=0; index < x.length; index++ ) {
x[index].addEventListener(e,function(e) { return V_COUNTER.evs(e) },true);
}
});
var l=document.querySelectorAll('a');
let index=0;
for (index=0; index < l.length; index++) {
l[index].addEventListener('click',function(e) { return V_COUNTER.ex(e) },true);
}
var x = document.forms;
var i = 0;
for (i=0; i< x.length; i++) {
var z = x[i].getAttribute('action');
if (!z) { } else {
var p = document.createElement('a');
p.href = z;
if ('formixapp.com' == p.hostname) {
var z = p.pathname.replace(/(forms|\/|\.js)/g,'');
// console.log(z);
x[i].addEventListener("submit", function(e) { return V_COUNTER.frmx(z) }, true);
}
}
}
var x = document.querySelectorAll('.btn');
for( index=0; index < x.length; index++ ) {
x[index].addEventListener('click',function(e) { return V_COUNTER.evp(e,'btn') },true);
}
var x = document.querySelectorAll('main a');
for( index=0; index < x.length; index++ ) {
x[index].addEventListener('click',function(e) { return V_COUNTER.evp(e,'main a') },true);
}
var x = document.querySelectorAll('nav a');
for( index=0; index < x.length; index++ ) {
x[index].addEventListener('click',function(e) { return V_COUNTER.evp(e,'nav a') },true);
}
},
sc: function(t) {
var p = escape(window.location.pathname);
var u = window.location.protocol+'//'+window.location.hostname+'/usecurezm.js'
+'?me_event_type=1'
+'&me_page='+p
+'&me_phone_number='+t
+'&k='+this.k;
navigator.sendBeacon(u);
},
su: function() {
var e = new Date();
e = Math.round((e-window.performance.timing.domContentLoadedEventEnd)/1000);
navigator.sendBeacon(this.cu+'?ht='+this.hit+'&ts='+e+'&vs='+this.psT);
},
IE: document.all?true:false,
sw: screen.width,
sh: screen.height,
r: document.referrer,
pl: navigator.platform,
je: navigator.javaEnabled(),
pn: document.location,
d: document.domain,
k: 'R3C39158W39173',
rq: false,
tS: 0,
hit: null,
cu: window.location.protocol+'//'+window.location.hostname+'/usecurezc.js',
init: function() {
if (!this.rq) {
this.rq = true;
this.rp();
this.evl();
this.ce = 0;
if (this.hit == null) {
console.log('noc');
this.rpc(this.cu,'isnew=1&cookie_enabled='+this.ce+'&path_name='+escape(this.pn)+'&referer='+escape(this.r)+'&domain='+this.d+'&k='+this.k+'&sw='+this.sw+'&sh='+this.sh);
} else {
this.rpc(this.cu,'isnew=0&ht='+this.hit+'&path_name='+escape(this.pn)+'&referer='+escape(this.r)+'&domain='+this.d+'&k='+this.k+'&sw='+this.sw+'&sh='+this.sh);
}
}
window.addEventListener("load",function(){V_COUNTER.as();V_COUNTER.su()},false)
window.addEventListener("scroll",function(){clearTimeout(V_COUNTER.tS);throttlescroll = setTimeout(function(){V_COUNTER.as();}, 150)},false)
window.addEventListener("unload",function(e){ e.preventDefault(); e.returnValue = null; V_COUNTER.su(); return null; },false)
}
}
V_COUNTER.init();