function eabOpenPopup(){window.open('https://servizi2.inps.it/VirtualAgent/SGWeb/EABPluginChat?viewIcon=1&viewMode=overlay&windowPopup=1', 'Chat', 'width=400px, height=500px'); }if (!(typeof createElement ==='function')) {function createElement(element, attribute, inner){try {if(typeof(element) === "undefined"){return false;}if(typeof(attribute) === "undefined"){attribute = "";}if(typeof(inner) === "undefined"){inner = "";}var el = document.createElement(element);if(attribute.length > 1 && attribute[0] == "[" && attribute[attribute.length-1] == "]"){var posvalue = attribute.indexOf("[value:");if(posvalue!="-1"){var containervalue= attribute.substring(posvalue,attribute.length);attribute= attribute.substring(0,posvalue);el.setAttribute("value", containervalue.substring(7,containervalue.length-1));}var attr = attribute.split("][");attr[0] = attr[0].substr(1);attr[attr.length-1] = attr[attr.length-1].substr(0,attr[attr.length-1].length-1);for(var k = 0, len = attr.length; k < len; k++){var el_attr,el_attr_val="",ind=attr[k].indexOf(":");if(ind > 0){el_attr = attr[k].substr(0,ind);el_attr_val = attr[k].substr(ind+1);}else{el_attr = attr[k].substr(0);}el.setAttribute(el_attr,el_attr_val);}}if(Array.isArray(inner)){for(var k = 0;k < inner.length;k++){if(inner[k].tagName){el.appendChild(inner[k]);}else{if(!isIEBrowser()||DetectV_IE()>=9){el.innerHTML += inner[k];}else{el.innerText +=inner[k];}}}}else{if(inner.tagName){el.appendChild(inner);}else if(inner!=""){if(!isIEBrowser()||DetectV_IE()>=9){el.innerHTML = inner;}else{if (el.styleSheet){el.styleSheet.cssText = inner;} else {el.innerText=inner;}}}}return el;}catch(ex){console.error(element + attribute + ex.message);}}} function checkIsVIrtualAgent(virtualAgentName){if(virtualAgentName.match(/^VAGENT01$/)) return true; else return false; }var elBody=null;try{elBody=document.querySelector('body');}catch(i){}if(!Array.isArray){Array.isArray = function (obj) {return Object.prototype.toString.call(obj) === "[object Array]";};}try{if (!('remove' in Element.prototype)) {Element.prototype.remove = function() {if (this.parentNode) {this.parentNode.removeChild(this);}};}}catch(I){}function isIEBrowser(){return false || !!document.documentMode; }function DetectV_IE(){if (window.ActiveXObject === undefined) return null;if (!document.querySelector) return 7;if (!document.addEventListener) return 8;if (!window.atob) return 9;if (!document.__proto__) return 10; return 11;}if (isIEBrowser()){if (DetectV_IE() == 8){if(!document.getElementsByClassName) {document.getElementsByClassName = function(className) {return this.querySelectorAll("." + className);};Element.prototype.getElementsByClassName = document.getElementsByClassName;}}}function addClass(el, classNameToAdd){el.className += ' ' + classNameToAdd;}function removeClass(el, classNameToRemove){var elClass = ' ' + el.className + ' ';while(elClass.indexOf(' ' + classNameToRemove + ' ') !== -1){elClass = elClass.replace(' ' + classNameToRemove + ' ', '');}el.className = elClass;}var querystring = window.location.search;var headBrowse = document.head || document.getElementsByTagName("head")[0];function css_span(property) {var span = document.createElement('span');span.className = 'fa';span.style.display = 'none';(document.body || document.getElementsByTagName("body")[0]).insertBefore(span, (document.body || document.getElementsByTagName("body")[0]).firstChild);var stat=window.getComputedStyle(span, null).getPropertyValue(property); if(stat=== 'FontAwesome'){stat= true;}else{stat=false;} (document.body || document.getElementsByTagName("body")[0]).removeChild(span);return stat;}var readyStateCheckInterval = setInterval(function() {if (document.readyState === "complete") {clearInterval(readyStateCheckInterval);addCssToHead();}}, 10);var lampBubble;if(!(typeof toggleChatView ==='function')) {function toggleChatView(){var chatUI = document.getElementById("Ixn_bot_webchat");if(chatUI.style.display == "none" || chatUI.style.display == "") {chatUI.style.display="block";try{document.getElementById("buttoncloseWClose").style.display="none";}catch(btncl){}try{if(document.getElementById("buttoncloseWOpen"))document.getElementById("buttoncloseWOpen").style.display="block";}catch(btncl){}try{document.getElementById("buttonicon").style.display="block";}catch(btnicn){}try{addClass(document.getElementById("buttonicon"),"open");}catch(btnicn){}}else{chatUI.style.display="none";try{document.getElementById("buttoncloseWClose").style.display="block";}catch(btncl2){}try{if(document.getElementById("buttoncloseWOpen"))document.getElementById("buttoncloseWOpen").style.display="none";}catch(btncl2){}try{document.getElementById("buttonicon").style.display="block";}catch(btnicn2){}try{removeClass(document.getElementById("buttonicon"),"open");}catch(btnicn){}}}}if(!(typeof ChatButton ==='function')) {function ChatButton() {this.toggleVisibility = toggleChatView;}}var Chat = new ChatButton();if(!(typeof hideBodyChat ==='function')) {function hideBodyChat(){try{var chatUI = document.getElementById("chat-flyout");if(chatUI.style.display == "none" || chatUI.style.display == "") {chatUI.style.display="block";try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").style.display="none";}catch(btncl){}try{document.getElementById("divcontainer").style.display="none";}catch(btncl){}try{document.getElementById("bubblepresent").style.display="none";}catch(btncl){}}else{chatUI.style.display="none";try{if(document.getElementById("chatTranscript").childNodes.length==0) {try{document.getElementById("divcontainer").style.display="block";}catch(btncl){}try{clearInterval(lampBubble); lampBubble=setInterval(function(){clearInterval(lampBubble);try{document.getElementById("bubblepresent").style.display="block";}catch(i){}},2000);}catch(i){}try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").style.display="block";}catch(btnicn2){}}}catch(i){}}}catch(i){}}}if(!(typeof hideOnlyBodyChat ==='function')) {function hideOnlyBodyChat(state){try{var chatUI = document.getElementById("chat-flyout");chatUI.style.display=state;try{document.getElementById("Ixn_bot_webchat").style.display=state;}catch(btncl){}}catch(i){}}}if(!(typeof hideOnlyIconChat ==='function')) {function hideOnlyIconChat(state){try{try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").style.display=state;}catch(btncl){}try{document.getElementById("divcontainer").style.display=state;}catch(btncl){}if(state=="block"){try{if(document.getElementById("chatTranscript").childNodes.length==0) {if(document.getElementById("bubblepresent").style.display!="block")try{clearInterval(lampBubble); lampBubble=setInterval(function(){clearInterval(lampBubble);try{document.getElementById("bubblepresent").style.display="block";}catch(i){}},2000);}catch(i){}}}catch(i){} }else {try{if(document.getElementById("chatTranscript").childNodes.length==0) {try{document.getElementById("bubblepresent").style.display=state;}catch(btncl){}}}catch(i){}}}catch(i){}}}if(!(typeof hideAllChat ==='function')) {function hideAllChat(){try{var chatUI = document.getElementById("chat-flyout");chatUI.style.display="none";try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").style.display="none";}catch(btncl){}try{document.getElementById("divcontainer").style.display="none";}catch(btncl){}try{document.getElementById("bubblepresent").style.display="none";}catch(btncl){}}catch(i){}}}var clickedFromButtonCloseChatBot=true;if(!(typeof checkPrivacySelected ==='function')) {function checkPrivacySelected(removeCheck){ if (document.getElementById('advert_C').getAttribute("checked")=="true") { if ($("#___advert_error").is(":visible")) { $("#___advert_error").hide(); }var __advert_c = document.createElement("i"); __advert_c.setAttribute("id","advert_C");if (css_span('font-family')) {try{__advert_c.setAttribute("class","advert_CF fa fa-check");}catch(i){}}else {try{__advert_c.setAttribute("class","advert_CF fa2 fa-check2");}catch(i){}}document.getElementById("advert_C").parentNode.removeChild(document.getElementById("advert_C"));document.getElementById("advert_CI").parentNode.removeChild(document.getElementById("advert_CI"));jQuery(__advert_c).insertBefore("#advert_l");}else{if ($("#___advert_error").is(":hidden") && !(document.getElementById("advert_C").nodeName=="I" || document.getElementById("advert_C").nodeName=="i")){if(jQuery("#chat-flyout").is(":visible") && jQuery("#chatTranscript").children().length==0){$("#___advert_error").show(); }else{$("#___advert_error").hide(); }}}if(removeCheck)$("#___advert_error").hide(); try{eabShowAdvertError()}catch(i){}}}if(!document.getElementById("_stylecssfonts")) {var _stylecssfonts= createElement("link", "[id:_stylecssfonts][rel:stylesheet][type:text/css][href:https://servizi2.inps.it/VirtualAgent/eab-resources/css/fontormal.css?1784679079]", "");(document.head || document.getElementsByTagName("head")[0]).appendChild(_stylecssfonts);}function addJQueryToHead(){if (document == null) return;if (document == undefined) return;if(!document.getElementById("_jss_jqy") ) {var jsque = document.createElement("script");jsque.type = "text/javascript";if(jsque.addEventListener) {jsque.addEventListener("readystatechange ",ixnToHead(),false);}else if(jsque.attachEvent) {jsque.attachEvent("readystatechange",ixnToHead());}else if(jsque.readyState) {jsque.onreadystatechange=ixnToHead();}jsque.src = "https://servizi2.inps.it/VirtualAgent/SGWeb/js/jquery-1.12.4.min.js?1784679079";headBrowse.insertBefore(jsque,headBrowse.firstChild)}else{ixnToHead();}}function ixnToHead() {if(!document.getElementById("progressScript") ) {var jsp = document.createElement("script");jsp.type = "text/javascript";jsp.id = "progressScript";jsp.src = "https://servizi2.inps.it/VirtualAgent/SGWeb/js/progressbar.min.js?1784679079";headBrowse.appendChild(jsp);}else{return false;} var ty=setInterval(function(){clearInterval(ty);addIxnToHead();},1500); }function addIxnToHead(){if (document == null) return;if (document == undefined) return;if(!document.getElementById("_IndraIxnLib")) {var _jss_gen = document.createElement("script");_jss_gen.type = "text/javascript";if(_jss_gen.addEventListener) {_jss_gen.addEventListener("load",addChatToBody(),false);}else if(_jss_gen.attachEvent) {_jss_gen.attachEvent("load",addChatToBody());}else if(_jss_gen.readyState) {_jss_gen.onreadystatechange=addChatToBody();}_jss_gen.id = "_IndraIxnLib";_jss_gen.src = "https://servizi2.inps.it/VirtualAgent/SGWeb/js/ixnmanager.js?1784679079";headBrowse.appendChild(_jss_gen); }else {return;}}function addCssToHead(){if (document == null) return;if (document == undefined) return;if(!document.getElementById("_stylecss0")) {var _stylecss0 = createElement("link", "[id:_stylecss0][rel:stylesheet][type:text/css][href:https://servizi2.inps.it/VirtualAgent/eab-resources/css/bigINPS.css?1784679079][media:screen and (min-width: 668px) and (min-height: 441px)]", "");headBrowse.appendChild(_stylecss0);}else {return;}if(!document.getElementById("_stylecss1")) {var _stylecss1 = createElement("link", "[id:_stylecss1][rel:stylesheet][type:text/css][href:https://servizi2.inps.it/VirtualAgent/eab-resources/css/mobileIphoneSE.css?1784679079][media:screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)]", "");headBrowse.appendChild(_stylecss1);}else {return;}if(!document.getElementById("_stylecss2")) {var _stylecss2 = createElement("link", "[id:_stylecss2][rel:stylesheet][type:text/css][href:https://servizi2.inps.it/VirtualAgent/eab-resources/css/iphone6landscape.css?1784679079][media:screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape)]", "");headBrowse.appendChild(_stylecss2);}else {return;}if(!document.getElementById("_stylecss3")) {var _stylecss3 = createElement("link", "[id:_stylecss3][rel:stylesheet][type:text/css][href:https://servizi2.inps.it/VirtualAgent/eab-resources/css/mobileIphoneSE.css?1784679079][media:only screen and (max-width : 667px)]", "");headBrowse.appendChild(_stylecss3);}else {return;}if(!document.getElementById("_stylecss4")) {var _stylecss4 = createElement("link", "[id:_stylecss4][rel:stylesheet][type:text/css][href:https://servizi2.inps.it/VirtualAgent/eab-resources/css/iphone6landscape.css?1784679079][media:screen and (min-width: 375px) and (max-height: 440px)]", "");headBrowse.appendChild(_stylecss4);}else {return;}if(!document.getElementById("_stylecss5")) {var _stylecss5 = createElement("link", "[id:_stylecss5][rel:stylesheet][type:text/css][href:https://servizi2.inps.it/VirtualAgent/eab-resources/css/iphone6landscapemin.css?1784679079][media:screen and (min-width: 375px) and (max-height: 60px)]", "");headBrowse.appendChild(_stylecss5);}else {return;}var _stylefontAwe = createElement("link", "[rel:stylesheet][id:putFontAwes][href:https://servizi2.inps.it/VirtualAgent/SGWeb/css/font-awesome.min.css]", "");if (!(css_span('font-family'))) {headBrowse.appendChild(_stylefontAwe);}addJQueryToHead();}function addChatToBody(){if (document == null) return;if (document == undefined) return;var _close = createElement("div", "[id:realclose][class:close]", "X");var _title = createElement("div", "[class:title]", "");var __advert_p = document.createElement("p"); __advert_p.setAttribute("id","advert_P"); __advert_p.setAttribute("class","advert_P"); __advert_p.setAttribute("tabIndex","0"); __advert_p.insertAdjacentHTML("afterbegin","Ai sensi del codice privacy, ti informiamo che tutti i dati personali che ti riguardano saranno trattati esclusivamente per le finalità del servizio e nel rispetto delle previsioni di legge. Un'informativa più dettagliata è consultabile qui");var __advert_m = document.createElement("p"); __advert_m.setAttribute("id","advert_M"); __advert_m.setAttribute("class","advert_M"); __advert_m.setAttribute("style","display:none"); __advert_m.setAttribute("tabIndex","0"); __advert_m.insertAdjacentHTML("afterbegin","Al fine di valutare la soddisfazione dei nostri utenti, ti proponiamo una breve e semplice domanda. La tua risposta ci aiuta a migliorare la qualità dei nostri servizi!");var __advert_c = document.createElement("input"); __advert_c.setAttribute("id","advert_C"); __advert_c.setAttribute("class","advert_C"); __advert_c.setAttribute("type","checkbox"); __advert_c.setAttribute("style","display:none");var __advert_cI = document.createElement("i"); __advert_cI.setAttribute("id","advert_CI"); __advert_cI.setAttribute("tabIndex","0");if (css_span('font-family')) {try{__advert_cI.setAttribute("class","advert_CI fa fa-check");}catch(i){}}else {try{__advert_cI.setAttribute("class","advert_CI fa2 fa-check2");}catch(i){}}var __advert_l = document.createElement("label"); __advert_l.setAttribute("id","advert_l"); __advert_l.setAttribute("class","advert_l"); __advert_l.setAttribute("tabIndex","0"); __advert_l.insertAdjacentHTML("afterbegin","Dichiaro di aver preso visione dell'informativa");var __advert_error = document.createElement("div"); __advert_error.setAttribute("id","___advert_error"); __advert_error.setAttribute("style","display:none"); __advert_error.setAttribute("class","advert_error");var __advert_error_label = document.createElement("label"); __advert_error_label.setAttribute("class","advert_l advert_error"); __advert_error_label.setAttribute("id","___advert_error_label"); __advert_error_label.setAttribute("tabIndex","0"); __advert_error_label.insertAdjacentHTML("afterbegin","Il consenso alla privacy è obbligatorio"); __advert_error.appendChild(__advert_error_label).insertAdjacentHTML("afterend","
");var _div_advert= createElement("div", "[class:advert_DIV Unknown][id:advert_DIV]", [__advert_p,__advert_m,__advert_cI,__advert_c,__advert_l,__advert_error]);var __form_lbl_n_spn = createElement("span", "", "Nome");var __form_lbl_n_inp = createElement("input", "[name:NAME][value:]", "");var __form_lbl_n = createElement("label", "[class:formLabel]", [__form_lbl_n_spn, __form_lbl_n_inp]);var __form_lbl_c_spn = createElement("span", "", "Cognome");var __form_lbl_c_inp = createElement("input", "[name:SURNAME][value:]", "");var __form_lbl_c = createElement("label", "[class:formLabel]", [__form_lbl_c_spn, __form_lbl_c_inp]);var __form_lbl_sub_spn = createElement("span", "", "* Argomento");var __form_lbl_sub_inp = createElement("input", "[name:service][value:]", "");var __form_lbl_sub = createElement("label", "[class:formLabel]", [__form_lbl_sub_spn, __form_lbl_sub_inp]);var __form_submit = createElement("button", "[id:btnStartChat][name:btnStartChat][class:submit]", "Avvia Chat");var __form_startChat = createElement("input", "[id:sentenceStartChat][name:sentenceStartChat][type:hidden][value:]", "");var __form_endChat = createElement("input", "[id:sentenceEndChat][name:sentenceEndChat][type:hidden][value:]", "");var __form_msg_pre_ag_typing = createElement("input", "[id:sentencePreAgentTyping][name:sentencePreAgentTyping][type:hidden][value:]", "");var __form_msg_post_ag_typing = createElement("input", "[id:sentencePostAgentTyping][name:sentencePostAgentTyping][type:hidden][value: sta scrivendo ...]", "");var __form_msg_is_ag_typing = createElement("input", "[id:isSentenceAgentTyping][name:isSentenceAgentTyping][type:hidden][value:true]", "");var __form_msgAConnPrefix = createElement("input", "[id:sentenceAgentConnectedPrefix][name:sentenceAgentConnectedPrefix][type:hidden][value:Ciao sono ]", "");var __form_msgAConn = createElement("input", "[id:sentenceAgentConnected][name:sentenceAgentConnected][type:hidden][value:, in cosa posso esserti utile?]", "");var __form_msgADisconn = createElement("input", "[id:sentenceAgentDisconnected][name:sentenceAgentDisconnected][type:hidden][value:disconnesso]", "");var __form = createElement("div", "[id:validationForm][class:form]", [__form_lbl_n, __form_lbl_c, __form_lbl_sub, __form_submit]);var _span_error = createElement("span", "[class:name]","");var _p_error = createElement("p","[class:system][style:display:block;]",[_span_error, 'Errore validazione parametri']);var _errorVal = createElement("div", "[id:validationError][class:validationError][style:display:none;]", [_p_error]);var _trans = createElement("div", "[id:chatTranscript][class:transcript Unknown]", "");var _boxChatSample = createElement("div", "[id:boxChatSample][class:boxChatSample]", [_trans,_errorVal]);var _input_txt = createElement("textarea", "[id:sendTextChat][class:input][tabIndex:0][placeholder:Digita qui la tua richiesta][aria-label:Digita qui la tua richiesta]", "");var _p_txt = createElement("p", "[id:sendTextPChat][class:input][tabIndex:0][placeholder:Digita qui la tua richiesta][aria-label:Digita qui la tua richiesta][contenteditable:true][style:display:none]", "");var _input_hidemsgStartFail = createElement("input", "[type:hidden][id:stringsStartFail][readonly:readonly][value:Si è verificato un problema di connessione, purtroppo la sessione di chat non può proseguire. Ti invito a riprovare in un secondo momento. Grazie e arrivederci!]", "");var _input_hidemsgBrokeWebGateway = createElement("input", "[type:hidden][id:txtBrokeWG][readonly:readonly][value:Si è verificato un problema di connessione, purtroppo la sessione di chat non può proseguire. Ti invito a riprovare in un secondo momento. Grazie e arrivederci!]", "");var _input_hidemsgTmt1WG = createElement("input", "[type:hidden][id:tmt1WG][readonly:readonly][value:10]", "");var _input_hidemsgTmt2WG = createElement("input", "[type:hidden][id:tmt2WG][readonly:readonly][value:10]", "");var _input_btn = createElement("button", "[id:sendBTextChat][tabIndex:0][class:send opac]", "Invia");var _input_stateC = createElement("input", "[type:hidden][id:stateConnectedagg]", "");var _input_btn_S = createElement("button", "[id:sendSTextChat][tabIndex:0][class:sendSurvey opac]", "Invia");var _input_btn_Save = createElement("button", "[id:input_btn_Save][tabindex:0][class:sendSaveLeft][onclick:CopyChatClipboard()][style:display:none]", "Salva Chat");var _input_closeChatBot = createElement("button", "[type:hidden][tabindex:0][id:closeChatBottom][class:closeChatBot][style:display:none][onclick:clickedFromButtonCloseChatBot=false;try{document.getElementById(\"CLOSEFROMCLIENT\").click();try{document.getElementById(\"___advert_error\").style.display=\"none\"}catch(i){}}catch(i){try{document.getElementById(\"___advert_error\").style.display=\"none\"}catch(i){}}]", "Chiudi Chat");var _input_nck_web = createElement("input", "[type:hidden][id:nickWeb][readonly:readonly][value:Tu]", "");var _input_nck_wde = createElement("input", "[type:hidden][id:nickWde][readonly:readonly][value:Cliente]", "");var _input_urlRs = createElement("input", "[type:hidden][id:urlRs][readonly:readonly][value:https://servizi2.inps.it/VirtualAgent/eab-resources/]", "");var _input_min_char = createElement("input", "[type:hidden][id:minChar][readonly:readonly][value:1]", "");var _input_btnS = createElement("input", "[type:hidden][id:sendSpecialBot][class:sendTbot]", "");var _input_hidBOT = createElement("input", "[type:hidden][id:scriptvaluer][class:scriptvaluer][readonly:readonly][value:1]", "");var _input_hiddivimage = createElement("input", "[type:hidden][id:divimage][readonly:readonly]", "");var _input_hidnameagent = createElement("input", "[type:hidden][id:nameagent][readonly:readonly]", "");var _input_hidfixeddiv = createElement("input", "[type:hidden][id:fixeddiv][readonly:readonly]", "");var _input_hidchatsubmit = createElement("input", "[type:hidden][id:chatsubmit][readonly:readonly]", "");var _input_hidtime = createElement("input", "[type:hidden][id:timemsg][readonly:readonly]", "");var _input_hidtimeABfr = createElement("input", "[type:hidden][id:timemsgABfr][readonly:readonly][value:[]", "");var _input_hidtimeAAFt = createElement("input", "[type:hidden][id:timemsgAAft][readonly:readonly][value:]]", "");var _input_hidtimeUBfr = createElement("input", "[type:hidden][id:timemsgUBfr][readonly:readonly][value:[]", "");var _input_hidtimeUAft = createElement("input", "[type:hidden][id:timemsgUAft][readonly:readonly][value:]]", "");var _input_hidtpolCha = createElement("input", "[type:hidden][id:polltmtChat][readonly:readonly][value:3000]", "");var _input_hidtpolSuv = createElement("input", "[type:hidden][id:polltmtSurv][readonly:readonly][value:500]", "");var _input_hidAname = createElement("input", "[type:hidden][id:nameAft][readonly:readonly][value::]", "");var _input_hidATname = createElement("input", "[type:hidden][id:TextnameAgent][readonly:readonly][value:Arianna]", "");var _input_hidUname = createElement("input", "[type:hidden][id:nameUft][readonly:readonly][value::]", "");var _input_hidUTname = createElement("input", "[type:hidden][id:TextnameUser][readonly:readonly][value:Io]", "");var _input_pushurl = createElement("input", "[type:hidden][id:pushurl][readonly:readonly]", "");var _input_cookie = createElement("input", "[type:hidden][id:EABnameCookie][readonly:readonly][value:wctisessid]", "");var _input_cookie_path = createElement("input", "[type:hidden][id:EABseparatorCookie][readonly:readonly][value:&]", "");var _input_cookie_sepa = createElement("input", "[type:hidden][id:EABpathCookie][readonly:readonly][value:/]", "");var _input_cookie_date = createElement("input", "[type:hidden][id:EABdateCookie][readonly:readonly][value:6000]", "");var _input_cookie_startses = createElement("input", "[type:hidden][class:startSess][id:startSessId][readonly:readonly]", "");var _input_cookie_stoptses = createElement("input", "[type:hidden][class:stopSess][id:stopSess][readonly:readonly]", "");var _input_msgfinal = createElement("input", "[type:hidden][id:input_msgfinal][readonly:readonly]", "");var _input_nableOnSafari = createElement("input", "[type:hidden][id:changeFastCSS][readonly:readonly][value:https://servizi2.inps.it/VirtualAgent/eab-resources/css/ipadLandscape.css]", "");_input_nableOnSafari.setAttribute("class",_input_nableOnSafari.getAttribute('value'));var _input_charactherLI = createElement("input", "[type:hidden][id:breakCharLI][readonly:readonly]","●");try{ var _input_hidWmsg = createElement("input", "[type:hidden][id:hidWmsg][readonly:readonly][value:Mi dispiace, ora sono in fase di aggiornamento. Riprova più tardi.]", "");}catch(i){}var _sourceogg = createElement("source", "[type:audio/ogg][src:https://servizi2.inps.it/VirtualAgent/eab-resources/sounds/mixkit-correct-answer-tone-2870.ogg]", "");var _sourcemp3 = createElement("source", "[type:audio/mpeg][src:https://servizi2.inps.it/VirtualAgent/eab-resources/sounds/mixkit-correct-answer-tone-2870.mp3]", "");var _sourcewav = createElement("source", "[type:audio/wav][src:https://servizi2.inps.it/VirtualAgent/eab-resources/sounds/mixkit-correct-answer-tone-2870.wav]", "");var _sourceembed = createElement("embed", "[id:embedSound2][hidden:true][autostart:false][loop:false][style:display:none][src:https://servizi2.inps.it/VirtualAgent/eab-resources/sounds/mixkit-correct-answer-tone-2870.mp3]", "");var _sourceembed2 = createElement("audio", "[id:embedSound22][style:display:none]", [_sourceogg,_sourcemp3,_sourcewav,_sourceembed]);var _input_timenot = createElement("input", "[type:hidden][id:notificationTime][value:800000]", "");var _input_anim = createElement("input", "[type:hidden][id:animationTitleWeb][value:]", "");var _input_animBuble = createElement("input", "[type:hidden][id:animationTitleBubble][value:Hai un nuovo messaggio!]", "");var _input = createElement("div", "[class:input-container fixedDiv][id:input-container]", [_input_txt,_p_txt,_input_nck_web,_input_nck_wde,_input_min_char,_input_urlRs,_input_btn_S,_input_btn_Save,_input_closeChatBot,_input_btnS,_input_hidBOT,_input_hiddivimage,_input_hidnameagent,_input_hidfixeddiv,_input_hidchatsubmit,_input_hidtime,_input_hidtimeABfr,_input_hidtimeAAFt,_input_hidtimeUBfr,_input_hidtimeUAft,_input_hidtpolCha,_input_hidtpolSuv,_input_hidAname,_input_hidATname,_input_hidUname,_input_hidUTname,_input_pushurl,_input_cookie,_input_cookie_date,_input_cookie_path,_input_cookie_sepa,_input_cookie_startses,_input_cookie_stoptses,_input_msgfinal,_input_nableOnSafari,_input_charactherLI,_input_hidWmsg,_sourceembed2,_input_timenot,_input_anim,_input_animBuble,_input_btn,_input_stateC,_input_hidemsgStartFail,_input_hidemsgBrokeWebGateway,_input_hidemsgTmt1WG,_input_hidemsgTmt2WG,]);var _typen = createElement("div", "[class:isTyping][id:isTyping]", "");var _headDiv = createElement("div", "[class:headerdiv][id:headerdiv]", [_close, _title]);var chat_ixn = createElement("div", "[id:Ixn_bot_webchat][class:ChatUI]", [_headDiv,_div_advert,__form, _boxChatSample, _input, _typen, __form_startChat,__form_endChat,__form_msg_pre_ag_typing,__form_msg_post_ag_typing,__form_msg_is_ag_typing,__form_msgAConn,__form_msgAConnPrefix,__form_msgADisconn]);var _img_copyClipboard = createElement("i", "[class:copyClipBoardIcon][tabIndex:0][onkeypress:Javascript:if(event.keyCode==13)this.click()][id:copyClipBoardIcon][onclick:CopyChatClipboard()][style:display:none]", "");if (css_span('font-family')) {try{_img_copyClipboard.setAttribute("class","copyClipBoardIconFa fa fa-download");}catch(i){}}else {try{_img_copyClipboard.setAttribute("class","copyClipBoardIconFa fa2 fa-download2");}catch(i){}}var _but_icon = createElement("div", "[class:buttonicon open][onkeypress:eabShowWindow(false);eabShowIcon(true)][id:buttonicon][tabIndex:0][onClick:eabShowWindow(false);eabShowIcon(true)]", "_");var _but_survey = createElement("div", "[class:survey][tabIndex:0][id:CLOSEFROMCLIENT]", "X");var _flyout_button = createElement("button", "[id:flyout-btn-right][class:flyout-btn-bottom-right][tabIndex:0]","Assistente virtuale");var table_td = createElement("td", "",[_flyout_button,_img_copyClipboard,_but_icon,_but_survey]);var table_tr = createElement("tr", "",[table_td]);var _table = createElement("table", "[class:tablebtn Unknown][id:tablebtn]",[table_tr]);var _flyout_div = createElement("div", "[id:chat-flyout][class:flyout-bottom-right]", [_table, chat_ixn]);if(!document.getElementById("chat-flyout")) {(document.body || document.getElementsByTagName("body")[0]).appendChild(_flyout_div)}var but_diag=createElement("button", "[id:btn_closeDialog][class:close][onclick:hideOverlayEAB(false)]", "×");var h1_diag=createElement("h1", "[class:modal_title]", "Servizio Assistente virtuale");var div_header=createElement("div", "[class:modal_header]", [but_diag,h1_diag]);var div_modal_body=createElement("div", "[id:eab_modal_body][class:modal_body]", "");var div_modal_content_large=createElement("div", "[class:modal_content_large]", [div_header,div_modal_body]);var div_modal_dialogInps=createElement("div", "[class:modal_dialogEab]", [div_modal_content_large]);var div_modalEab=createElement("div", "[id:modal_service_Eab][class:modalEab centerGeneral][style:display:none][onclick:hideOverlayEAB(false)]", [div_modal_dialogInps]);var div_modalEabOverlay=createElement("div", "[id:modalEabOverlay][class:modalEabOverlay centerGeneral][style:display:none][onclick:document.getElementById('modal_service_Eab').click()]", "");div_modalEab.addEventListener("keypress", function(event) { if (event.keyCode == 13) {hideOverlayEAB(false);}});(document.body || document.getElementsByTagName("body")[0]).appendChild(div_modalEab);(document.body || document.getElementsByTagName("body")[0]).appendChild(div_modalEabOverlay);if(!document.getElementById("scrollscript")) {var js = document.createElement("script");js.type = "text/javascript";js.id = "scrollscript";js.src = "https://servizi2.inps.it/VirtualAgent/SGWeb/js/jquery.nicescroll.min.3_7_6.js?1784679079";headBrowse.appendChild(js);}if(!document.getElementById("blobDependency")) {var blb = document.createElement("script");blb.type = "text/javascript";blb.id = "blobDependency";blb.src = "https://servizi2.inps.it/VirtualAgent/SGWeb/js/blob.js?1784679079";headBrowse.appendChild(blb);}if(!document.getElementById("saveFileScript")) {var fls = document.createElement("script");fls.type = "text/javascript";fls.id = "saveFileScript";fls.src = "https://servizi2.inps.it/VirtualAgent/SGWeb/js/filesaver.js?1784679079";headBrowse.appendChild(fls);}} function insertAfter(referenceNode, newNode) { referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); } function putText(txt,sTxt) { document.getElementById("sendSpecialBot").value=txt; document.getElementById("sendSpecialBot").setAttribute("specialText",sTxt); document.getElementById("sendSpecialBot").click(); } function sendSpecialEab(el,txt,txt2) { var f=el.parentElement,t; for(var j=0;j0?"true":"false");var arr=res.split(document.getElementById("EABseparatorCookie").value,5);if(arr.length>1){res=arr[0]+document.getElementById("EABseparatorCookie").value+state+document.getElementById("EABseparatorCookie").value+arr[2]+document.getElementById("EABseparatorCookie").value+s+document.getElementById("EABseparatorCookie").value+childPres;setCookieChat(res);}}else{setCookieChat(""+document.getElementById("EABseparatorCookie").value+state+document.getElementById("EABseparatorCookie").value+"none"+document.getElementById("EABseparatorCookie").value+s+document.getElementById("EABseparatorCookie").value+childPres);}try{document.getElementById("divcontainer").style.display=state;}catch(btncl){}try{clearInterval(lampBubble);}catch(i){} if(state=="block"){var sa=(document.getElementById("chatTranscript").childNodes.length==0?true:false);if(sa) {try{clearInterval(lampBubble); lampBubble=setInterval(function(){clearInterval(lampBubble);if(!msgFromRead && $("#boxChatSample").find("[view=\"false\"]").length==0){try{document.getElementById("bubblepresent").style.display="block";}catch(i){}}},2000);}catch(i){}}else {if($("#boxChatSample").find("[view=\"false\"]").length>0){try {msgFromRead=true;if(typeof document.getElementById("animationTitleBubble") ==="object" && typeof window.oeasybotWebChatInstance ==="object"){document.getElementById("bubblepresent").setAttribute("oldvalue",$("#bubblepresent").html());$("#bubblepresent").html(document.getElementById("animationTitleBubble").value);clearInterval(lampBubble);lampBubble=setInterval(function(){clearInterval(lampBubble);try{document.getElementById("bubblepresent").style.display="none";}catch(i){}},2000);}}catch(i){}}} } else{try{document.getElementById("bubblepresent").style.display="none";}catch(gad){}}if(state == "block"){clearInterval(intRot);var loopTimes=2,volte=1;contAnimation=0;if(msgFromRead) volte+=2; intRot=setInterval(function(msgFromRead,loopTimes){if(typeof circle_init==='function'){circle.set(0);circle_init(msgFromRead)}if(!msgFromRead){contAnimation=loopTimes+3;}else contAnimation++;if(contAnimation>=loopTimes){clearInterval(intRot);if(msgFromRead)setTimeout(function(){try{document.getElementById("bubblepresent").style.display="block";}catch(gad){}},2000);}},(1000*volte),msgFromRead,loopTimes);}else {if(typeof circle_init==='function')circle.set(0);if(document.getElementById("bubblepresent").getAttribute("oldvalue")!=null){$("#bubblepresent").html(document.getElementById("bubblepresent").getAttribute("oldvalue"));document.getElementById("bubblepresent").removeAttribute("oldvalue");$("#boxChatSample").find("[view=\"false\"]").removeAttr("view");}}}catch(u){}}function sleepThreads(seconds) {var e = new Date().getTime() + (seconds * 1000);while (new Date().getTime() <= e) {}}var contAnimation=0;function enableWindowChat() {auto_submit = false;var nt=0,mxT=10;var ChSess="null";try{var inputT=document.createElement("input");inputT.setAttribute("type","hidden");inputT.setAttribute("class","sendSession");inputT.setAttribute("id","sendSessionId");document.getElementById("input-container").appendChild(inputT);}catch(i){}if(ChSess!=null && ChSess!="null" && document.getElementById("EABnameCookie")){var arr=ChSess.split(document.getElementById("EABseparatorCookie").value,5);if (typeof arr !== 'undefined') {if(arr.length>1 && arr[0].length>10){try{document.getElementById("sendSessionId").setAttribute("value",arr[0]);}catch(i){}}}}while(true) {try {if(!isIEBrowser()){window.oeasybotWebChatInstance = new window.easybotWebChat({"userData":{"ClientIP" : "172.20.16.87", "UserAgent" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)", "DeviceType" : "Unknown", "SessionID" : "null", "UrlReferrer" : "null","VersionScript" : "0.1"},"transport":"pre","tenantName":"IxnManager","WebGateway":"https://servizi2.inps.it/VirtualAgent/WebGateway/gateway","clientType":"webapi2","service_id":"inpsprod","endpoint":"chat_IXN","id":"IxnManager","dataURL":"https://servizi2.inps.it/VirtualAgent/SGWeb/Ixnwebapi","template":"#Ixn_bot_webchat","title":"Assistenza"});break;}else{if(DetectV_IE()>=9){window.oeasybotWebChatInstance = new window.easybotWebChat({"userData":{"ClientIP" : "172.20.16.87", "UserAgent" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)", "DeviceType" : "Unknown", "SessionID" : "null", "UrlReferrer" : "null","VersionScript" : "0.1"},"transport":"pre","tenantName":"IxnManager","WebGateway":"https://servizi2.inps.it/VirtualAgent/WebGateway/gateway","clientType":"webapi2","service_id":"inpsprod","endpoint":"chat_IXN","id":"IxnManager","dataURL":"https://servizi2.inps.it/VirtualAgent/SGWeb/Ixnwebapi","template":"#Ixn_bot_webchat","title":"Assistenza"});break;}else{var t = window;t.oeasybotWebChatInstance = new t.easybotWebChat({"userData":{"ClientIP" : "172.20.16.87", "UserAgent" : "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)", "DeviceType" : "Unknown", "SessionID" : "null", "UrlReferrer" : "null","VersionScript" : "0.1"},"transport":"pre","tenantName":"IxnManager","WebGateway":"https://servizi2.inps.it/VirtualAgent/WebGateway/gateway","clientType":"webapi2","service_id":"inpsprod","endpoint":"chat_IXN","id":"IxnManager","dataURL":"https://servizi2.inps.it/VirtualAgent/SGWeb/Ixnwebapi","template":"#Ixn_bot_webchat","title":"Assistenza"});break;}}}catch(r){nt=nt+1;if (nt == mxT)throw 'Errore caricamento plugin';}}if (typeof arr !== 'undefined' && arr[0].length>10) {try{setTimeout(function() {document.getElementById("sendSessionId").click();}, 2000);}catch(o){}}else{document.getElementById("Ixn_bot_webchat").setAttribute("onclick","checkPrivacySelected(false)"); }document.getElementById("divcontainer").addEventListener('focus', function(e){circle_hover_in();});document.getElementById("divcontainer").addEventListener('blur', function(event) {circle_hover_out();});document.getElementById("divcontainer").addEventListener("keypress", function(event) { if (event.keyCode == 13) {document.getElementById("divcontainer").click();var taa=setInterval(function(){if(document.getElementById("chat-flyout").style.display=="block" || document.getElementById("modal_service_Eab").style.display=="block") { clearInterval(taa);if(document.getElementById("modal_service_Eab").style.display=="block")taa=setInterval(function(){clearInterval(taa);document.getElementById("eab_modal_body").focus();},800);else if(document.getElementById("chat-flyout").style.display=="block")taa=setInterval(function(){clearInterval(taa);addClass(document.getElementById("advert_P"),"focusElement");document.getElementById("advert_P").focus();},800);}},1000);}});}function eabShowAdvertError(){var res =readCookieChat();var s="none",childPres="false";if(res!=null){s=$("#___advert_error").css("display");if(s.match(/block|BLOCK/))s="block";elses="none";childPres=(document.getElementById("chatTranscript").childNodes.length>0?"true":"false");var arr=res.split(document.getElementById("EABseparatorCookie").value,5);if(arr.length>1){res=arr[0]+document.getElementById("EABseparatorCookie").value+arr[1]+document.getElementById("EABseparatorCookie").value+arr[2]+document.getElementById("EABseparatorCookie").value+s+document.getElementById("EABseparatorCookie").value+childPres;setCookieChat(res);}}var fxd=setInterval(function(){clearInterval(fxd);try{fixedChat()}catch(i){}},100);}function eabShowWindow(state){try{var inverState;if (state){state="block";try{circle.set(0)}catch(i){}}else{state="none";}var res =readCookieChat();var s="none",childPres="false";if(res!=null){s=$("#___advert_error").css("display");if(s.match(/block|BLOCK/))s="block";elses="none";if(clickedFromButtonCloseChatBot==false && state.localeCompare("block")==0) {document.getElementById("___advert_error").style.display="none";s="none";clickedFromButtonCloseChatBot=true;}childPres=(document.getElementById("chatTranscript").childNodes.length>0?"true":"false");var arr=res.split(document.getElementById("EABseparatorCookie").value,5);if(arr.length>1){res=arr[0]+document.getElementById("EABseparatorCookie").value+arr[1]+document.getElementById("EABseparatorCookie").value+state+document.getElementById("EABseparatorCookie").value+s+document.getElementById("EABseparatorCookie").value+childPres;setCookieChat(res);}}else{setCookieChat(""+document.getElementById("EABseparatorCookie").value+"none"+document.getElementById("EABseparatorCookie").value+state+document.getElementById("EABseparatorCookie").value+s+document.getElementById("EABseparatorCookie").value+childPres);}try{clearInterval(lampBubble);}catch(i){} divWindowState(state);if(state.match(/block|BLOCK/))var fxd=setInterval(function(){clearInterval(fxd);try{fixedChat()}catch(i){} scrollTranscriptUpdate(0);},1000);if(state) createEventIn((document.body || document.getElementsByTagName("body")[0]),"keydown",callBackPress);}catch(u){}}var callBackPress= function(event){detectCharacterforCloseWindow(event);};function detectCharacterforCloseWindow(evt) {evt = evt || window.event;if (evt.keyCode ==27) {try{console.log("DETECTED");eabShowWindow(false);eabShowIcon(true);}catch(i){}(document.body || document.getElementsByTagName("body")[0]).removeEventListener("onkeydown",callBackPress,false);(document.body || document.getElementsByTagName("body")[0]).removeEventListener("keydown",callBackPress,false);try{changeCssonSafari(false);}catch(i){}}} function divWindowState(state) {var auto_submit = false;var inverState;if (state==="block"){state="block";inverState="none"; }else{state="none";inverState="block";}if (auto_submit){try{document.getElementById("chat-flyout").style.display=state;}catch(E){document.getElementById("Ixn_bot_webchat").style.display=state;}try{document.getElementById("Ixn_bot_webchat").style.display=state;}catch(E){}try{if(document.getElementById("validationError"))document.getElementById("validationError").remove();}catch(valel){}try{if(document.getElementById("buttoncloseWOpen"))document.getElementById("buttoncloseWOpen").style.display=state;}catch(btncl){}try{document.getElementById("buttonicon").style.display=state;}catch(btncl){}if(inverState=="block"){var sa=((document.getElementById("chatTranscript").childNodes.length==0)?"active_loop":"");try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem "+sa);}catch(i){}try{var lamp=setInterval(function(){clearInterval(lamp);try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem");}catch(i){}},5000);}catch(i){}}else{try{document.getElementById("bubblepresent").style.display=inverState;}catch(gad){}var sa=((document.getElementById("chatTranscript").childNodes.length==0)?"active_loop":"");try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem "+sa);}catch(i){}}}else{try{document.getElementById("chat-flyout").style.display=state;}catch(E){document.getElementById("Ixn_bot_webchat").style.display=state;}try{document.getElementById("Ixn_bot_webchat").style.display=state;}catch(E){}if(inverState=="block"){var sa=((document.getElementById("chatTranscript").childNodes.length==0)?"active_loop":"");try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem "+sa);}catch(i){}try{var lamp=setInterval(function(){clearInterval(lamp);try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem");}catch(i){}},5000);}catch(i){}}else{try{document.getElementById("bubblepresent").style.display="none";}catch(gad){}try{if(document.getElementById("iconImageChat")){document.getElementById("iconImageChat").style.display="none";document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem active_loop");}}catch(i){}}}try{if(document.getElementById("validationError"))document.getElementById("validationError").remove();}catch(Er){}}function createEventIn(element,type,callback) {try {element.addEventListener(type, callback, false);} catch (e) {element.attachEvent("on"+type, callback);}}function putObjectinDiv(){ var imgnew=document.createElement('img'); imgnew.setAttribute('src', 'https://servizi2.inps.it/VirtualAgent/eab-resources/Icon_b_to_w.svg');imgnew.setAttribute('class', 'imgnewicon pulseElem active_loop');imgnew.setAttribute('id','iconImageChat');imgnew.setAttribute('onclick','eabShowIcon(false);try{checkTimeChatBot()}catch(i){)}');var imgnew2=document.createElement('img'); imgnew2.setAttribute('src', 'https://servizi2.inps.it/VirtualAgent/eab-resources/Icon_b_to_w.svg');imgnew2.setAttribute('class', 'imgnewicon pulseElem active_loop');imgnew2.setAttribute('id','iconImageChat2');imgnew2.setAttribute('onclick','eabShowIcon(false);try{checkTimeChatBot()}catch(i){}');(document.body || document.getElementsByTagName("body")[0]).insertAdjacentHTML('beforeend', '
');var bubblepresent=document.createElement('p'); bubblepresent.setAttribute('id','bubblepresent');bubblepresent.setAttribute('class','bubblepresent');try{jQuery(document.getElementById("divcontainer")).after(bubblepresent);}catch(e){}try{jQuery(bubblepresent).html("Posso aiutarti
sull'accesso ai
servizi INPS?");}catch(ie8){}bubblepresent.setAttribute("tabIndex","0");try{clearInterval(lampBubble); lampBubble=setInterval(function(){try{if(document.getElementById("iconImageChat").style.display=="block" && document.getElementById("divcontainer").style.display=="block"){clearInterval(lampBubble);try{document.getElementById("bubblepresent").style.display="block";}catch(i){}}}catch(o){}},2000);}catch(i){}try{var lamp=setInterval(function(){clearInterval(lamp);try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem");}catch(i){}},5000);}catch(i){}try{jQuery(document.getElementById("iconImageChat")).bind('mouseover',function(event){jQuery(document.getElementById("iconImageChat")).prop('class','imgnewicon pulseElem active_loop');}).bind('mouseleave',function(){jQuery(document.getElementById("iconImageChat")).prop('class','imgnewicon pulseElem ');})}catch(i){}}function fixedChat(){try {var hd=0; if( document.getElementById("advert_DIV").style.display!="" && document.getElementById("advert_DIV").style.display.match(/^$|none/) )hd=0;else hd=$("#advert_DIV").outerHeight(true);var h=0; if($("body").height()>$("#chat-flyout").height()) h=$("#chat-flyout").outerHeight(true)-(hd+$("#input-container").outerHeight(true)); else h=$("#chat-flyout").height()-(hd+$("table.tablebtn").outerHeight(true)+$("#input-container").outerHeight(true));document.getElementById("boxChatSample").style.height=h+"px";}catch(i){}} var jqr = setInterval(function() { if (document.getElementById("boxChatSample") && typeof jQuery==='function') { clearInterval(jqr);jQuery(window).resize(function() {try{fixedChat();try{jQuery('#boxChatSample').getNiceScroll().resize();}catch(btnicn){}var res=setInterval(function(){clearInterval(res);try{fixedChat();scrollTranscriptUpdate(0);}catch(i){}},250);}catch(i){}});jQuery(window).on("orientationchange",function(){var ua = window.navigator.userAgent;var iOS = !!ua.match(/iPad/i);var webkit = !!ua.match(/WebKit/i);var iOSSafari = iOS && webkit && !ua.match(/CriOS/i) && !ua.match(/OPiOS/i) && !ua.match(/EdgiOS/i);if(iOSSafari && document.getElementById("changeFastCSS") && document.getElementById("chatTranscript").childNodes.length>0) { try{document.activeElement.blur();document.getElementById("sendTextChat").blur();document.getElementById("sendTextPChat").blur();}catch(i){}; if(window.matchMedia("(orientation: landscape)").matches){try{changeCssonSafari(false)}catch(i){}}else{try{changeCssonSafari(true)}catch(i){}}}});}}, 1500);function checkScrollBar(){try { if(document.getElementById("chatTranscript").clientHeight > document.getElementById("boxChatSample").clientHeight){ try{fixedChat();}catch(btnicn){}try{jQuery('#boxChatSample').getNiceScroll().resize().show();}catch(btnicn){}}else{try{jQuery('#boxChatSample').getNiceScroll().resize().hide();}catch(btnicn){}}}catch(i){}}function scrollonTranscript() {try {$("#boxChatSample").niceScroll({horizrailenabled:false,cursordragontouch: true,cursorcolor:"#f1f0ee",cursoropacitymax:"0.7",cursorcolor:"#f1f0ee",cursorwidth:"8",background:"none",autohidemode:"false"});}catch(st){} } function scrollTranscriptUpdate(h) {var height = document.getElementById("boxChatSample").scrollHeight - $('#boxChatSample').height();height += h;if(height>0) {var nice = $('#boxChatSample').getNiceScroll()[0];try{nice.resize();$('#boxChatSample').scrollTop($('#boxChatSample').prop('scrollHeight'));}catch(se){} } }function createCookie(name,value,days) {var pathCookie = document.getElementById("EABpathCookie").value;if (days) {var date = new Date();date.setTime(date.getTime() + (days * 24 * 60 * 60 *1000));var expires = "; expires=" + date.toGMTString();}else{var expires = "";}var strCookie = name + "=" + value + expires + "; path="+pathCookie+";domain=.inps.it";document.cookie = strCookie;}function insertIdInCookie(id) {var ris;ris=readCookieChat();if(ris!=null) {var arr=ris.split(document.getElementById("EABseparatorCookie").value,5);var s="none",childPres="false";if(arr.length>1) {s=$("#___advert_error").css("display");if(s.match(/block|BLOCK/))s="block";elses="none";if(clickedFromButtonCloseChatBot==false && state.localeCompare("block")==0) {document.getElementById("___advert_error").style.display="none";clickedFromButtonCloseChatBot=true;s="none";}childPres=(document.getElementById("chatTranscript").childNodes.length>0?"true":"false");ris=id+document.getElementById("EABseparatorCookie").value+arr[1]+document.getElementById("EABseparatorCookie").value+arr[2]+document.getElementById("EABseparatorCookie").value+s+document.getElementById("EABseparatorCookie").value+childPres;setCookieChat(ris);}}}function stateWindowIconCookie() {var ris;ris=readCookieChat();if(ris!=null) {var arr=ris.split(document.getElementById("EABseparatorCookie").value,5);if(arr.length>1) {try{document.getElementById("divcontainer").style.display=arr[1];}catch(btncl){}if(arr[1]=="block") {var sa=((document.getElementById("chatTranscript").childNodes.length==0)?"active_loop":"");try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem "+sa);}catch(i){}try{var lamp=setInterval(function(){clearInterval(lamp);try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem");}catch(i){}},5000);}catch(i){}try{clearInterval(lampBubble); lampBubble=setInterval(function(){clearInterval(lampBubble);try{document.getElementById("bubblepresent").style.display=arr[1];}catch(i){}},2000);}catch(i){}}else{try{document.getElementById("bubblepresent").style.display="none";}catch(gad){}var sa=((document.getElementById("chatTranscript").childNodes.length==0)?"active_loop":"");try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem "+sa);}catch(i){}}try{divWindowState(arr[2])}catch(btncl){}}}}function readCookieChat() {try{var name = document.getElementById("EABnameCookie").value;var nameEQ = name + "=";var ca = document.cookie.split(';');for(var i=0;i < ca.length;i++) {var c = ca[i];while (c.charAt(0)==' ') {c = c.substring(1,c.length);}if (c.indexOf(nameEQ) == 0) {return c.substring(nameEQ.length,c.length);}}}catch(i){return null;}return null;}function eraseCookieChat() {createCookie( document.getElementById("EABnameCookie").value,"",-1);}function setCookieChat(cookieValue){var cookieName = document.getElementById("EABnameCookie").value;var dateCookie = document.getElementById("EABdateCookie").value;var pathCookie = document.getElementById("EABpathCookie").value;var dateNew = new Date();dateNew.setTime(dateNew.getTime()+(dateCookie*1000));var expireDate = "; expires="+dateNew.toGMTString();var strCookie= cookieName + '=' + cookieValue + expireDate+';path='+pathCookie+';domain=.inps.it';document.cookie = strCookie;}function CopyChatClipboard() {var nomeFumetto1="";var nomeFumetto2="";var el = document.getElementById('chatTranscript');if(el.childNodes.length>0){var str="", hr="",lastPart="",surveyPart="";for(var u=0;u0){nomeFumetto = d.childNodes[x].childNodes[0].nodeValue;if(nomeFumetto1==""){nomeFumetto1=nomeFumetto;nomeFumetto2=nomeFumetto;}if(nomeFumetto1==nomeFumetto2){nomeFumetto2=nomeFumetto;}str+=nomeFumetto+"\r\n";} else if(d.childNodes[x].nodeName=="#text" && d.childNodes[x].nodeValue.length>0){str+=d.childNodes[x].nodeValue;} else if(!(d.childNodes[x].nodeName=="#text") && d.childNodes[x].getAttribute("class")=="name2" && d.childNodes[x].nodeName.toLowerCase()=="span" && d.childNodes[x].childNodes[0].nodeValue.length>0){oraFumetto = d.childNodes[x].childNodes[0].nodeValue;lastPart=oraFumetto+"\r\n"+"\r\n"+"\r\n";} else if (!(d.childNodes[x].nodeName == "#text") && d.childNodes[x].nodeName.toLowerCase() == "b" && d.childNodes[x].childNodes[0].nodeValue.length > 0) {str += d.childNodes[x].childNodes[0].nodeValue + "";} else if( !(d.childNodes[x].nodeName=="#text") && d.childNodes[x].nodeName.toLowerCase()=="a" && d.childNodes[x].childNodes[0].nodeValue.length>0){hr=d.childNodes[x].getAttribute("href");if(hr!="#"){str+=d.childNodes[x].childNodes[0].nodeValue+" ("+hr+")";} else{str+=d.childNodes[x].childNodes[0].nodeValue+"";}} else if( !(d.childNodes[x].nodeName=="#text") && d.childNodes[x].nodeName.toLowerCase()=="br" ) {str+="\r\n";}}str+="\r\n"+lastPart;}saveTextAsFile("chat-inps-27-04-2024.txt",str);}else{}}function linkCounter(id,link) {try {var xmlhttp;try {xmlhttp = new XMLHttpRequest();} catch (e) {try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {return;}}}xmlhttp.open("POST","https://servizi2.inps.it/VirtualAgent/WebGateway/gateway/linkcounter/" + id, true);xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xmlhttp.onreadystatechange = function() {if ( xmlhttp.readyState === 4 && xmlhttp.status === 200 ) {}else if ( xmlhttp.readyState === 4 && xmlhttp.status === 404 ) {}};xmlhttp.send("");}catch(i){return state;}}function checkTimeChatBot() {try{clearInterval(lampBubble);}catch(i){} try{document.getElementById("divcontainer").style.display="none";}catch(btncl){}var state=true;try {var xmlhttp;try {xmlhttp = new XMLHttpRequest();} catch (e) {try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {return;}}}xmlhttp.open("POST","https://servizi2.inps.it/VirtualAgent/SGWeb/ws/check/chat_control", true);xmlhttp.onreadystatechange = function() {if ( xmlhttp.readyState === 4 && xmlhttp.status === 200 ) {var msg=JSON.parse(xmlhttp.responseText);if(msg.valid){ var bp=document.getElementById("bubblepresent");while (bp.hasChildNodes()){bp.removeChild(bp.lastChild);}bp.insertAdjacentHTML("afterbegin",msg.message); state=true; try{eabShowIcon(false);}catch(i){} try{eabShowWindow(true);}catch(i){}}else{ try{eabShowIcon(false);}catch(i){}hideOverlayEAB(true); state=false; try{ var bdDialog=document.getElementById("eab_modal_body");while (bdDialog.hasChildNodes()){bdDialog.removeChild(bdDialog.lastChild);}bdDialog.insertAdjacentHTML("afterbegin",msg.message);if(document.getElementById("hidWmsg") && document.getElementById("hidWmsg").value.length>0)msg.message=document.getElementById("hidWmsg").value; var bp=document.getElementById("bubblepresent");while (bp.hasChildNodes()){bp.removeChild(bp.lastChild);}bp.insertAdjacentHTML("afterbegin",msg.message);bdDialog.setAttribute("tabIndex","0");}catch(i){return false;}}return state;}else if ( xmlhttp.readyState === 4 && xmlhttp.status === 404 ) {hideOverlayEAB(true);var bdDialog=document.getElementById("eab_modal_body");while (bdDialog.hasChildNodes()){bdDialog.removeChild(bdDialog.lastChild);}bdDialog.insertAdjacentHTML("afterbegin",document.getElementById("stringsStartFail").value);bdDialog.setAttribute("tabIndex","0");}};xmlhttp.send("");}catch(i){return state;}}function hideOverlayEAB(state) {if(state){try{document.getElementById("modal_service_Eab").style.display="block";}catch(i){}try{document.getElementById("modalEabOverlay").style.display="block";}catch(i){}try{document.getElementById("advert_P").focus();}catch(i){console.log("errore:"+i.message);}}else{try{document.getElementById("modal_service_Eab").style.display="none";}catch(i){}try{document.getElementById("modalEabOverlay").style.display="none";}catch(i){}try{eabShowIcon(false);}catch(i){}try{eabShowIcon(true);}catch(i){}document.getElementById("divcontainer").focus();}}function saveTextAsFile(fileNameToSaveAs, textToWrite) {var ie = navigator.userAgent.match(/MSIE\s([\d.]+)/),ie11 = navigator.userAgent.match(/Trident\/7.0/) && navigator.userAgent.match(/rv:11/),ieEDGE = navigator.userAgent.match(/Edge/g),ieVer=(ie ? ie[1] : (ie11 ? 11 : (ieEDGE ? 12 : -1)));if (ie && ieVer==9) {var fr=document.createElement("iframe");fr.id="dummyframe";fr.style.display="none";fr.style.visibility="hidden";(document.body || document.getElementsByTagName("body")[0]).appendChild(fr);var ifd = document.getElementById('dummyframe').contentDocument;ifd.open('text/plain', 'replace');ifd.write(textToWrite);ifd.close();ifd.execCommand('SaveAs', true, fileNameToSaveAs);fr.parentNode.removeChild(fr);return;}else if(ie && ieVer<9){return; }var textFileAsBlob = new Blob([textToWrite], {type: 'text/plain'});if (ieVer>-1) {window.navigator.msSaveBlob(textFileAsBlob, fileNameToSaveAs);} else {var downloadLink = document.createElement("a");downloadLink.download = fileNameToSaveAs;downloadLink.href = window.URL.createObjectURL(textFileAsBlob);downloadLink.onclick = function(e) { document.body.removeChild(e.target); };downloadLink.style.display = "none";(document.body || document.getElementsByTagName("body")[0]).appendChild(downloadLink);saveAs(new window.Blob([textToWrite], {type:'text/plain;charset=UTF-8'} ), fileNameToSaveAs, false);}}function putSpinnerChat(state) {if (state){var imgSpin=document.createElement("img");imgSpin.setAttribute("class","spinnerClassImg");imgSpin.setAttribute("id","spinnerClassImg");imgSpin.setAttribute("src","https://servizi2.inps.it/VirtualAgent/eab-resources/spinnerBlue.gif");document.getElementById("chatTranscript").appendChild(imgSpin);}else{try{jQuery(".spinnerClassImg").remove();}catch(i){}}}function putBubbleChat(state,nome) {if (state){var i=jQuery("

");i.addClass("bubble them");if(document.getElementById("nameAft")) var tx=document.getElementById("nameAft").value;i.find(".name").text(nome+tx);if (document.getElementById("divimage")) {var p=$("
");p=appendImagediv(p, true, nome);p.append(i);}var imgSpin=document.createElement("img");imgSpin.setAttribute("class","bubbleClassImg");imgSpin.setAttribute("id","bubbleClassImg");imgSpin.setAttribute("src","https://servizi2.inps.it/VirtualAgent/eab-resources/pl.gif");if(p!=undefined || p!=null) {i.append(imgSpin);i=p;}else{i.append(imgSpin);}jQuery("#chatTranscript").append(i);}else{try{jQuery(".spinnerClassImg").remove();}catch(i){}try{jQuery(".Divimage.bubbleCheat").remove();}catch(i) {}}}var circle,circle_duration =1000;if(typeof circle != "object"){var jql=setInterval(function(){if(document.getElementById("divcontainer") && typeof jQuery==='function' && typeof ProgressBar==='object' && typeof circle == "object"){clearInterval(jql);} else if(document.getElementById("divcontainer") && typeof jQuery==='function' && typeof ProgressBar==='object' ){clearInterval(jql);circle = new ProgressBar.Circle('#divcontainer', {strokeWidth: 6,easing: 'linear',duration: circle_duration,color: '#155A80',trailWidth: 0,svgStyle: null});}},600);}function circle_init() {circle.animate(1);setTimeout(function(){circle.animate(2);}, circle_duration+100);}function circle_hover_in(){circle.animate(3);}function circle_hover_out(){circle.animate(2)} var wi=window;var putchat = setInterval(function() { wi=window;if (document.readyState === "complete" && document.getElementById("boxChatSample") && document.getElementById("_IndraIxnLib") && typeof wi.easybotWebChat ==='function' && document.getElementById("modalEabOverlay") && typeof ProgressBar==='object' ) {clearInterval(putchat);if(document.getElementById("iconImageChat") || document.getElementById("iconImageChat2") || document.getElementById("bubblepresent") || document.getElementById("divcontainer")){return false; }try{putObjectinDiv();}catch(btn){}enableWindowChat();try {var trC=readCookieChat();if(trC!=null && trC!=""){var arr=trC.split(document.getElementById("EABseparatorCookie").value,4);if(arr.length>1 && arr[2].toString().match(/block|BLOCK/)){eabShowIcon(false);eabShowWindow(true);}else{eabShowIcon(true);eabShowWindow(false);}}else{eabShowIcon(true);}}catch(i){eabShowIcon(true);}}}, 400);var putscrollbar = setInterval(function() {if (document.getElementById("boxChatSample") && typeof jQuery==='function' && typeof jQuery.fn === 'object' && typeof jQuery.fn.niceScroll==='function' && typeof jQuery.fn.niceScroll.length ==='number' && jQuery.fn.niceScroll.length >=2) {clearInterval(putscrollbar);try{scrollonTranscript();}catch(scr){}}}, 2500);var transform_styles = ['-webkit-transform', '-ms-transform', 'transform'];var gh=0,intRot=true,delRot=true,stateImg=true,hidingIcon=true,randomizeBorder,restartAnimationBorderImg,randomizeBorder2,putMouseOut,randomizeBorderUnique,resetColurInverse,isIETime=90; var chEdge=false; var chSafari=false;var putAnim = setInterval(function() {if (document.getElementById("boxChatSample") && typeof jQuery==='function') {clearInterval(putAnim);jQuery(document).ready(function($) {try{var lamp=setInterval(function(){clearInterval(lamp);try{if(document.getElementById("iconImageChat"))document.getElementById("iconImageChat").setAttribute("class","imgnewicon pulseElem");}catch(i){}},5000);}catch(i){}try{jQuery(document.getElementById("iconImageChat")).bind('mouseover',function(event){jQuery(document.getElementById("iconImageChat")).prop('class','imgnewicon pulseElem active_loop');}).bind('mouseleave',function(){jQuery(document.getElementById("iconImageChat")).prop('class','imgnewicon pulseElem ');})}catch(i){}});}}, 250);function changeCssonSafari(changedCssOnSafari) {try {var ua = window.navigator.userAgent;var iOS = !!ua.match(/iPad/i);var webkit = !!ua.match(/WebKit/i);var iOSSafari = iOS && webkit && !ua.match(/CriOS/i) && !ua.match(/OPiOS/i) && !ua.match(/EdgiOS/i);if(iOSSafari && document.getElementById("changeFastCSS") && document.getElementById("chatTranscript").childNodes.length>0) { if(window.matchMedia("(orientation: landscape)").matches && changedCssOnSafari){var filechangeFastCSS=document.getElementById("changeFastCSS").value;var imc="_stylecss0";if(document.getElementById(imc)) {var it= document.getElementById(imc);if(it.nodeName.toUpperCase()=="LINK") {var srcFile=it.getAttribute("href");document.getElementById("changeFastCSS").setAttribute("value",srcFile);it.setAttribute("href",filechangeFastCSS);setTimeout(function(){var hin=window.innerHeight;document.getElementById("chat-flyout").style.top=(jQuery(window).height()-hin)+"px"; document.getElementById("Ixn_bot_webchat").style.height=window.innerHeight+"px";document.getElementById("Ixn_bot_webchat").style.top=(jQuery(window).height()-hin)+"px";document.getElementById("boxChatSample").style.top=$("table.tablebtn").height()+"px"; document.getElementById("boxChatSample").style.height=(window.innerHeight-jQuery(document.getElementById("input-container")).height()-$("table.tablebtn").height())+"px";document.getElementById("chatTranscript").style.height=(window.innerHeight-jQuery(document.getElementById("input-container")).height()-$("table.tablebtn").height())+"px";bindClickOutsideTrigger();var ta=setInterval(function(){clearInterval(ta);try{fixedChat();scrollTranscriptUpdate(0);}catch(i){}},250);},500); } } }else { restoreCssonSafari(it); } } }catch(i){}} function restoreCssonSafari(it) { unbindClickOutsideTrigger(); it.setAttribute("href",document.getElementById("changeFastCSS").getAttribute("value")); document.getElementById("changeFastCSS").setAttribute("value",document.getElementById("changeFastCSS").getAttribute("class")); document.getElementById("chat-flyout").removeAttribute("style"); document.getElementById("chat-flyout").style.display="block"; document.getElementById("Ixn_bot_webchat").removeAttribute("style"); document.getElementById("Ixn_bot_webchat").style.display="block"; document.getElementById("boxChatSample").removeAttribute("style"); document.getElementById("boxChatSample").style.display="block"; document.getElementById("chatTranscript").removeAttribute("style"); document.getElementById("chatTranscript").style.display="block"; var ta2=setInterval(function(){clearInterval(ta2);try{fixedChat();scrollTranscriptUpdate(0);}catch(i){}},1000);} function unbindClickOutsideTrigger() {jQuery(document).unbind("touchend");}function bindClickOutsideTrigger() {jQuery(document).bind('touchend',function (e){var container = $(".flyout-bottom-right");if (!container.is(e.target) && container.has(e.target).length === 0){unbindClickOutsideTrigger();jQuery("#input-container textarea.input").blur();}});} if (!String.prototype.replaceAll) {String.prototype.replaceAll = function(str, newStr){if (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {return this.replace(str, newStr);}return this.replace(new RegExp(str, 'g'), newStr);};}(function() { var hidden = "hiddenKey"; if (hidden in document) document.addEventListener("visibilitychange", onchange); else if ((hidden = "mozHidden") in document) document.addEventListener("mozvisibilitychange", onchange); else if ((hidden = "webkitHidden") in document) document.addEventListener("webkitvisibilitychange", onchange); else if ((hidden = "msHidden") in document) document.addEventListener("msvisibilitychange", onchange); else if ("onfocusin" in document) document.onfocusin = document.onfocusout = onchange; else window.onpageshow = window.onpagehide= window.onfocus = window.onblur = onchange; function onchange (evt) { var v = "visible", h = "hidden", evtMap = {focus:v, focusin:v, pageshow:v, blur:h, focusout:h, pagehide:h}; evt = evt || window.event; if(typeof document.getElementById("boxChatSample") ==="object" && document.readyState === "complete") { if (evt.type in evtMap){ document.getElementById("boxChatSample").setAttribute("state",evtMap[evt.type]); }else { document.getElementById("boxChatSample").setAttribute("state", this[hidden] ? "hiddenKey" : "visible"); if(document.getElementById("boxChatSample").getAttribute("state").includes("visible")) { if(typeof window.oeasybotWebChatInstance.effectSpecial ==="function" && typeof document.getElementById("embedSound22") ==="object") { window.oeasybotWebChatInstance.effectSpecial(false); } if(typeof window.oeasybotWebChatInstance.changeTitleChat ==="function" && typeof document.getElementById("animationTitleWeb") ==="object") { window.oeasybotWebChatInstance.changeTitleChat(false); } if(document.getElementById("chat-flyout").style.display.includes("block")) { $("#boxChatSample").find("[view=\"false\"]").removeAttr("view"); } } } } } if( document[hidden] !== undefined ) onchange({type: document[hidden] ? "blur" : "focus"});})(); function isNodeinArray(to){var nodeItem;for(var i=0; i< to.length;i++){nodeItem= to[i];if(nodeItem.nodeName==document.activeElement.nodeName && nodeItem.getAttribute("id")==document.activeElement.getAttribute("id") && nodeItem.getAttribute("class")==document.activeElement.getAttribute("class")){return true;}}return false;}function trapFocus(element2) {if(element2 !=null){ var KEYCODE_TAB = 9;element2.addEventListener('keyup', function(e) {var isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB);if (!isTabPressed) { console.log("tasto differente"); return false; }else { if (isNodeinArray(document.getElementById("chat-flyout").querySelectorAll('a[href]:not([disabled]), button:not([disabled]):not(.opac),i,label, textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), div,select:not([disabled]),p')) && addClass(document.activeElement,"focusElement")){ document.activeElement.focus(); e.preventDefault(); } }});}}var focusableEls; var taa=setInterval(function(){if(typeof document.getElementById("chat-flyout") ==="object" && document.getElementById("chat-flyout") !=null) {clearInterval(taa);trapFocus(document.getElementById("chat-flyout"));document.getElementById("chat-flyout").addEventListener("focusout",function(e){$(e.target).removeClass("focusElement")});}},500);