var lhnTrack=lhnTrackingEnabled;
var blhnInstalled=0;
if (typeof lhnInstalled !='undefined'){lhnTrack='f';blhnInstalled=1;}
var lhnInstalled=1;
var InviteRepeats;
var zbrepeat=1;
var bInvited=0;
var bLHNAutoInvite=1;
var bLHNOnline=-1;
InviteRepeats=0;
var Zmutechime = lhnInviteChime;
var lhnScriptTag;
var lhnCustom1 = typeof (lhnCustom1) == 'undefined' ? '' : lhnCustom1;
var lhnCustom2 = typeof (lhnCustom2) == 'undefined' ? '' : lhnCustom2;
var lhnCustom3 = typeof (lhnCustom3) == 'undefined' ? '' : lhnCustom3;
if (blhnInstalled==0)
{
if (typeof zCustomInvitation =='undefined'){
var zCustomInvitation=lhnCustomInvitation;
}
if (zCustomInvitation=='' || !document.getElementById('Zsmenu')) {
var LHdef = '.lhnInviteContainer{z-index:10000000;width:278px;display:none;line-height:22px;position:fixed;top:150px;background-color:#ffffff;padding:15px;border-radius:8px;border:1px solid #666666;box-shadow:#cccccc 3px 3px 7px;font-size:16px;text-align:center;font-family:Tahoma,sans-serif;color:#555555;}.lhnInviteContainer .LHNInviteTitle{color:#333333;margin-bottom:5px;font-size:18px;width:100%;}.lhnInviteContainer .LHNInviteMessage{margin-bottom:8px;padding-bottom:12px;border-bottom:1px solid #666666;width:100%;}.lhnInviteContainer .LHNInviteMessage img{border-radius:10px;}.lhnInviteContainer .LHNInviteAcceptButton{font-size:18px;background-color:#666666;color:#ffffff;text-decoration:none;display:inline-block;padding:5px 20px 7px;}.lhnInviteContainer .LHNInviteCloseButton{background-color:#666666;color:#ffffff;position:absolute;top:-12px;right:-12px;height:24px;width:24px;font-size:20px;text-decoration:none;border-radius:12px;line-height:20px;}.LHNInviteButtons{width:100%;}';
if (document.body)
{
var LHss1 = document.createElement('style');
LHss1.setAttribute("type", "text/css");
if (LHss1.styleSheet) { // IE
LHss1.styleSheet.cssText = LHdef;
} else { // the world
var LHtt1 = document.createTextNode(LHdef);
LHss1.appendChild(LHtt1);
}
var lhndiv = document.createElement('div');
lhndiv.id = 'Zsmenu';
lhndiv.className = "lhnInviteContainer";
lhndiv.innerHTML="
Live Help
";
if (document.body.firstChild){document.body.insertBefore(lhndiv, document.body.firstChild);document.body.insertBefore(LHss1, document.body.firstChild);}else{document.body.appendChild(lhndiv);document.body.appendChild(LHss1);}
}
else
{
document.write('');
document.write('');
}
}
var LhnInvite = (function (parent) {parent.getTime = Date.now || function () { return +new Date; };parent.extend = function (dest) {var src;for (var i = 1, len = arguments.length; i < len; ++i) {src = arguments[i];for (var prop in src)dest[prop] = src[prop];}return dest;};parent.separate = function (list, iterator) {var selected = [];var rest = [];for (var i = 0, len = list.length; i < len; ++i) {if (iterator.call(this, list[i], i, list)){selected.push(list[i]);}else{rest.push(list[i]);}}return { selected: selected, rest: rest };};parent.Animation = function () {var tweens = []; var updateTween = function (tween, t) {var prop, i = tween.props.length, opts = tween.options;while (i--) {prop = tween.props[i];var v = opts.easing(t, prop.b, prop.c, opts.duration);if (opts.units)v += opts.units;tween.target[prop.name] = v;}};var tweenTo = function (target, options) {var defaults = {props: {}, initProps: null, duration: 1000, refreshRate: 20, units: null, easing: parent.Animation.Easing.linear, onStart: null, onComplete: null, onCancel: null};options = (typeof options == 'object') ?parent.extend({}, defaults, options) : defaults;clearTweensByTarget(target); if (options.initProps)LhnInvite.setProps(target, options.initProps);var propsToTween = [];for (var k in options.props) {var o = {};o.name = k;o.b = target[k];if (isNaN(o.b))o.b = parseFloat(o.b);o.c = options.props[k] - o.b;propsToTween.push(o);}if (propsToTween.length < 1 || options.duration <= 0 || options.refreshRate < 10) {return null;}var d = options.duration, tween = {};tween.target = target;tween.options = options;tween.props = propsToTween;var startTime = LhnInvite.getTime();tween.interval = setInterval(function () {var t = LhnInvite.getTime() - startTime;if (t > d)t = d;updateTween(tween, t); if (t >= d) {clearTween(tween);removeTween(tween);if (options.onComplete)options.onComplete(tween);}}, options.refreshRate);tweens.push(tween);if (options.onStart)options.onStart(tween);return tween;};var cancelTweens = function (target, bJumpToEnd, bRunComplete) {var sepTweens = getSeparatedTweens(target);var targetTweens = sepTweens.selected;var tween, i = targetTweens.length;while (i--) {tween = targetTweens[i];clearTween(tween);bJumpToEnd = bJumpToEnd || false;if (bJumpToEnd)updateTween(tween, tween.options.duration); if (tween.options.onCancel)tween.options.onCancel(tween);bRunComplete = bRunComplete || false;if (bRunComplete && tween.options.onComplete)tween.options.onComplete(tween);}tweens = sepTweens.rest;};var clearTweensByTarget = function (target) {var sepTweens = getSeparatedTweens(target);var targetTweens = sepTweens.selected;var i = targetTweens.length;while (i--)clearTween(targetTweens[i]);tweens = sepTweens.rest;};var clearTween = function (tween) {if (tween) {clearInterval(tween.interval);}};var removeTween = function (tween) {tweens = LhnInvite.separate(tweens, function (t) {return (t !== tween);});};var getSeparatedTweens = function (target) {return LhnInvite.separate(tweens, function (t) { return (t.target === target); });};return {tweenTo: tweenTo, cancelTweens: cancelTweens, Easing: { linear: function (t, b, c, d) { return c * t / d + b; }, outQuad: function (t, b, c, d) { return -c * (t /= d) * (t - 2) + b; }}};}();parent.tweenTo = parent.Animation.tweenTo;parent.cancelTweens = parent.Animation.cancelTweens;parent.setProps = function (target, props) {for (var k in props) {target[k] = props[k];}};return parent;}(LhnInvite || {}));
}
if (blhnInstalled==0)
{
XMLHTTP = function() {
var _maximumRequestLength = 1500
var _apiURL = lhnJsHost + 'www.livehelpnow.net/lhn/jsutil/getinvitationmessage.aspx?ip=3.81.57.77&lhnid=' + lhnAccountN;
this.status = null
this.statusText = null
this.responseText = null
this.responseXML = null
this.synchronous = false
this.readyState = 0
this.onreadystatechange = function() { }
this.onerror = function() { }
this.onload = function() { }
this.abort = function() {
_stop = true
_destroyScripts()
}
this.getAllResponseHeaders = function() {
// Returns all response headers as a string
var result = ''
for (property in _responseHeaders)
result += property + ': ' + _responseHeaders[property] + '\r\n'
return result
}
this.getResponseHeader = function(name) {
// Returns a response header value
// Note, that the search is case-insensitive
for(property in _requestHeaders) {
if(property.toLowerCase() == name.toLowerCase())
return _responseHeaders[property]
}
return null
}
this.overrideMimeType = function(type) {
_overrideMime = type
}
this.open = function(method, sync, userName, password) {
// Setting the internal values
if (!_checkParameters(method)) return
_method = (method) ? method : ''
_userName = (userName) ? userName : ''
_password = (password) ? password : ''
_setReadyState(1)
}
this.openRequest = function(method, sync, userName, password) {
// This method is inserted for compatibility purposes only
return this.open(method, sync, userName, password)
}
this.send = function(data) {
if (_stop) return
var src = _createQuery(data)
if (typeof (lhnScriptTag) != 'undefined' && lhnScriptTag.parentNode){ lhnScriptTag.outerHTML = ""; }
lhnScriptTag=_createScript(src)
// _setReadyState(2)
}
this.setRequestHeader = function(name, value) {
// Set the request header. If the defined header
// already exists (search is case-insensitive), rewrite it
if (_stop) return
for(property in _requestHeaders) {
if(property.toLowerCase() == name.toLowerCase()) {
_requestHeaders[property] = value; return
}
}
_requestHeaders[name] = value
}
var zsLoc=escape(document.location)+'';
var zzsLoc=zsLoc.replace(/#/g,'');
var _method = ''
var _url = ''
var _userName = ''
var _password = ''
var _requestHeaders = {
"HTTP-Referer": zzsLoc,
"Content-Type": "application/x-www-form-urlencoded"
}
var _responseHeaders = { }
var _overrideMime = ""
var self = this
var _id = ''
var _scripts = []
var _stop = false
var _throwError = function(description) {
// Stop script execution and run
// the user-defined error handler
//self.onerror(description)
self.abort()
return false
}
var _createQuery = function(data) {
if(!data) data = ''
var headers = ''
for (property in _requestHeaders)
headers += property + '=' + _requestHeaders[property] + '&'
var originalsrc = '&za_id=' + _id
var src = originalsrc
var max = _maximumRequestLength, request = []
var total = Math.floor(src.length / max), current = 0
while(src.length > 0) {
var query = _apiURL + '&'
+ 'za_id='
+ '' + _id
request.push(query)
src = src.substr(max)
}
if(request.length == 1)
src = _apiURL + '' + originalsrc
else
src = request
return src
}
var _checkParameters = function(method) {
// Check the method value (GET, POST, HEAD)
// and the prefix of the url (http://)
if(!method)
return _throwError('Please, specify the query method (GET, POST or HEAD)')
if(method.toLowerCase() != 'get' &&
method.toLowerCase() != 'post' &&
method.toLowerCase() != 'head')
return _throwError('Please, specify either a GET, POST or a HEAD method')
return true
}
var _createScript = function(src) {
if ('object' == typeof src) {
for(var i = 0; i < src.length; i++)
_createScript(src[i])
return
}
// Create the SCRIPT tag
var script = document.createElement('script')
script.src = src
script.type = 'text/javascript'
if (navigator.userAgent.indexOf('Safari'))
script.charset = 'utf-8' // Safari bug
if (document.getElementsByTagName('head')[0])
lhnscript = document.getElementsByTagName('head')[0].appendChild(script)
else
lhnscript = document.appendChild(script)
_scripts.push(script)
return script
}
var _escape = function(string) {
// Native escape() function doesn't quote the plus sign +
string = escape(string)
string = string.replace('+', '%2B')
return string
}
var _destroyScripts = function() {
// Removes the SCRIPT nodes used by the class
for(var i = 0; i < _scripts.length; i++)
_scripts[i].parentNode.removeChild(_scripts[i])
}
var _registerCallback = function() {
// Register a callback variable (in global scope)
// that points to current instance of the class
_id = 'v' + Math.random().toString().substr(2)
window[_id] = self
}
var _setReadyState = function(number) {
// Set the ready state property of the class
self.readyState = number
self.onreadystatechange()
if(number == 4) self.onload()
}
var _parseXML = function() {
var type = self.getResponseHeader('Content-type') + _overrideMime
if(!(type.indexOf('html') > -1 || type.indexOf('xml') > -1)) return
if(document.implementation && document.implementation.createDocument) {
var objDOMParser = new DOMParser()
var xml = objDOMParser.parseFromString(self.responseText, "text/xml")
self.responseXML = xml
} else if (window.ActiveXObject) {
var xml = new ActiveXObject('MSXML2.DOMDocument.3.0');
xml.async = false;
self.responseXML = xml.loadXML(self.responseText)
} else {
var xml = document.body.appendChild(document.createElement('div'))
xml.style.display = 'none'
xml.innerHTML = self.responseText
_cleanWhitespace(xml, true)
self.responseXML = xml.childNodes[0]
document.body.removeChild(xml)
}
}
var _cleanWhitespace = function(element, deep) {
var i = element.childNodes.length; if(i == 0) return
do {
var node = element.childNodes[--i]
if (node.nodeType == 3 && !_cleanEmptySymbols(node.nodeValue))
element.removeChild(node)
if (node.nodeType == 1 && deep)
_cleanWhitespace(node, true)
} while(i > 0)
}
var _cleanEmptySymbols = function(string) {
string = string.replace('\r', '')
string = string.replace('\n', '')
string = string.replace(' ', '')
return (string.length == 0) ? false : true
}
this._parse = function(object) {
// Parse the received data and set all
// the appropriate properties of the class
if(_stop) return
if(object.multipart) return
if(!object.success)
return _throwError(object.description)
_responseHeaders = object.responseHeaders
this.status = object.status
this.statusText = object.statusText
this.responseText = object.responseText
_parseXML()
_destroyScripts()
_setReadyState(4)
}
_registerCallback()
}
window.setTimeout('LHNInvite()', 3000);
}
function LHNInvite() {
InviteRepeats=InviteRepeats+1;
if (InviteRepeats>40)
{
zbrepeat=0;
}
if (zbrepeat==1) {
var url = 'http://www.livehelpnow.net/lhn/jsutil/getinvitationmessage.aspx?ip=3.81.57.77&lhnid='+lhnAccountN;
var transport = new XMLHTTP()
transport.onerror = function(description) {
//alert('Error: ' + description)
zbrepeat=0;transport.abort();
return;
}
transport.onreadystatechange = function() {
if(transport.readyState == 4)
{
//alert(transport.responseText);
//alert('Total length of data received: ' + transport.responseText.length + '\r\nThese are the response headers:\r\n\r\n' + transport.getAllResponseHeaders())
if (transport.responseText!='' && transport.responseText!=null && transport.responseText!="0" && transport.responseText.indexOf('Server Error')==-1)
{
WriteLHNMessage(transport.responseText,1);
bInvited=1;
//zbrepeat=1;
}
}
}
transport.open('GET')
//pausecomp(200)
transport.send()
//pausecomp(200)
//setTimeout('LHNInvite()', 3000);
if ((navigator.userAgent.indexOf('Opera') > -1) && (typeof (transport.responseText)!='undefined') && (transport.responseText)) {
WriteLHNMessage(transport.responseText,1);
//zbrepeat=0;
}
window.setTimeout('LHNInvite()', 10000);
return false
}
}
function CloseLHNInvite() {
document.getElementById('Zsmenu').style.display="none";
var url = lhnJsHost + 'www.livehelpnow.net/lhn/jsutil/closeinvitationmessage.aspx?iplhnid=3.81.57.77|28173|3/29/2024 8:21:49 AM';
var oImage = new Image;
pausecomp(200);
oImage.src = url;
pausecomp(300);
if(typeof(_gaq) != 'undefined' && _gaq){
_gaq.push(['_trackEvent', 'LiveHelpNow', 'Chat invitation declined', '']);
}
if(typeof(ga) != 'undefined' && ga){
ga('send', 'event', 'LiveHelpNow', 'Chat invitation declined');
}
return false;
}
var lhnInvitation='';
if (typeof zInvitationMessage !='undefined'){
lhnInvitation=zInvitationMessage;
}
else
{
lhnInvitation='How can we help you today?';
}
function displayAutoInvite()
{
if ((typeof lhnWin == 'undefined' || lhnWin==null) && bInvited==0){
WriteLHNMessage(lhnInvitation,1);
}
}
if (0!=0 && bInvited==0) {
if (30000==0)
{
window.setTimeout('displayAutoInvite()',5000);
}
else
{
window.setTimeout('displayAutoInvite()',30000);
}
}
function pausecomp(millis)
{
zadate = new Date();
var zcurDate = null;
do { var zcurDate = new Date(); }
while(zcurDate-zadate < millis);
}
if (blhnInstalled==0)
{
var lhnjava;
var lhnreg = new RegExp('/');
var lhnreferrer = (document.referrer.length>400)?escape(document.referrer.substring(0,400)):escape(document.referrer);//escape(document.referrer);
var lhnpagetitle=(document.title.length>100)?escape(document.title.substring(0,100)):escape(document.title);
var srnd;
//var lhnsShortPath = escape(window.location.pathname);
var lhnsPath=(this.location.href.length>400)?escape(this.location.href.substring(0,400)):escape(this.location.href);//escape(this.location);
if ( !(navigator.javaEnabled()) ) {
lhnjava="No" ;
} else {
lhnjava="Yes" ;
}
var lhnrand_no = Math.random();
var lhnsRes;
var lhnsDepth;
if (window.screen) {
lhnsRes=screen.width + 'x' + screen.height;
lhnsDepth=screen.colorDepth;
}
}
function WriteLHNMessage(lhnmes,AutoInvite)
{
if (lhnmes.indexOf("[promo]")>-1){lhnmes=lhnmes.replace('[promo]','');var elems = document.getElementsByClassName('LHNInviteAcceptButton');for(var i = 0; i != elems.length; ++i){elems[i].style.display = "none";}}
var lhnInviteWidth='278px';
if (bLHNOnline==0) {return false;}
if (window.innerWidth < 451) {document.getElementById("Zsmenu").style.width = "200px";lhnInviteWidth='200px;'}
bLHNAutoInvite=AutoInvite;
var url="";
document.getElementById("Zsleft").innerHTML = lhnmes+url;
var stopAt = 250;
stopAt = ((stopAt+310) > window.innerWidth) ? window.innerWidth-320 : stopAt;
var lhnInviteEl = document.getElementById('Zsmenu');
var lhnInviteOptions = {
duration: 'fast'=='slow' ? 250*7 : 250*2
, initProps: { left : lhnInviteWidth , top: '150px' , display: 'block' , 'z-index': '10000000' , position: 'fixed'}
, props: { left : stopAt , top: 150 }
, units: 'px'
, refreshRate: 10
, easing: LhnInvite.Animation.Easing.linear
};
LhnInvite.tweenTo(lhnInviteEl.style, lhnInviteOptions);
if (Zmutechime != '1')
{
if (navigator.userAgent.toLowerCase().indexOf('msie')>0)
{
var body = document.getElementsByTagName("body");
var divE = document.createElement('bgsound');
divE.id = "LHNSound";
divE.style.position = "absolute";
divE.style.left = "0px";
divE.style.top = "0px";
divE.hidden = "true";
divE.src=lhnJsHost + 'www.livehelpnow.net/lhn/sounds/beep0.wav';
divE.autostart="true";
divE.loop="0";
body[0].appendChild(divE);
setTimeout("document.getElementsByTagName('body')[0].removeChild(document.getElementById('LHNSound'))", 2000);
}
else
{
var body = document.getElementsByTagName("body");
var divE = document.createElement('audio');
divE.setAttribute("controls",'');
divE.setAttribute("autoplay",'');
divE.id = "zaBellSound";
divE.style.position = "absolute";
divE.style.left = "-300px";
divE.style.top = "-300px";
divE.style.width = "0";
divE.style.height = "0";
divE.visible = "false";
var divESource = document.createElement('source');
divESource.src=lhnJsHost + 'www.livehelpnow.net/lhn/sounds/beep0.wav';
divESource.type="audio/wav";
divE.appendChild(divESource);
body[0].appendChild(divE);
setTimeout("document.getElementsByTagName('body')[0].removeChild(document.getElementById('zaBellSound'))", 2000);
}
}
if(typeof(_gaq) != 'undefined' && _gaq){
if (AutoInvite==1) {
_gaq.push(['_trackEvent', 'LiveHelpNow', 'Automatic chat invitation shown', '',0,1]);
} else {
_gaq.push(['_trackEvent', 'LiveHelpNow', 'Proactive chat invitation shown', '',0,1]);
}
}
if(typeof(ga) != 'undefined' && ga){
if (AutoInvite==1) {
ga('send', 'event', 'LiveHelpNow', 'Automatic chat invitation shown','',{nonInteraction: true});
} else {
ga('send', 'event', 'LiveHelpNow', 'Proactive chat invitation shown','',{nonInteraction: true});
}
}
}
var lhnWin=null;
function OpenLHNChat()
{
if(typeof CustomOpenLHNChat == 'function') {
CustomOpenLHNChat();
if (document.getElementById('Zsmenu') ){ document.getElementById('Zsmenu').style.display="none";}
return false;
}
if (typeof lhnWin !== 'undefined' && lhnWin){
if (!lhnWin.closed){
lhnWin.blur();
setTimeout(lhnWin.focus(), 10);
return false;
}
}
if (bLHNAutoInvite==0){
Invitation();
return false;
}
var wleft = (screen.width - 500-32) / 2;
var wtop = (screen.height - 500-96) / 2;
var sScrollbars=(bLHNOnline==0)?"yes":"no";
var pcv='';
var opid=0;
if (typeof lhnPreChatValues !== 'undefined'){
pcv=JSON.stringify(lhnPreChatValues);
}
if (typeof lhnOperatorN !== 'undefined'){opid=lhnOperatorN;}
var LHN_WINDOW_NAME = "lhnChatWindow",LHN_WINDOW_URL=((document.location.protocol=='https:' || (typeof lhnJsHost !='undefined' && lhnJsHost == "https://"))?('https://www.livehelpnow.net/lhn/'):('http://www.livehelpnow.net/lhn/')) + 'livechatvisitor.aspx?zzwindow=' + lhnWindowN + '&lhnid=' + 28173 + '&d=' + 0+'&pcv=' + pcv + '&custom1=' + lhnCustom1 + '&custom2=' + lhnCustom2 + '&custom3=' + lhnCustom3 + '&opid=' + opid,LHN_WINDOW_ATTRS = 'left=' + wleft + ',top=' + wtop + ',width=500,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=' + sScrollbars + ',copyhistory=no,resizable=yes';if (lhnWin) {if (lhnWin.closed) {lhnWin=window.open(LHN_WINDOW_URL,LHN_WINDOW_NAME,LHN_WINDOW_ATTRS);}} else {if ( !!navigator.userAgent.match(/Trident\/7\./)||window.navigator.userAgent.indexOf("Edge") > -1 ){lhnWin = window.open(LHN_WINDOW_URL, "", LHN_WINDOW_ATTRS);}else{lhnWin = window.open("", LHN_WINDOW_NAME,LHN_WINDOW_ATTRS);}try {if (lhnWin.location.href.indexOf("about:blank") > -1) {lhnWin=window.open(LHN_WINDOW_URL,LHN_WINDOW_NAME,LHN_WINDOW_ATTRS);} else {lhnWin.focus();}}catch(err) {}}
if (document.getElementById('Zsmenu') ){ document.getElementById('Zsmenu').style.display="none";}
if(typeof(_gaq) != 'undefined' && _gaq){
_gaq.push(['_trackEvent', 'LiveHelpNow', 'Chat button clicked', '']);
}
if(typeof(ga) != 'undefined' && ga){
ga('send', 'event', 'LiveHelpNow', 'Chat button clicked');
}
}
function Invitation()
{
var wleft = (screen.width - 500-32) / 2;
var wtop = (screen.height - 500-96) / 2;
if (document.location.protocol=='https:')
{
window.open('https://www.livehelpnow.net/lhn/livechat.aspx?fullname=Visitor&email=unknown_email@livehelpnow.com&lhnmes=lhn&zzwindow=' + lhnWindowN + '&lhnid=' + 28173,'lhnchat','left=' + wleft + ',top=' + wtop + ',width=500,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
}
else
{
window.open('http://www.livehelpnow.net/lhn/livechat.aspx?fullname=Visitor&email=unknown_email@livehelpnow.net&lhnmes=lhn&zzwindow=' + lhnWindowN + '&lhnid=' + 28173,'lhnchat','left=' + wleft + ',top=' + wtop + ',width=500,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
}
if (document.getElementById('Zsmenu') ){ document.getElementById('Zsmenu').style.display="none";}
}
//width="' + lhnButtonWidth + '" height="' + lhnButtonHeight + '"
var lhnDisplayStyle = ((lhnButtonN == '-1') ? "style=\"display:none\" " : "");
//document.getElementById("lhnChatButton").innerHTML='';
var LHNimg = new Image();
LHNimg.onload = function() {
document.getElementById("lhnChatButton").innerHTML='';
document.getElementById("aLHNBTN").appendChild(LHNimg);
if (typeof window.LHN_button_onLoad == "function") { // && typeof lhnHPPanel == "undefined") {
window.LHN_button_onLoad();
}
};
LHNimg.id = "lhnchatimg";
LHNimg.border = "0";
LHNimg.alt="Live help";
LHNimg.src = lhnJsHost + 'www.livehelpnow.net/lhn/functions/imageserver.ashx?lhnid=' + lhnAccountN + '&java=' + lhnjava + '&zimg=' + lhnButtonN + '&sres=' + lhnsRes + '&sdepth=' + lhnsDepth + '&custom1=' + lhnCustom1 + '&custom2=' + lhnCustom2 + '&custom3=' + lhnCustom3 + '&t=' + lhnTrack + '&d=' + lhnDepartmentN +'&rnd=' + lhnrand_no + '&ck=' + navigator.cookieEnabled +'&referrer=' + lhnreferrer + '&pagetitle=' + lhnpagetitle + '&pageurl=' + lhnsPath;
if (typeof lhnJsSdk=='undefined')
{
var lhnJsSdk = {};
lhnJsSdk.track_conversion = function(id,value,vis){
var src = 'https://www.livehelpnow.net/lhn/handler/c.ashx?c=' + lhnAccountN + '&id=' + id + '&v=' + value.toString().replace(/[^0-9.]/g, "") + '&vis=' + vis;
var img = new Image(1, 1); img.onload = function () { img.src = src; };
img.src = 'https://www.livehelpnow.net/lhn/images/spacer.gif';
}
}
var lhnConversion={};
if (lhnConversion!='{}'){
for (var iLHNConv = 0; iLHNConv < lhnConversion.length; iLHNConv++) {
if (lhnConversion[iLHNConv].Type==0) {
lhnJsSdk.track_conversion(lhnConversion[iLHNConv].ConversionID,0,'');
} else if (lhnConversion[iLHNConv].Type==1) {
if (typeof lhnConversion[iLHNConv].FieldSelector !=='undefined'){
lhnJsSdk.track_conversion(lhnConversion[iLHNConv].ConversionID,window[lhnConversion[iLHNConv].FieldSelector],'');
}
} else if (lhnConversion[iLHNConv].Type==2) {
if (document.getElementById(lhnConversion[iLHNConv].FieldSelector)!=null){
lhnJsSdk.track_conversion(lhnConversion[iLHNConv].ConversionID,document.getElementById(lhnConversion[iLHNConv].FieldSelector).innerText,'');
}
else if (document.getElementsByClassName(lhnConversion[iLHNConv].FieldSelector)!=null && document.getElementsByClassName(lhnConversion[iLHNConv].FieldSelector)[0]!=null){
lhnJsSdk.track_conversion(lhnConversion[iLHNConv].ConversionID,document.getElementsByClassName(lhnConversion[iLHNConv].FieldSelector)[0].innerText,'');
}
} else if (lhnConversion[iLHNConv].Type==3) {
var oLHNreg = new RegExp(JSON.parse(lhnConversion[iLHNConv].FieldSelector).RegexMatch,JSON.parse(lhnConversion[iLHNConv].FieldSelector).RegexOptions);
if (oLHNreg.exec(document.body.innerHTML)!==null){
lhnJsSdk.track_conversion(lhnConversion[iLHNConv].ConversionID,oLHNreg.exec(document.body.innerHTML)[1],'');
}
}
}
}