ngage.customNgageLibrary={},ngage.customNgageLibrary.analyticsCounter=1,ngage.customNgageLibrary.chatInvite={},ngage.customNgageLibrary.appendNgageCSS=function(e){if((".ngageMobileFloat {display:none !important;}"==e||"#ngageMobileInvite {display:none !important;}"==e)&&!ngage.isMobile())return!1;var t;try{(t=document.createElement("style")).type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}catch(n){(t=document.createElement("link")).setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href","https://scripting.ngagelive.com/ngagecss.php?css="+window.btoa(e))}var n=document.getElementsByTagName("script")[0];return n.parentNode.insertBefore(t,n),t},ngage.customNgageLibrary.addAnalytics=function(e,t){"undefined"==typeof _gaq&&function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}();var n=ngage.customNgageLibrary.analyticsCounter;window._gaq=window._gaq||[],_gaq.push(["ngage"+n+"._setAccount",e]),_gaq.push(["ngage"+n+"._setAllowLinker",!0]),!1!==t&&(t||ngage.chat)&&_gaq.push(["ngage"+n+"._trackPageview"]),ngage.chat?(ngage.chat.events.chatClient.onVisitorPhoneEmailReceived(function(){_gaq.push(["ngage"+n+"._trackEvent","Chat","Conversion","Email Received "])}),ngage.chat.events.chatClient.onVisitorFirstMessageReceived(function(){_gaq.push(["ngage"+n+"._trackEvent","Chat","Conversion","Visitor Chats "])})):ngage.tracker&&(window.ngGANT=window.ngGANT||"",window.ngGAYT=window.ngGAYT||"",window.ngGARC=window.ngGARC||"",ngage.tracker.events.onYesClick(function(){_gaq.push(["ngage"+n+"._trackEvent","Chat","Answer","Yes"])}),ngage.tracker.events.onNoClick(function(){_gaq.push(["ngage"+n+"._trackEvent","Chat","Answer","No"])}),ngage.tracker.events.onChatButtonClick(function(){_gaq.push(["ngage"+n+"._trackEvent","Chat","Answer","Requested Chat"])})),ngage.customNgageLibrary.analyticsCounter++},ngage.customNgageLibrary.killOnPage=function(e){for(var t=0;t%OBJ%"+JSON.stringify(t)+"% ",!0,"Visitor")}))},ngage.customNgageLibrary.passLandingPage=function(){if(ngage.tracker){var e=getNgageCookie("ngagelanding");""==getNgageCookie("ngagelanding")&&(e=document.location.href,setNgageCookie("ngagelanding",e,120)),ChatURL+="&customobject="+encodeURIComponent(JSON.stringify({landingPage:e}))}else if(ngage.chat){try{var t=JSON.parse(decodeURIComponent(document.location.href.split("&customobject=")[1].split("&")[0]))}catch(e){t={}}ngage.customNgageLibrary.passParameter(t)}},ngage.customNgageLibrary.passCustomFieldFromSite=function(e){if(ngage.tracker)ChatURL+="&customobject="+encodeURIComponent(JSON.stringify(e));else if(ngage.chat){try{var t=JSON.parse(decodeURIComponent(document.location.href.split("&customobject=")[1].split("&")[0]))}catch(e){t={}}ngage.customNgageLibrary.passParameter(t);try{t=JSON.parse(decodeURIComponent(document.location.href.split("&customobject=")[1].split("&")[0]))}catch(e){t={}}return t}},ngage.customNgageLibrary.adsrvr_track=function(e,t,n,a){var o=document.createElement("div");o.id=e;var i=document.createElement("script");i.src="https://js.adsrvr.org/up_loader.1.1.0.js",o.appendChild(i);var g=document.getElementsByTagName("script")[0];g.parentNode.insertBefore(o,g),"function"==typeof TTDUniversalPixelApi&&(new TTDUniversalPixelApi).init(t,[n],"https://insight.adsrvr.org/track/up",e),ngage.chat.events.chatClient.onVisitorPhoneEmailReceived(function(){var e=document.createElement("img");e.src="//insight.adsrvr.org/track/conv/"+a,e.height="1",e.width="1";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})},ngage.fireTopDesktop=function(e,t,n,a,o,i,g){if(!ngage.isMobile()){ShowAutoChatInviteDiv=function(){},"object"!=typeof e&&(e=!0);t=e.killBottom||t||!1,a=e.barColor||a||!1;var s=e.barText||"
YES
, start now!",r=(o=e.customHTML||o||"Hi, we are here to help if you have questions.",e.headerText||"LIVE CHAT"),l=(i=e.scrollAmount||i||300,g=e.scrollTimer||g||5e3,"https://scripting.ngagelive.com/dev/test/new_mobile.png");if(n=e.imageUrlPass||n||!1)p(n);else try{var c=ngage.getXmlHttpObject(),d=httpsPreFix+main_url+"/ImageRetrievers/GeneralImage.aspx?websiteid="+WebsiteID;c.onreadystatechange=function(){4===c.readyState&&(200===c.status&&c.response.length>0?p(d):p(l))},c.open("GET",d,!0),c.setRequestHeader("Content-Type","image/jpeg"),c.send()}catch(e){p(l)}function p(t){var n="
"+r+"

";n+=o,n+="
";var c=document.createElement("div");c.innerHTML=n,document.getElementsByTagName("body")[0].appendChild(c);var d=new Date;ngage.removeSlider=function(){e&&setNgageCookie("NgageAutoPopup","false",120),document.getElementsByClassName("ngageMobileFloat")[0].style.top="-500px"},""==getNgageCookie("NgageAutoPopup")&&document.addEventListener("scroll",function e(){var t=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,n=i;"function"==typeof i&&(n=i()),"number"!=typeof n&&(n=300),"complete"===document.readyState&&t>=n&&new Date-d>g&&(document.removeEventListener("scroll",e),document.getElementsByClassName("ngageMobileFloat")[0].style.top="0px")})}}},ngage.customNgageLibrary.fireNewMobile=function(e,t,n,a,o,i,g){if(ngage.isMobile()){var s="https://scripting.ngagelive.com/dev/test/new_mobile2.png";!0;t=t||!1,n=n||s,a=a||!1,o=o||"Hi, we are here to help if you have questions.",i=i||300,g=g||5e3;var r="
LIVE CHAT
",r+=o,r+="
=a&&new Date-c>g&&(document.removeEventListener("scroll",e),document.getElementsByClassName("ngageMobileFloat")[0].style.top="0px",t))try{document.getElementsByClassName("liveChatFloatingButtonMobile")[0].style.bottom="-100px"}catch(e){}})}},ngage.fireNewDesktop=function(e,t,n,a,o,i,g){return},ngage.customNgageLibrary.phoneValidateSimple=function(){if(ngage.chat){ngage.receivedPhone=!1,ngage.chat.events.bind(ngage.chat.events.eventTypes.chat.messageReceived,function(e,t,n,a){var o,i,g=a.match(/\(?\b([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})\b/);if(g[0]&&!ngage.receivedPhone&&"Visitor"==n){var s=g[0].replace(/[^0-9]/g,"").substring(0,6);"800"!=s&&"877"!=s&&"888"!=s&&"855"!=s&"866"!=s&"844"!=s&&(ngage.receivedPhone=!0,o=g[0],(i=new XMLHttpRequest).open("POST","https://scripting.ngagelive.com/dev/api/melissa_exchange.php"),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onreadystatechange=function(){4==i.readyState&&200==i.status&&"Invalid"==i.response&&(NgageChatService.ChatService.SendSystemMessage(ngage.cookies.getCookie("ConvId_"+document.getElementById("txtWebsiteID").value),"Visitor has provided invalid phone number! ("+o+")"),setTimeout(function(){ngage.chat.interactive.createMessage("Can you confirm that "+o+" is your correct phone number?","Operator")},3e3))},i.send("token=fHqWgAdS&exchange="+o.replace(/[^0-9]/g,"").substring(0,6)))}})}},ngage.customNgageLibrary.phoneValidate=function(){if(ngage.chat){ngage.receivedPhone=!1,ngage.chat.events.bind(ngage.chat.events.eventTypes.chat.messageReceived,function(e,t,n,a){var o,i,g=a.match(/\(?\b([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})\b/);if(g[0]&&!ngage.receivedPhone&&"Visitor"==n){var s=g[0].replace(/[^0-9]/g,"").substring(0,3);"800"!=s&&"877"!=s&&"888"!=s&&"855"!=s&"866"!=s&"844"!=s&&(ngage.receivedPhone=!0,o=g[0],(i=new XMLHttpRequest).open("POST","https://scripting.ngagelive.com/dev/api/melissa_exchange_real.php"),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onreadystatechange=function(){4==i.readyState&&200==i.status&&"Invalid"==i.response&&(NgageChatService.ChatService.SendSystemMessage(ngage.cookies.getCookie("ConvId_"+document.getElementById("txtWebsiteID").value),"Visitor has provided invalid phone number! ("+o+")"),setTimeout(function(){ngage.chat.interactive.createMessage("Can you confirm that "+o+" is your correct phone number?","Operator")},3e3))},i.send("source=core&exchange="+o.replace(/[^0-9]/g,"").substring(0,6)+"&phone="+o.replace(/[^0-9]/g,"")))}})}},ngage.customNgageLibrary.noloStylePopup=function(){var e=new Date;""==getNgageCookie("NgageAutoPopup")&&(ngage.isMobile()||function(){var e=ng_doc.body;popDiv=ng_doc.createElement("div");var t,n=(t=0,self.innerHeight?t=self.innerWidth:document.documentElement&&document.documentElement.clientHeight?t=document.documentElement.clientWidth:document.body&&(t=document.body.clientWidth),t);getScrollHeight();var a='';n/=2,n-=187,ng_doc.getElementById("divAutoChatInvFloater")||bolShowedChatInvitetoUser||(popDiv.style.display="none",popDiv.style.position="absolute",popDiv.style.zIndex=10005,popDiv.style.width="375px",popDiv.style.height="315px",popDiv.id="divAutoChatInvFloater",e.appendChild(popDiv),popDiv.innerHTML=a,FloatDiv("divAutoChatInvFloater",n,50).flt())}(),window.ShowAutoChatInviteDiv=function(){},window.BlockBackground=function(e){e||setNgageCookie("NgageAutoPopup","false",120)},$(window).on("scroll",function(){$(window).scrollTop()>=300&&new Date-e>5e3&&($(window).off("scroll"),ngage.isMobile()||($("#divAutoChatInvFloater").css({display:"block",opacity:0}),$("#divAutoChatInvFloater").animate({opacity:"1"},500)))}))},ngage.customNgageLibrary.addSpanishPopupButton=function(e,t,n,a,o,i,g,s,r,l,c){c=c;e=e,t=t,n=n,a=a,i=i,g=g,o=o;var d=document.createElement("a");d.onclick=function(){!function(e){e=e,ngage.tracker.events.fire.yesEvent();var t="https://"+main_chat_url+"/index.aspx?websiteid="+e+"&alt="+ngage_alt+"&wl="+ngage_whitelabel+"&loc="+escape(pageLoc),n=ng_doc.getElementById("divAutoChatInvFloater");n&&(n.style.visibility="hidden",n.style.display="none"),BlockBackground(!1),openWindow(t+"&mode=AutoEngage",!1)}(c)};var p=document.createElement("div");p.id="ngageSpanishPopupButton",p.innerHTML=t,p.style.backgroundColor=e,p.style.height=n,p.style.width=a,p.style.textAlign="center",p.style.lineHeight=s,p.style.fontSize=o,p.style.color=r,p.style.fontFamily=l,d.style.cursor="pointer",d.style.position="relative",d.style.top=i,d.style.left=g,d.appendChild(p),(ngage.isDesktop()||ngage.isTablet())&&function e(){var t=document.getElementById("divAutoChatInvFloater");t?t.appendChild(d):setTimeout(e,100)}()},ngage.customNgageLibrary.defineOptimizelyEvents=function(){window.optimizely&&ngage.tracker&&(ngage.tracker.events.onYesClick(function(){window.optimizely.push(["trackEvent","ngageYesClick"]),window.optimizely.push(["trackEvent","ngageChatRequest"])}),ngage.tracker.events.onNoClick(function(){window.optimizely.push(["trackEvent","ngageNoClick"])}),ngage.tracker.events.onChatButtonClick(function(){window.optimizely.push(["trackEvent","ngageButtonClick"]),window.optimizely.push(["trackEvent","ngageChatRequest"])}))},ngage.customNgageLibrary.appendSpanishPopup=function(e,t){window.ngage_alt=!1,window.BlockBackground=window.BlockBackground||function(){};var n=document.createElement("div");n.className="ngageMobileBar2",n.innerHTML="Charla en EspaƱol",n.style.backgroundColor=e||"rgb(240,140,2)",n.onclick=function(){AcceptSpanishAutoPopup()},function e(){var t=document.getElementsByClassName("ngageMobileFloat");if(t[0]&&!ngage.isMobile()){t[0].appendChild(n);var a="bottom:-1em;";"auto"==document.getElementsByClassName("ngageMobileBar")[0].style.bottom&&(a="top:-1em;"),ngage.customNgageLibrary.appendNgageCSS(".ngageMobileBar{padding:.25em 1em!important;width:40%!important;margin-left:15%!important}.ngageMobileBar2{cursor:pointer;position:absolute;"+a+"padding:.125em .5em;text-align:center;font-size:12px;width:20%;border-radius:1em;margin-left:60%;background-color:#f08c02}")}else ngage.isMobile()||""!=getNgageCookie("NgageAutoPopup")||setTimeout(e,500)}(),window.AcceptSpanishAutoPopup=window.AcceptSpanishAutoPopup||function(){ngage.tracker.events.fire.yesEvent();var e="https://"+main_chat_url+"/index.aspx?websiteid="+t+"&alt="+ngage_alt+"&wl="+ngage_whitelabel+"&loc="+escape(pageLoc),n=ng_doc.getElementById("divAutoChatInvFloater");n&&(n.style.visibility="hidden",n.style.display="none"),BlockBackground(!1),openWindow(e+"&mode=AutoEngage",!1)}},ngage.customNgageLibrary.addSpanishPopupButton2=function(e,t,n,a,o,i,g,s,r,l,c){window.spanishWebsiteID=c,window.AcceptSpanishAutoPopup=function(){var e=e;ngage.tracker.events.fire.yesEvent();var t="https://"+main_chat_url+"/index.aspx?websiteid="+e+"&alt="+ngage_alt+"&wl="+ngage_whitelabel+"&loc="+escape(pageLoc),n=ng_doc.getElementById("divAutoChatInvFloater");n&&(n.style.visibility="hidden",n.style.display="none"),BlockBackground(!1),openWindow(t+"&mode=AutoEngage",!1)},ngage.customNgageLibrary.appendSpanishPopup(e)},ngage.trackExitIntentHandler=function(e){e.relatedTarget||(document.removeEventListener("mouseout",ngage.trackExitIntentHandler),ShowAutoChatInviteDiv())},ngage.trackExitIntent=function(){ngage.isMobile()||document.addEventListener("mouseout",ngage.trackExitIntentHandler)},ngage.removeSlider2=function(){if(visitCheck&&setNgageCookie("NgageAutoPopup","false",120),document.getElementsByClassName("ngageMobileFloat")[0].style.top="-300px",killBottom)try{document.getElementsByClassName("liveChatFloatingButtonMobile")[0].style.bottom="0px"}catch(e){}var e=document.getElementsByClassName("liveChatFloatingButtonSpacer")[0];e&&(e.style.display="none")},ngage.customNgageLibrary.shadowBox=function(){if(!ngage.isMobile()&&!ngage.ignoreCallback&&(ngage.customNgageLibrary.appendNgageCSS(".ngageMobileFloat{display:none !important;}"),""==getNgageCookie("NgageAutoPopup"))){var e=document.createElement("div");e.style.display="none",e.style.height="100%",e.style.width="100%",e.style.position="fixed",e.style.left="0px",e.style.top="0px",e.style.backgroundColor="rgba(0,0,0,.8)",e.style.zIndex="1000000",document.getElementsByTagName("body")[0].appendChild(e);var t=document.createElement("div");t.style.visibility="hidden",t.style.background="url(https://messenger.ngageics.com/ImageRetrievers/PopupBG.aspx?websiteid="+WebsiteID+")",t.style.height="315px",t.style.width="375px",t.style.position="fixed",t.style.top="50px",t.style.left=(document.body.getBoundingClientRect().width-375)/2+"px",t.style.zIndex="1000001";var n=document.createElement("div");n.style.height="50px",n.style.width="187px",n.style.bottom="0px",n.style.left="0px",n.style.position="absolute",n.style.background="url(https://messenger.ngageics.com/ImageRetrievers/PopupButtons.aspx?websiteid="+WebsiteID+"&type=yes)",n.style.backgroundPosition="bottom",n.style.backgroundRepeat="no-repeat";var a=document.createElement("div");function o(){t.parentNode.removeChild(t),e.parentNode.removeChild(e),setNgageCookie("NgageAutoPopup","false",120)}a.style.background="url(https://messenger.ngageics.com/ImageRetrievers/PopupButtons.aspx?websiteid="+WebsiteID+"&type=no)",a.style.backgroundPosition="bottom",a.style.backgroundRepeat="no-repeat",a.style.height="50px",a.style.width="188px",a.style.bottom="0px",a.style.position="absolute",a.style.right="0px",t.appendChild(n),t.appendChild(a),n.style.cursor="pointer",a.style.cursor="pointer",document.getElementsByTagName("body")[0].appendChild(t),n.onclick=function(){AcceptAutoPopup(),o()},a.onclick=o,setTimeout(function(){t.style.visibility="visible",e.style.display="block"},1e4)}},ngage.customNgageLibrary.chatInvite.addYesOrNo=function(){var e=document.createElement("div");e.className="ngageMobileBar3",e.innerHTML="No Thanks",e.style.backgroundColor="#000000",e.style.color="#ffffff",document.getElementsByClassName("ngageMobileFloat")[0].appendChild(e),document.getElementById("ngageBoxClose").style.display="none",ngage.customNgageLibrary.appendNgageCSS(".ngageMobileBar{ font-size:24px !important; padding:.25em 1em!important;margin-left:0%!important; right:48%; width:auto!important; border: 3px white solid; } .ngageMobileBar3{ font-size:24px; cursor:pointer; padding:.125em .5em;text-align:center;border-radius:1em;margin-left:0%; left:53%; background-color:#000000; border:2px white solid;} ");var t=getComputedStyle(document.getElementsByClassName("ngageMobileBar")[0]).bottom;parseFloat(t.replace("px",""))<0?(ngage.customNgageLibrary.appendNgageCSS(".ngageText{padding-bottom:1.5em !important;} .ngageMobileBar3 { position:absolute;bottom:-1em;}"),e.onclick=function(){document.getElementsByClassName("ngageMobileFloat")[0].style.top="-500px",document.getElementsByClassName("liveChatFloatingButtonSpacer")[0].style.display="none",setNgageCookie("NgageAutoPopup","false",5)}):(ngage.customNgageLibrary.appendNgageCSS(".ngageText{padding-top:1.5em !important;} .ngageMobileBar3 { position:absolute;top:-1em;}"),e.onclick=function(){document.getElementsByClassName("ngageMobileFloat")[0].style.bottom="-500px",document.getElementsByClassName("liveChatFloatingButtonSpacer")[0].style.display="none",setNgageCookie("NgageAutoPopup","false",5)});var n=document.getElementsByClassName("ngageMobileBar2")[0];n&&((t=document.getElementsByClassName("ngageText")[0].getElementsByTagName("div"))[0]&&n.innerHTML.match("Charla")&&(t[t.length-1].innerHTML+="
Haga clic aqui por espanol.
"),n.style.display="none")};