var _l8sId = 1200716 // ==================================================================== // URLEncode and URLDecode functions // // Copyright Albion Research Ltd. 2002 // http://www.albionresearch.com/ // // You may copy these functions providing that // (a) you leave this copyright notice intact, and // (b) if you use these functions on a publicly accessible // web site you include a credit somewhere on the web site // with a link back to http://www.albionresearch.com/ // // If you find or fix any bugs, please let us know at albionresearch.com // // SpecialThanks to Neelesh Thakur for being the first to // report a bug in URLDecode() - now fixed 2003-02-19. // And thanks to everyone else who has provided comments and suggestions. // ==================================================================== function _l8URLEncode(plaintext) { // The Javascript escape and unescape functions do not correspond // with what browsers actually do... var SAFECHARS = "0123456789" + // Numeric "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + // Alphabetic "abcdefghijklmnopqrstuvwxyz" + "-_.!~*'()"; // RFC2396 Mark characters var HEX = "0123456789ABCDEF"; var encoded = ""; for (var i = 0; i < plaintext.length; i++ ) { var ch = plaintext.charAt(i); if (ch == " ") { encoded += "+"; // x-www-urlencoded, rather than %20 } else if (SAFECHARS.indexOf(ch) != -1) { encoded += ch; } else { var charCode = ch.charCodeAt(0); if (charCode > 255) { alert( "Unicode Character '" + ch + "' cannot be encoded using standard URL encoding.\n" + "(URL encoding only supports 8-bit characters.)\n" + "A space (+) will be substituted." ); encoded += "+"; } else { encoded += "%"; encoded += HEX.charAt((charCode >> 4) & 0xF); encoded += HEX.charAt(charCode & 0xF); } } } return encoded; } /* ::::::::::::::::::::::::::::::::::: START OUR CODE ::::::::::::::::::::::::::::: */ var l8pageTitle = _l8URLEncode(document.title.toString()); var l8pageUrl = _l8URLEncode(document.location.toString()); var l8pollURL = "https://www.autojini.com/live8guest/poll.cfm?clientId=50104&pageUrl=" + l8pageUrl + "&pageTitle=" + l8pageTitle + "&sessionId=" + _l8sId; var trackingStartedAt = new Date(); function _l8pollUser(pollURL) { var uniqeUrlString=Math.random(); var htmlHead = document.getElementsByTagName('head')[0]; var orgTracker = document.getElementById('live8tracker'); if (orgTracker) { if (orgTracker.readyState == "loading") { return; } document.body.removeChild(orgTracker); } pollURL += '&uniqeUrlString=' + uniqeUrlString; var scriptElement = document.createElement('script'); scriptElement.src = l8pollURL; scriptElement.type = "text/javascript"; scriptElement.id = 'live8tracker'; scriptElement.defer = true; document.body.appendChild(scriptElement); } function _l8checkUserTimeOut(trackingStartedAt) { var trackerTimeout = 600; var currentTime = new Date(); var timeDiff = (currentTime - trackingStartedAt) / 1000; if (trackerTimeout > timeDiff) { _l8pollUser(l8pollURL) } } function l8InitPage() { _l8pollUser(l8pollURL); setInterval("_l8checkUserTimeOut(trackingStartedAt);",8000); } l8InitPage(); var _l8DivfloatX = 10; var _l8DivfloatY = 10; var _l8Divlayerwidth = 100; var _l8Divlayerheight = 130; var _l8Divhalign = "center"; var _l8Divvalign = "center"; var _l8Divdelayspeed = 3; var i_l8DivfloatX=_l8DivfloatX; var i_l8DivfloatY=_l8DivfloatY; var _l8divlastX=-1; var _l8divlastY=-1; var _l8floatadjustTimer; // This script is copyright (c) Henrik Petersen, NetKontoret // Feel free to use this script on your own pages as long as you do not change it. // It is illegal to distribute the script as part of a tutorial / script archive. // Updated version available at: http://www.echoecho.com/toolfloatinglayer.htm // This comment and the 4 lines above may not be removed from the code. _l8DivNS6 = false; _l8DivIE4 = (document.all); if ( ! _l8DivIE4) { _l8DivNS6 = (document.getElementById); } _l8DivNS4 = (document.layers); try { var _proactiveDiv = document.createElement("DIV"); document.body.appendChild(_proactiveDiv); } catch(e) { } function _l8divFloatadjust() { if ((_l8DivNS4) || (_l8DivNS6)) { if (_l8divlastX ==- 1 || _l8Divdelayspeed == 0) { _l8divlastX = window.pageXOffset + _l8DivfloatX; _l8divlastY = window.pageYOffset + _l8DivfloatY; } else { var dx = Math.abs(window.pageXOffset + _l8DivfloatX - _l8divlastX); var dy = Math.abs(window.pageYOffset + _l8DivfloatY - _l8divlastY); var d = Math.sqrt(dx * dx + dy * dy); var c = Math.round(d / 10); if (window.pageXOffset + _l8DivfloatX > _l8divlastX) { _l8divlastX = _l8divlastX + _l8Divdelayspeed + c; } if (window.pageXOffset + _l8DivfloatX < _l8divlastX) { _l8divlastX = _l8divlastX - _l8Divdelayspeed - c; } if (window.pageYOffset + _l8DivfloatY > _l8divlastY) { _l8divlastY = _l8divlastY + _l8Divdelayspeed + c; } if (window.pageYOffset + _l8DivfloatY < _l8divlastY) { _l8divlastY = _l8divlastY - _l8Divdelayspeed - c; } } if (_l8DivNS6) { document.getElementById('_l8floatlayer').style.left = _l8divlastX; document.getElementById('_l8floatlayer').style.top = _l8divlastY; } } else if (_l8DivIE4) { if (_l8divlastX ==- 1 || _l8Divdelayspeed == 0) { _l8divlastX = document.body.scrollLeft + _l8DivfloatX; _l8divlastY = document.body.scrollTop + _l8DivfloatY; } else { var dx = Math.abs(document.body.scrollLeft + _l8DivfloatX - _l8divlastX); var dy = Math.abs(document.body.scrollTop + _l8DivfloatY - _l8divlastY); var d = Math.sqrt(dx * dx + dy * dy); var c = Math.round(d / 10); if (document.body.scrollLeft + _l8DivfloatX > _l8divlastX) { _l8divlastX = _l8divlastX + _l8Divdelayspeed + c; } if (document.body.scrollLeft + _l8DivfloatX < _l8divlastX) { _l8divlastX = _l8divlastX - _l8Divdelayspeed - c; } if (document.body.scrollTop + _l8DivfloatY > _l8divlastY) { _l8divlastY = _l8divlastY + _l8Divdelayspeed + c; } if (document.body.scrollTop + _l8DivfloatY < _l8divlastY) { _l8divlastY = _l8divlastY - _l8Divdelayspeed - c; } } document.all['_l8floatlayer'].style.posLeft = _l8divlastX; document.all['_l8floatlayer'].style.posTop = _l8divlastY; } _l8floatadjustTimer=setTimeout('_l8divFloatadjust()', 50); } function _l8floatDivdefine() { if ((_l8DivNS4) || (_l8DivNS6)) { if (_l8Divhalign == "left") { _l8DivfloatX = i_l8DivfloatX } if (_l8Divhalign == "right") { _l8DivfloatX = window.innerWidth - i_l8DivfloatX - _l8Divlayerwidth - 20 } if (_l8Divhalign == "center") { _l8DivfloatX = Math.round((window.innerWidth - 20) / 2) - Math.round(_l8Divlayerwidth / 2) } if (_l8Divvalign == "top") { _l8DivfloatY = i_l8DivfloatY } if (_l8Divvalign == "bottom") { _l8DivfloatY = window.innerHeight - i_l8DivfloatY - _l8Divlayerheight } if (_l8Divvalign == "center") { _l8DivfloatY = Math.round((window.innerHeight - 20) / 2) - Math.round(_l8Divlayerheight / 2) }; } if (_l8DivIE4) { if (_l8Divhalign == "left") { _l8DivfloatX = i_l8DivfloatX } if (_l8Divhalign == "right") { _l8DivfloatX = document.body.offsetWidth - i_l8DivfloatX - _l8Divlayerwidth - 20 } if (_l8Divhalign == "center") { _l8DivfloatX = Math.round((document.body.offsetWidth - 20) / 2) - Math.round(_l8Divlayerwidth / 2) } if (_l8Divvalign == "top") { _l8DivfloatY = i_l8DivfloatY } if (_l8Divvalign == "bottom") { _l8DivfloatY = document.body.offsetHeight - i_l8DivfloatY - _l8Divlayerheight } if (_l8Divvalign == "center") { _l8DivfloatY = Math.round((document.body.offsetHeight - 20) / 2) - Math.round(_l8Divlayerheight / 2) } } } function _l8writeFloatDiv(content,floatX,floatY,layerwidth,layerheight,halign,valign,speed) { _l8Divlayerwidth = layerwidth; _l8Divlayerheight = layerheight; _l8Divhalign = halign; _l8Divvalign = valign; _l8Divdelayspeed = speed; _proactiveDiv.id = "_l8floatlayer"; _proactiveDiv.style.left = floatX + "px"; _proactiveDiv.style.top = floatY + "px"; _proactiveDiv.style.width = layerwidth + "px"; _proactiveDiv.style.height = layerheight + "px"; _proactiveDiv.style.overflow = 'hidden'; _proactiveDiv.style.display = 'inline'; _proactiveDiv.style.position = 'absolute'; _proactiveDiv.style.zIndex = 1000; _proactiveDiv.innerHTML = content; i_l8DivfloatX=floatX; i_l8DivfloatY=floatY; _l8floatDivdefine(); window.onresize=_l8floatDivdefine; _l8divFloatadjust(); } function _l8removeFloatDiv() { if (document.getElementById("_l8floatlayer")) { document.getElementById("_l8floatlayer").style.display = 'none'; } if (_l8floatadjustTimer) { clearTimeout(_l8floatadjustTimer); } } function _l8ProactiveAction(proactiveId,action) { _l8removeFloatDiv(); _l8ServerImg = new Image(); _l8ServerImg.src = "https://www.autojini.com/live8guest/proactiveChat.cfm?action=" + action +"&clientId=50104&proactiveId=" +proactiveId + "&lsId=" + _l8sId; if (action == 'ACCEPT') { _l8OpenProactiveChat(proactiveId); } } function _l8OpenProactiveChat(proactiveId) { // popup settings var popupWidth = 500; var popupHeight = 450; var popupSettings = 'width=' + popupWidth + ',height=' + popupHeight; var uniqueKey = new Date().getTime(); // url var chatUrl = "https://www.autojini.com/live8guest/startChat.cfm?clientId=50104&departmentId=0&proActiveId=" + proactiveId + "&key="+ uniqueKey; window.open(chatUrl, 'live8guest',popupSettings); }