var hcUpdateState = 0; var hcControlImage; var hcIsImage = false; var hcCounter = 0; var hcCmd = "knockPage"; var scriptType = "SERVERBASED"; var hcTimeout = 5; var hcSendCounter = 0; var hcPageID = null; var hcLeft = -1; var hcTop = -1; var hcNS = (document.layers) ? true : false; var hcIE = (document.all) ? true : false; var hcDOM = (document.getElementById) ? true : false; if (hcIE) hcDOM = false; var hcMAC = (navigator.platform) && (navigator.platform.toUpperCase().indexOf("MAC") >= 0); if (hcNS) hcMAC = false; var hcShowImage = false; var hcPos = - 30; var HumanStep = 3; var hcDir = HumanStep; var hcBorder = 100; var hcAnimate = false; var hcNeedImage; var hcCloseImage; var hcImageFetched = false; var hcimage = hcGetImage("hcIcon"); if (hcimage) hcicon = hcimage.src; var hcParam = null; var hcOpenVars = null; var hcLoadingImage = false; var hcLayerWidth = 400; var hcLayerHeight = 300; var hcClickURL; var HCinit = true; var lpForcePopup = ("{forcePopup}" == "true"); var visitorStatus = "INSITE_STATUS"; if ("{newChannel}" == "true") { var lpPosY = 100; var lpPosX = 100; var lpOperatorViewable= 'true'; var lpOperatorPageType= 'CoBrowse'; } if (hcDOM) { hcControlImage = document.createElement('IMG'); hcControlImage.style.visibility = "hidden"; document.body.appendChild(hcControlImage); } else if (hcMAC) { document.writeln("
"); hcControlImage = document.hcControlImage; } function hcGetObj(id) { if (document.getElementById) return document.getElementById(id); else if (document.all) return document.all(id); } function hcObjShow(obj) { if (hcNS) obj.visibility="show"; else obj.style.visibility="visible"; } function hcDate() { var d = new Date(); return d.getTime(); } function hcSendRequest() { hcSendCounter++; if (hcSendCounter == 5) hcIsImage = false; if (! hcIsImage) { if ((! hcDOM) && (! hcMAC)) hcControlImage= new Image; if (hcPageID==null) hcPageID=Math.round(Math.random()*9999999999); var u = 'http://server.iad.liveperson.net/hc/28469383/?site=28469383' + '&cmd=' + hcCmd + '&page=' + escape(document.location) + '&title=' + escape(document.title) + '&referrer=' + escape(document.referrer) + '&id=' + hcPageID + '&d=' + hcDate(); if (hcCmd == "knockPage") hcCmd = "startPage"; else { if ((typeof(tagVars) != "undefined") && (tagVars != "")) { u = u + "&" + tagVars; tagVars = ""; } if ( true ) { u = u + "&cobrowse=true&cookie=" + escape(document.cookie); } if ( (typeof(lpOperatorViewable) != "undefined") && (lpOperatorViewable == "true") ) { u = u + "&cobrowse=true&cookie=" + escape(document.cookie); if (typeof(lpOperatorPageType) != "undefined") { u = u + "&cobrowsetitle=" + escape(lpOperatorPageType); } if (typeof(lpOperatorPageUrl) != "undefined") { u = u + "&cobrowseurl=" + escape(lpOperatorPageUrl); } } if (scriptType != null) { u = u + "&scriptType=" + scriptType; scriptType = null; } hcCmd = "inPage"; } hcControlImage.src = u; hcIsImage = true; hcSendCounter = 0; } } function hcPlaceLayersIE() { } function hcPlaceLayersNS() { } function hcHandlePopup(w, h) { } function hcHandleWidthHeight(w,h) { if (h==1) { var wCode = w-w%2; var more = w%2; if (wCode == 30) { hcTimeout = -1; } else if (wCode == 40) { hcTimeout = 15; } else if (wCode == 50) { hcTimeout = 30; } else if (wCode == 60) { openChat(null, null); } else if (wCode == 70) { openEngageChat("engage", null); } else if (wCode == 80) { hcReloadIcon(); } else if (wCode == 90) { hcTimeout = 1; } if (more==1) hcTimeOut=1; } else hcHandlePopup(w, h); } function hcCheckImages() { if (hcIsImage) { if (((hcDOM) || (hcMAC)) && (! hcControlImage.complete)) { hcLoadingImage = true; return; } var w = hcControlImage.width; var h = hcControlImage.height; hcLoadingImage = false; if (w == 0) return; hcIsImage = false; hcHandleWidthHeight(w,h); } } var hcLoadTimer = 0; function hcloop() { if (hcTimeout < 0) return; if (hcCounter == 0) { if (! hcLoadingImage) { hcSendRequest(); hcLoadTimer = 0; } else { hcLoadTimer++; if (hcLoadTimer == 5) { hcIsImage = false; hcSendRequest(); hcLoadTimer = 0; } } } hcCounter = (hcCounter + 1) % hcTimeout; hcCheckImages(); setTimeout('hcloop()', 1000); } function hcReloadIcon() { if (hcimage) hcimage.src = hcicon + "&monitor=1&d=" + hcDate(); } function openChat(param, openVars) { visitorStatus = "CHAT_STATUS"; var s = document.location; if (param != null) s = "(" + param + ") " + s; s = escape(s); var oparms = ""; if (openVars != null) oparms = oparms + "&" + openVars; var url = 'http://server.iad.liveperson.net/hc/28469383/?cmd=file&file=visitorWantsToChat' + oparms + '&site=28469383&d=' + hcDate()+'&referrer='+s; var name = 'chat28469383'; var params = 'width=472,height=320,menubar=no,scrollbars=0'; if (typeof(lpOpenChat) == "function") { lpOpenChat(url, name, params); } else { window.open(url, name, params); } } function openCredit() { document.location = "http://www.liveperson.com/ref/lppb.asp"; } function openEngageChat(param, openVars) { hcParam = param; hcOpenVars = openVars; if ((! lpForcePopup) && (hcIE || hcNS || hcDOM)) { hcShowTheImage(); } else { window.open('http://server.iad.liveperson.net/hc/28469383/?cmd=file&file=wantsToChat&site=28469383&d=' + hcDate(), 'wanttochat28469383', ',,menubar=no,scrollbars=no'); } } function openWantsToChat() { openEngageChat(null, null); } function hcPreload() { hcNeedImage = new Image(); hcNeedImage.src = "http://www.us.net/html/promos/LivePerson/need_help_on.gif"; hcCloseImage = new Image(); hcCloseImage.src = "http://www.us.net/html/promos/LivePerson/close_on.gif"; } function hcSetImageGo(name, image, go) { hcAnimate = go; hcSetImage(name, image); } function hcSetImage(name, image) { hcGetImage(name).src = "http://www.us.net/html/promos/LivePerson/" + image; } function hcWriteDoc(str) { document.writeln(str); } if (hcIE || hcDOM) { hcWriteDoc(''); hcPlaceLayersIE(); } else if (hcNS) { hcWriteDoc('