/gi,''),e=e.replace(/
/gi,''),e=e.replace(/<\/p>/gi,'\n'),e=e.replace(/ /gi,"\n"),e=e.replace(/ ]+>/gi,'')}function s(e,t){var n=document.createElement('a');if(n.setAttribute('href','data:text/plain;charset=utf-8,'+encodeURIComponent(t)),n.setAttribute('download',e),document.createEvent){var o=document.createEvent('MouseEvents');o.initMouseEvent('click',!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}else n.click()}if(0==Ct(".onwebchatbox").length){1==le?div_chat_min_title=it('min_online',D):div_chat_min_title=it('min_offline',D);var m=' by onWebChat ',w=m.replace("l=2&","");1==se&&(w="",m=""),qe?1==le?image_name=yt:image_name=vt:1==le?image_name=xt:image_name=It;var u='';1==V&&(u=' ');var b='
'+it('max_msg',D)+'
';''==it('max_msg',D)&&(b=''),tempSaveSt='',p()||(tempSaveSt='
');var f="",y="",v="";if(1==Te){var I="",P="";1==Se&&(I='
',P='padding-left: 0px;text-indent:-17px;'),f='
'+I+''+it('consent_text',D)+'
',y=f.replace(/_offline/g,'_prechat'),v=f.replace(/_offline/g,'_inchat_modal')}(1!=qe||1==re)&&8!=p()&&Ct("body").append('
"),consentTextClicked=function(){if(1==Se){var e=Ct("input#onwc_consent_checkbox_inchat_modal");e&&e.prop('checked',!e.prop('checked')),e=Ct("input#onwc_consent_checkbox_offline"),e&&e.prop('checked',!e.prop('checked')),e=Ct("input#onwc_consent_checkbox_prechat"),e&&e.prop('checked',!e.prop('checked'))}},toggleModal=function(e,t){document.getElementById(e).classList.toggle("show-onwcmodal",t)},document.getElementById('onwbchat_window').addEventListener("click",t),emailTranscript=function(){""!=l('chattext')&&6>Ae&&(Ct(".onwebchat-widget-settings-submenu").hide(),toggleModal("onwcEmailModal"))},checkMobileChatHeight=function(){try{if(qe){var e=Ct("#onwbchat_window").height();Ct(".onwebchatbox .chat_area").css("height",e-98-he-4+14*x+"px"),Ct('#onwbchat_window .chat_area').animate({scrollTop:9999999},200)}}catch(t){}},clickConsentModalOk=function(){var e=Ct("input#onwc_consent_checkbox_inchat_modal").val();void 0==e&&(e=-1),1==Se&&0==document.getElementById("onwc_consent_checkbox_inchat_modal").checked?document.getElementById("onwc_consent_l_inchat_modal").style.setProperty("color","#D04848"):1==Se&&1==document.getElementById("onwc_consent_checkbox_inchat_modal").checked?(c("consentvalue",2,93),toggleModal('onwcConsentModal',!1),ut.emit('setconsentsettings',ft,e,Te,Se)):1==Te&&1!=Se&&(c("consentvalue",1,93),toggleModal('onwcConsentModal',!1),ut.emit('setconsentsettings',ft,e,Te,Se))},Ct('input#onwc_consent_checkbox_inchat_modal').change(function(){1==document.getElementById("onwc_consent_checkbox_inchat_modal").checked&&document.getElementById("onwc_consent_l_inchat_modal").style.setProperty("color","#545454")}),endChatClicked=function(){""!=l('chattext')&&(Ct(".onwebchat-widget-settings-submenu").hide(),toggleModal("onwcEndChatModal",!0))},endChatFunction=function(){""!=l('chattext')&&(d('chattext',''),disableMenuItem("onwebchat-print-li"),disableMenuItem("onwebchat-savetofile-li"),disableMenuItem("onwebchat-email-li"),disableMenuItem('onwebchat-endchat-li'),Ct('#onwbchat_window .chat_area').empty(),Ct('#onwbchat_window .chat_area').append(b),showChatWindow(),ut.emit('close_dialog_visitor'),d("servingOpImage",""),A=""),toggleModal('onwcEndChatModal',!1)},sendEmailTranscript=function(){if(g(Ct("input#onwcemailtrans").val())){if(6>Ae){var e=(new Date).getTimezoneOffset()/60*-1;ut.emit('onwcemailtranscript',ft,ae,Ct("input#onwcemailtrans").val(),e),toggleModal("onwcEmailModal",!1);var t=r('onwbchtemailsSent');Ae++,""==t?c('onwbchtemailsSent',1,.0416):c('onwbchtemailsSent',parseInt(t)+1,.0416)}}else Ct("input#onwcemailtrans").focus(),document.getElementById("onwcemailtrans").style.setProperty("border","1px solid #D04848","important")},Ct('input#onwcemailtrans').keyup(function(){g(Ct("input#onwcemailtrans").val())&&document.getElementById("onwcemailtrans").style.setProperty("border","1px solid #909090","important")}),1==le?o():n(),1==Y&&Ct('#onwbchat_window').css('display','none'),1==le?Ct('#onweb-offline-icon').hide():Ct('#onweb-online-icon').hide(),1==le&&""!=N?Ct('#webchat_header')[0].style.setProperty('background-color',N,'important'):""!=j&&(Ct('#webchat_header')[0].style.setProperty('background-color',j,'important'),Ct('#offlineform_btn')[0].style.setProperty('background-color',j,'important')),0==Fe&&Ct('#onwc-settings-icon-id').remove(),0==je&&0==Ne&&0==Le&&0==Ue&&0==De&&0==Re&&Ct('#onwebchat-widget-settings-submenu-ul').remove(),0==je&&Ct('#onwebchat-email-li').remove(),0==Ne&&Ct('#uploadfileid').remove(),0==Le&&Ct('#onwebchat-print-li').remove(),0==Ue&&Ct('#onwebchat-savetofile-li').remove(),0==De&&Ct('#onwebchat-volume-li-id').remove(),0==Re&&Ct('#onwebchat-endchat-li').remove(),setEmoticon=function(e){Ct('#onwbtxtarea').val(Ct('#onwbtxtarea').val()+" {"+e+"}"),Ct('#onwbtxtarea').focus(),checkText2ShowSendButton()},validateFileSize=function(e,t){if(1==t)var n=e.files[0].size/1024/1024;else var n=e.size/1024/1024;return n>5?(toggleModal('onwcFileModal'),Ct("#onwbchtFileinput").val(''),!1):(printChat('
'+it('max_me',D)+" [loading...]
"),1==t&&Ct("#onwbchtUploadForm").submit(),!0)},SaveToFile=function(e){try{if(""!=l('chattext')){Ct(".onwebchat-widget-settings-submenu").hide();var t=new Date,n=t.getFullYear()+'-'+(t.getMonth()+1)+'-'+t.getDate(),o=t.getHours()+':'+t.getMinutes()+':'+t.getSeconds();strBy="\n## by www.onwebchat.com ",1==se&&(strBy=""),s('chat_'+n+'.txt','## Chat transcipt on '+n+' '+o+strBy+'\n\n'+i(Ct(e).html()))}}catch(a){console.log(a)}},PrintElem2Printer=function(e){try{""!=l('chattext')&&(Ct(".onwebchat-widget-settings-submenu").hide(),Popup2Print(Ct(e).html()))}catch(t){console.log(t)}},Popup2Print=function(e){var t=window.open('','onWebChat live chat - Print ','height=600,width=800');return t.document.write('
onWebChat live chat '),t.document.write(''),t.document.write(''),t.document.write(e),t.document.write(''),t.document.close(),t.focus(),t.print(),t.close(),!0},okButtonClicked=function(){ut.emit('chatWindowMax',0),minimizeChatWindow()},uploadFilePressed=function(){Ct('#uploadfileid').css("opacity")>.9&&(Ct('#onwbchtFileinput').trigger('click'),0==mt&&0==ht&&h())},void 0!=l('chattext')&&""!=l('chattext')&&(enableMenuItem("onwebchat-print-li"),enableMenuItem("onwebchat-savetofile-li"),6>Ae&&enableMenuItem("onwebchat-email-li"),enableMenuItem('onwebchat-endchat-li'));var B=0,T=document.getElementById('onwbchat_window');
if(T.addEventListener('dragenter',function(e){T.style.backgroundImage="url('')",B++,1==Q&&1==Ne&&'chat'==ee&&(T.style.filter="brightness(50%)"),e.preventDefault()},!1),T.addEventListener('dragleave',function(e){B--,0==B&&(T.style.filter="brightness(100%)"),e.preventDefault()},!1),T.addEventListener('dragover',function(e){e.preventDefault()},!1),T.addEventListener('drop',function(e){B=0;var t=e.dataTransfer,n=t.files;if(T.style.filter="brightness(100%)",e.preventDefault(),1==Q&&1==Ne&&'chat'==ee&&validateFileSize(n[0],0)){var o=new FormData;o.append('file',n[0]),o.append('siteid',ae),sendFileToServer(o)}},!1),Ct("#onwbchtUploadForm").submit(function(e){var t=(Ct(this),new FormData(this));sendFileToServer(t),e.preventDefault()}),sendFileToServer=function(e){Ct.ajax({url:''+st+'//'+serverIP+'/chat_upload_file/url',type:'POST',data:e,mimeType:"multipart/form-data",contentType:!1,cache:!1,processData:!1,success:function(e,t,n){var o,a=Ct("#onwbchat_window img[src$='loading.gif']"),i=e.substring(e.indexOf(":")+1);if(i.toLowerCase().endsWith(".png")||i.toLowerCase().endsWith(".jpg")||i.toLowerCase().endsWith(".jpeg")||i.toLowerCase().endsWith(".svg")||i.toLowerCase().endsWith(".gif"))G++,o=a.attr("src").replace("chatimages/loading.gif","filesUpload/"+encodeURI(i)),a.css("max-width","150px"),a.css("max-height","70px"),d('chattext',l('chattext').replace('
',"
")),Ct('#onwbchat_window .chat_area').animate({scrollTop:999999999},200),setTimeout(function(){Ct('#onwbchat_window .chat_area').animate({scrollTop:999999999},200)},1e3),a.attr("src",o),a.wrap("
");else{o=a.attr("src").replace("loading.gif","download-icon.png");var c=i.replace(/^.*[\\\/]/,'');a.attr("src",o),a.wrap("
"),a.parent().append("
"+c+" "),d('chattext',l('chattext').replace('
',"
"+c+" "))}ut.emit('sendchat','{{fileuploaded:'+i+'}}'),z("{{fileuploaded:"+i+"}}","visitor")},error:function(e,t,n){console.log('Error: '+e.status+n)}})},Ct('.onwebchat-widget-settings-icon').click(function(e){e.stopPropagation(),Ct('.onwebchat-widget-settings-submenu').fadeToggle(240,"swing"),Ct('#onwebchat-emoticons-div').hide()}),Ct('#wb-smile-image').click(function(e){e.stopPropagation(),loadEmoticons(),Ct('#onwebchat-emoticons-div').fadeToggle(240,"swing"),Ct(".onwebchat-widget-settings-submenu").hide(),0==mt&&0==ht&&h()}),Ct(document).on("click",function(){'none'!=Ct(".onwebchat-widget-settings-submenu").css('display')&&Ct(".onwebchat-widget-settings-submenu").fadeToggle(240,"swing"),'none'!=Ct("#onwebchat-emoticons-div").css('display')&&Ct('#onwebchat-emoticons-div').fadeToggle(240,"swing")}),Ct("#onwebchat-volume-li-id").click(function(){1==_t?(Ct("#wb-volume-text-id").html(it('menu_sound',D)),_t=!1,c("onwbchtSound",0,93),Ct("#onwebchat-volume-icon").removeClass("onwbchtvolume-icon-2"),Ct("#onwebchat-volume-icon").addClass("onwbchtvolume-icon-off")):(Ct("#wb-volume-text-id").html(it('menu_sound',D)),_t=!0,c("onwbchtSound",1,93),Ct("#onwebchat-volume-icon").removeClass("onwbchtvolume-icon-off"),Ct("#onwebchat-volume-icon").addClass("onwbchtvolume-icon-2"))}),0==_t&&(Ct("#wb-volume-text-id").html(it('menu_sound',D)),Ct("#onwebchat-volume-icon").removeClass("onwbchtvolume-icon-2"),Ct("#onwebchat-volume-icon").addClass("onwbchtvolume-icon-off")),Ct(".onwebchat-widget-settings-submenu").on("click",function(e){e.stopPropagation()}),Ct("#operatorImage").error(function(){Ct(this).hide()}),1==x&&(document.getElementById("webchat_header").style.setProperty("height","40px","important"),document.getElementById("onwbchat_window").style.setProperty("height","40px","important"),document.getElementById("div_chat_min_title").style.setProperty("line-height","42px","important"),document.getElementById("onwbchat_window").style.setProperty("box-shadow","0px 0px 5px 0px #777","important")),1==J||qe){qe?imageClass="onweb_chatimage_mobile":imageClass="onweb_chatimage";var M=st+'//'+serverIP+'/chatWidgetImages/'+image_name;void 0!=Ct(".onwebchatbox")&&Ct(".onwebchatbox").after('
'),0==le&&1==de&&Ct("#onweb_chatimage").css("display","none"),Ct("#onweb_chatimage").load(function(){Ct(".onwebchatbox").append('
');var e=parseInt(Ct("#onweb_chatimage").css("left"));e=e+parseInt(Ct("#onweb_chatimage").width())-4,Ct("#onweb_chatimage_x").css("left",e);var t=parseInt(Ct("#onweb_chatimage").css("bottom"))+parseInt(Ct("#onweb_chatimage").height())-4;Ct("#onweb_chatimage_x").css("bottom",t),Ct(".onwebchatbox").mouseleave(function(){document.getElementById('onweb_chatimage_x').style.visibility='hidden'}),Ct(".onweb_chatimage_x").mouseleave(function(){document.getElementById('onweb_chatimage_x').style.opacity='0.5'}),Ct(".webchat_header").mouseenter(function(){document.getElementById('onweb_chatimage_x').style.visibility='hidden'}),Ct('#onweb_chatimage_x').click(function(){Ct("#onweb_chatimage").css("display","none"),Ct(".onweb_chatimage_x").css("display","none"),d('hideImage',1)})})}Ct('#offlineform_btn').click(function(){if(1==Te&&1==Se&&0==document.getElementById("onwc_consent_checkbox_offline").checked||1==ye&&1==ve&&!g(Ct("input#onwebchatoffemail").val())||1==xe&&1==Ie&&Ct("input#onwebchatofftel").val().length<4||1==fe&&1==_e&&Ct("input#onwebchatoffname").val().length<2||Ct("textarea#onwebchatemailtext").val().length<1)return 1==Te&&1==Se&&0==document.getElementById("onwc_consent_checkbox_offline").checked&&document.getElementById("onwc_consent_l_offline").style.setProperty("color","#D04848"),Ct("textarea#onwebchatemailtext").val().length<1&&(Ct("textarea#onwebchatemailtext").focus(),document.getElementById("onwebchatemailtext").style.setProperty("border","1px solid #D04848","important")),1==xe&&1==Ie&&Ct("input#onwebchatofftel").val().length<4&&(Ct("input#onwebchatofftel").focus(),setTimeout(function(){document.getElementById("onwebchatofftel").style.setProperty("border","1px solid #D04848","important")},0),q()),1!=ye||1!=ve||g(Ct("input#onwebchatoffemail").val())||(Ct("input#onwebchatoffemail").focus(),setTimeout(function(){document.getElementById("onwebchatoffemail").style.setProperty("border","1px solid #D04848","important")},0),q()),1==fe&&1==_e&&Ct("input#onwebchatoffname").val().length<2&&(Ct("input#onwebchatoffname").focus(),setTimeout(function(){document.getElementById("onwebchatoffname").style.setProperty("border","1px solid #D04848","important")},0),q()),!1;var e=Ct("input#onwc_consent_checkbox_offline").val();return void 0==e&&(e=-1),Ct.ajax({type:"POST",url:st+"//"+serverIP+"/visitorSendEmail",data:'clientip='+U+'&clientid='+ft+'&sid='+ae+'&name='+Ct("input#onwebchatoffname").val()+'&email='+Ct("input#onwebchatoffemail").val()+'&text='+Ct("textarea#onwebchatemailtext").val()+'&phone='+Ct("input#onwebchatofftel").val()+'&conboxv='+e+'&conuse='+Te+'&conboxshow='+Se}),Ct(".onwebchatform_div").css("display","none"),Ct(".onweboffline_msg").html(it('off_thank',D)+'
'),at('onWebChat','Offline message sent',''),!1}),Ct('#prechat_btn').click(function(){if(k=Ct("input#onprechatname").val(),C=Ct("input#onprechatemail").val(),E=Ct("input#onprechattel").val(),void 0==k&&(k=""),void 0==C&&(C=""),void 0==E&&(E=""),k=k.trim(),C=C.trim(),E=E.trim(),1==Te&&1==Se&&0==document.getElementById("onwc_consent_checkbox_prechat").checked||1==Ee&&1==Pe&&!g(C)||1==We&&1==Be&&E.length<4||1==ke&&1==Ce&&k.length<2||Ct("textarea#onprechattext").val().trim().length<1)return 1==Te&&1==Se&&0==document.getElementById("onwc_consent_checkbox_prechat").checked&&document.getElementById("onwc_consent_l_prechat").style.setProperty("color","#D04848"),Ct("textarea#onprechattext").val().trim().length<1&&(Ct("textarea#onprechattext").focus(),document.getElementById("onprechattext").style.setProperty("border","1px solid #D04848","important")),1==We&&1==Be&&E.length<4&&(Ct("input#onprechattel").focus(),setTimeout(function(){document.getElementById("onprechattel").style.setProperty("border","1px solid #D04848","important")},0),q()),1!=Ee||1!=Pe||g(Ct("input#onprechatemail").val())||(Ct("input#onprechatemail").focus(),setTimeout(function(){document.getElementById("onprechatemail").style.setProperty("border","1px solid #D04848","important")},0),q()),1==ke&&1==Ce&&k.length<2&&(Ct("input#onprechatname").focus(),setTimeout(function(){document.getElementById("onprechatname").style.setProperty("border","1px solid #D04848","important")},0),q()),!1;var t=Ct("textarea#onprechattext").val();ut.emit('setclientdetails',ft,ae,k,C,E,"");var n=Ct("input#onwc_consent_checkbox_prechat").val();void 0==n&&(n=-1),1==n?c("consentvalue",2,93):1==Te&&c("consentvalue",1,93),ut.emit('setconsentsettings',ft,n,Te,Se),Ct("#onwbchat_window").find(".chat_area,.chat_message,.chat_info").css("display","block"),Ct("#onwbchat_window").find("#prechat_form").css("display","none"),Ct("#onwbchat_window #div_chat_max_title_span").text(it('max_title',D));var o="";return 1==Z&&(o=" me-bubble"),printChat('
'+it('max_me',D)+' '+a(t)+'
'),K="me",setTimeout(function(){ut.emit('sendchat',t)},300),e(),ee="chat",S(),!1}),Ct('input#onwc_consent_checkbox_offline').change(function(){1==document.getElementById("onwc_consent_checkbox_offline").checked&&document.getElementById("onwc_consent_l_offline").style.setProperty("color","#545454")}),Ct('input#onwc_consent_checkbox_prechat').change(function(){1==document.getElementById("onwc_consent_checkbox_prechat").checked&&document.getElementById("onwc_consent_l_prechat").style.setProperty("color","#545454")}),Ct('input#onwebchatoffemail').keyup(function(){g(Ct("input#onwebchatoffemail").val())&&(document.getElementById("onwebchatoffemail").style.setProperty("border","1px solid #ccc","important"),q())}),Ct('textarea#onwebchatemailtext').keyup(function(){Ct("textarea#onwebchatemailtext").val().length>=1&&(document.getElementById("onwebchatemailtext").style.setProperty("border","1px solid #ccc","important"),q())}),Ct('input#onwebchatofftel').keyup(function(){Ct("input#onwebchatofftel").val().length>=4&&(document.getElementById("onwebchatofftel").style.setProperty("border","1px solid #ccc","important"),q())}),Ct('input#onwebchatoffname').keyup(function(){Ct("input#onwebchatoffname").val().length>=2&&(document.getElementById("onwebchatoffname").style.setProperty("border","1px solid #ccc","important"),q())}),Ct('input#onprechatemail').keyup(function(){g(Ct("input#onprechatemail").val())&&(document.getElementById("onprechatemail").style.setProperty("border","1px solid #ccc","important"),q())}),Ct('textarea#onprechattext').keyup(function(){Ct("textarea#onprechattext").val().length>=1&&(document.getElementById("onprechattext").style.setProperty("border","1px solid #ccc","important"),q())}),Ct('input#onprechattel').keyup(function(){Ct("input#onprechattel").val().length>=4&&(document.getElementById("onprechattel").style.setProperty("border","1px solid #ccc","important"),q())}),Ct('input#onprechatname').keyup(function(){Ct("input#onprechatname").val().length>=2&&(document.getElementById("onprechatname").style.setProperty("border","1px solid #ccc","important"),q())}),loadEmoticons=function(){""==Ct('#onwebchat-emoticons-div').html()&&Ct('#onwebchat-emoticons-div').append('
')},MaximizeWindowInit=function(){return ut||be(),0==mt&&0==ht&&h(),ut.emit('chatWindowMax',1),maximizeChatWindow(),Ct("#onwbchat_window #onwbtxtarea").focus(),!1},Ct("#onwbchat_window .webchat_header").on("click",function(){0==_?1!=l('maxChat')?(W(),MaximizeWindowInit(),at('onWebChat','Chat window opened','')):(W(),ut.emit('chatWindowMax',0),minimizeChatWindow()):_=0}),Ct("#onweb_chatimage_div #onweb_chatimage").on("click",function(){return MaximizeWindowInit(),W(),at('onWebChat','Chat window opened',''),!1}),text=l('chattext'),text&&(G=(text.match(/filesUpload/g)||[]).length),null!=text&&''!=text&&(Ct(".onwebchat_title2").css("display","none"),Ct("#triangle_down").css("display","none"),Ct('#onwbchat_window .chat_area').append(text),Ct('#onwbchat_window .chat_area').animate({scrollTop:999999999},200)),340>pe&&Ct(".operatorImageSmallClass").css("zoom","0.9"),qe&&(Ct("#onwbchat_window").css("height","95%"),Ct("#onwbchat_window")[0].style.setProperty("bottom","2px","important"),Ct("#onwbchat_window")[0].style.setProperty("width","99%","important"),"left"==ge?setTimeout(function(){Ct("#onwbchat_window")[0].style.setProperty("left","0px","important")},10):Ct("#onwbchat_window")[0].style.setProperty("right","0px","important"),Ct("#wb-send-image")[0].style.setProperty("zoom","1.2","important"),Ct("#wb-send-image")[0].style.setProperty("right","13px","important"),Ct("#wb-send-image")[0].style.setProperty("top","22px","important"),Ct("#wb-smile-image")[0].style.setProperty("display","none","important"),checkMobileChatHeight(),Ct(".onweb_minimize_btn_icon").css("zoom","1.2"),Ct("#onweb_chatimage_div")[0].style.setProperty("right","0"),Ct("#onweb_chatimage_div")[0].style.setProperty("left","initial"))}}function be(){function t(e){var t;return null==e?null:(t=e.indexOf("://")>-1?e.split('/')[2]:e.split('/')[0],t=t.split(':')[0])}function g(){var t=Ct('#onwbtxtarea').val();if(Ct('#onwbtxtarea').val(''),""!=t.trim()){var n="";1==Z&&(n=" me-bubble"),"me"!=K&&(n+=" me-first "),ee=t,z(t,"visitor"),t=t.replace(/\n/g,"{{newline}}");var o="";1==isRTLlanguage(t.substr(0,1))&&(o=' style="direction: rtl;text-align:right;" '),printChat('
'+it('max_me',D)+' '+a(t)+'
'),K="me",e(),l('mustSendTriggerText')&&1==y?(ut.emit('sendchat',t,l('triggerText')),d('mustSendTriggerText',!1),y=!1,m('triggerText')):ut.emit('sendchat',t)}J=0}function I(){var e=Ct('#onwbtxtarea').val();""!=e.trim()&&ut.emit('sendchat',e,void 0,1)}function W(){isRTLlanguage(it('max_placeholder',D).trim().substring(0,2))?B("rtl","right"):B("","left")}function B(e,t){Ct('.chat_message textarea')[0].style.setProperty("direction",e,"important"),Ct('.chat_message textarea')[0].style.setProperty("text-align",t,"important")}function T(){window.removeEventListener('mousemove',R,!0)}function S(e){var t;e.target?t=e.target:e.srcElement&&(t=e.srcElement),"onweb_minimize_btn_icon_id"!=t.id&&1==l('maxChat')&&(ie=1,window.addEventListener('mousemove',R,!0),Ct("#webchat_header").css('cursor','move'))}function R(e){var t=Ct(window).height(),n=Ct(window).width(),o=parseInt(Ct("#onwbchat_window").css('height')),a=e.clientX,i=e.clientY;if(1==ie){var c=Ct(window).scrollTop(),s=Ct(window).scrollLeft();divTop=Ct("#webchat_header").offset().top-c,divLeft=Ct("#webchat_header").offset().left-s,ne=a-divLeft,oe=i-divTop}ie=0,_=1;var r=document.getElementById('onwbchat_window');r.style.position='absolute',u=i-oe,0>i-oe&&(u=0),i-oe>t-o&&(u=t-o),r.style.top=u+'px',w=a-ne,0>a-ne&&(w=0),a-ne>n-se&&(w=n-se),r.style.left=w+'px'}var q={query:{server:lt},reconnectionAttempts:40};ut=b?io.connect('http://'+serverIP+rt,q):io.connect('https://'+serverIP+rt,q),ut.on('disconnect',function(){mt=!1}),ut.on('error',function(e){}),ut.on('connect_error',function(e){}),ut.on('connect_timeout',function(){}),ut.on('reconnect',function(){}),ut.on('reconnecting',function(e){}),8!=p()&&(wt=setTimeout(function(){ut.io.disconnect(),minimizeChatWindow()},gt)),ut.on('connect',function(){H++,H>10&&(ut.io.disconnect(),ut.disconnect(),ut=null),mt=!0,ht=!1,sessionrandom=r('onwbchtsessionrandom'),('null'==sessionrandom||null==sessionrandom||''==sessionrandom||'undefined'==sessionrandom)&&(sessionrandom=Math.floor(1e6*Math.random()+1),c("onwbchtsessionrandom",Math.floor(1e6*Math.random()+1),365));var e=document.referrer,t=0;if(!pt&&(null==l('chattext')||''==l('chattext')))var t=Math.floor(11e3*Math.random())+1e4;setTimeout(function(){ut.emit('userconnect',ft,k,C,E,P,Ve,$e,screen.width,sessionrandom,Oe,ze,He,ae,U,e,r('onwbchtlastvisit'),Xe,qe,kt,pt,le,Te,Se)},t),pt=!1}),ut.on('onwcemailtranscript_ok',function(){toggleModal('onwcEmailOkModal')}),ut.on('addvisited1',function(e){He++,c("onwbchttimesVisited",He,93),c("onwbchtlastvisit",e,93)}),ut.on('setCookie',function(e,t){"onwbchtclientid"==e&&(''!=r('onwbchtclientid')&&null!=r('onwbchtclientid')&&r('onwbchtclientid')!=t&&(deleteAllCookies(),d('chattext',''),Ct('#onwbchat_window .chat_area p').remove(),Ct("#onwbchat_window .onwebchat_title2").css("display","block")),ft=t),c(e,t,365)}),ut.on('chatWindowMax',function(e){1==e?maximizeChatWindow():0==e&&minimizeChatWindow()}),ut.on('updateagents',function(e){O(e)}),ut.on('newChatEvent',function(e){at('onWebChat','Chat started','by '+e)}),ut.on('setAgentOnlineHideOffline',function(e,t,a,i){if(1!=X){void 0==a&&(a=0),te=a;try{}catch(c){console.log(c)}if(1==e&&void 0!=i&&''!=i&&(A=i,Ct('#operatorImage').attr('src',st+'//'+serverIP+'/filesUpload/operatorImages/'+i)),void 0!=e&&null!=e&&(le!=e&&(qe?1==e?image_name=yt:image_name=vt:1==e?image_name=xt:image_name=It,1==e?(Ct("#div_chat_min_title_span").text(it('min_online',D)),Ct('#onweb-offline-icon').hide(),Ct('#onweb-online-icon').show(),""!=N&&Ct('#webchat_header')[0].style.setProperty('background-color',N,'important'),Ct('#onweb_chatimage').attr('src',st+'//'+serverIP+'/chatWidgetImages/'+image_name)):setTimeout(function(){Ct("#div_chat_min_title_span").text(it('min_offline',D)),Ct('#onweb-offline-icon').show(),Ct('#onweb-online-icon').hide(),""!=j&&Ct('#webchat_header')[0].style.setProperty('background-color',j,'important'),""!=j&&Ct('#offlineform_btn')[0].style.setProperty('background-color',j,'important'),Ct('#onweb_chatimage').attr('src',st+'//'+serverIP+'/chatWidgetImages/'+image_name)},300)),le=e,de=t,(1==le||1!=de||l('chattext').length>0)&&0==kt?0!=$&&showChatWindow():hideChatWindow(),l('chattext').endsWith(it('max_gone',D)+"")&&1==le&&0!=te&&(Ct('p:last-child','#onwbchat_window .chat_area').remove(),d('chattext',l('chattext').substring(0,l('chattext').lastIndexOf('
'+it('max_gone',D)+'
'))),o()),1==le&&0!=te&&o(),1!=le&&0==te&&l('chattext').length>0&&!l('chattext').endsWith(it('max_gone',D)+""))){var s=1e3;1==f&&(s=3e3),setTimeout(function(){1==le||0!=te||l('chattext').endsWith(it('max_gone',D)+"")||printChat('
'+it('max_gone',D)+'
'),n()},s)}}}),ut.on('setIsBlocked',function(e){void 0==e&&(e=0),kt=e,c("onwbchtblocked",e,183),1==kt?hideChatWindow():0==kt&&(1==le||1!=de)&&0!=$&&showChatWindow()}),ut.on('visitordeleted',function(){d('chattext',''),Ct('#onwbchat_window .chat_area p').remove(),setTimeout(function(){Ct("#onwbchat_window").fadeOut(700,'swing')},200),deleteAllCookies(),ut.disconnect()}),deleteAllCookies=function(){s("onwbchtclientid"),s("inChatC"),s("onwbchtSound"),s("onwbchtblocked"),s("onwbchtexpress.sid"),s("onwbchtlastvisit"),s("onwbchtsessionrandom"),s("onwbchttimesVisited")},ut.on('servercommand',function(e,t,n,o,a){(null==n||""==n)&&(n="operator"),'close_dialog'==e?(1==r('inChatC')&&""!=it('max_closed',D)&&printChat('
'+it('max_closed',D).replace('{{operator}}',n)+'
'),d("servingOpImage",""),A="",c('inChatC',0,.166),d('hasTriggeredNoReply',0),c('hasTriggeredNoReplyC',0,.166)):'serve_dialog'==e?(f="androidapp"==o?1:0,""!=it('max_served',D)&&(l('hasWrSeByTr')||printChat('
'+it('max_served',D).replace('{{operator}}',n)+'
')),void 0!=a&&''!=a&&(A=a,d("servingOpImage",a),Ct('#operatorImage').attr('src',st+'//'+serverIP+'/filesUpload/operatorImages/'+a))):'no_agent'==e&&printChat('
No agent is online now, but we will reply to you asap.
')}),ut.on('updatechat',function(e,t,n,s){if((null==s||""==s)&&(s="operator"),'command:typing...'==n)Ct('#agenttypingimage').remove(),Ct('#onwbchat_window .chat_area').append("
"),Ct('#onwbchat_window .chat_area').animate({scrollTop:9999999},200);else if('command:notyping...'==n)try{null!=document.getElementById('agenttypingimage')&&(document.getElementById('agenttypingimage').style.visibility='hidden')}catch(r){}else if(0==$);else{i(),clearTimeout(v),o(),Ct('#agenttypingimage').remove();var d="",m='',h="";1==Z&&(d=" agent-bubble "),'agent'!=K&&(d+=" agent-first ",1==V&&(m='
')),1==V&&(h=" big-margin-left "),z(n,"operator"),c('inChatC',1,.166);var p="";1==isRTLlanguage(n.substr(0,1))&&(p=' style="direction: rtl;text-align:right;" '),printChat('
'+m+''+it('max_agent',D).replace('{{operator}}',s)+' '+a(n)+'
'),K="agent",""!=e&&1!=l('maxChat')&&MaximizeWindowInit(),1!=le&&(null!=l('chattext')&&''!=l('chattext'),showChatWindow()),'block'==Ct("#onwbchat_window").find("#prechat_form").css("display")&&showChatWindow()}}),printChat=function(e){Ct("#onwbchat_window .onwebchat_title2").css("display","none"),Ct("#onwbchat_window #triangle_down").css("display","none");var n=/(\b(https?|ftp|file):\/\/(?![-A-Z0-9+\/:.]*filesUpload\/operatorImages)[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,o=n.exec(e);if(null!=o){o=o[0];var a=t(o);e=a==t(window.location.href)?e.replace(n,"
$1 "):e.replace(n,"
$1 ")}var n=/(^|[^\/])(www\.[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,i=n.exec(e);if(null!=i){i=i[0];var a=t(i);e=a==t(window.location.href)?e.replace(n,"$1
$2 "):e.replace(n,"$1
$2 ")}for(var c=!1;e.indexOf("{{fileuploaded:")>-1;){var s=(e.indexOf("{{fileuploaded:")+1,e.indexOf("{{fileuploaded:")+15),r=e.indexOf("}}",s),m=e.substring(s,r),h=m.replace(/^.*[\\\/]/,''),g="";h.toLowerCase().endsWith(".png")||h.toLowerCase().endsWith(".jpg")||h.toLowerCase().endsWith(".jpeg")||h.toLowerCase().endsWith(".svg")||h.toLowerCase().endsWith(".gif")?(c=!0,G++,g='
'):g='
'+h+'',e=e.replace("{{fileuploaded:"+m+"}}",g)}onerror="this.style.visibility='hidden'",e=e.replace(/{angry}/g,'
'),e=e.replace(/{cap}/g,'
'),e=e.replace(/{confused}/g,'
'),e=e.replace(/{crying}/g,'
'),e=e.replace(/{depression}/g,'
'),e=e.replace(/{dislike}/g,'
'),e=e.replace(/{geek}/g,'
'),e=e.replace(/{kiss}/g,'
'),e=e.replace(/{laughing}/g,'
'),e=e.replace(/{like}/g,'
'),e=e.replace(/{love}/g,'
'),e=e.replace(/{money}/g,'
'),e=e.replace(/{mustache}/g,'
'),e=e.replace(/{punk}/g,'
'),e=e.replace(/{security}/g,'
'),e=e.replace(/{sleepi}/g,'
'),e=e.replace(/{star}/g,'
'),e=e.replace(/{sunglass}/g,'
'),e=e.replace(/{surprise}/g,'
'),e=e.replace(/{wink}/g,'
'),e=e.replace('[loading...]','
'),e=e.replace(/{{newline}}/g,'
'),null!=document.getElementById('agenttypingimage')?Ct('#onwbchat_window .chat_area #agenttypingimage').before(e):Ct('#onwbchat_window .chat_area').append(e),Ct('#onwbchat_window .chat_area').animate({scrollTop:9999999},200),l('chattext')?d('chattext',l('chattext')+e):d('chattext',e),8!=p()&&(clearTimeout(wt),wt=setTimeout(function(){ut.io.disconnect(),minimizeChatWindow()},gt)),enableMenuItem("onwebchat-print-li"),enableMenuItem("onwebchat-savetofile-li"),6>Ae&&enableMenuItem("onwebchat-email-li"),enableMenuItem('onwebchat-endchat-li'),340>pe&&Ct(".operatorImageSmallClass").css("zoom","0.9"),checkMobileChatHeight()},removeLoadingImage=function(e){Ct('#'+e).css('background','none')};var J=0,Y=0,Q=0,ee="";Ct('.chat_message textarea').on('paste',function(e){0==mt&&0==ht&&h()}),Ct('.chat_message textarea').on('keypress',function(e){13!=e.keyCode||e.shiftKey?(1!=L&&1!=l('hasStartedWriting')&&(M(),d('hasStartedWriting',1)),L=1,0==mt&&0==ht&&h(),0==J&&(ut.emit('sendchat','command:typing...'),J=1),'free'!=ce&&0==Q&&(Q=setTimeout(function(){I(),Q=0},500)),clearTimeout(Y),Y=setTimeout(function(){J=0,clearTimeout(Q),ut.emit('sendchat','command:notyping...')},1800)):(e.preventDefault(),g(),clearTimeout(Q),Q=0)}),Ct('#wb-send-image').on('click',function(e){g(),Ct("#onwbtxtarea").focus(),checkText2ShowSendButton()}),isRTLlanguage=function(e){var t=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\uFB50-\uFC3F\uFE70-\uFEFC]/;return result=t.test(e),result},W(),Ct('.chat_message textarea').on('keyup',function(e){38==e.keyCode&&''==Ct(this).val()&&Ct(this).val(ee),""!=Ct('#onwbtxtarea').val().trim().substring(0,2)?isRTLlanguage(Ct('#onwbtxtarea').val().trim().substring(0,2))?B("rtl","right"):B("","left"):""==Ct('#onwbtxtarea').val()&&W(),1==Te&&1!=r('consentvalue')&&2!=r('consentvalue')&&toggleModal("onwcConsentModal",!0),checkText2ShowSendButton()}),checkText2ShowSendButton=function(){""==Ct('#onwbtxtarea').val()&&1==x?document.getElementById("wb-send-image").style.visibility="hidden":document.getElementById("wb-send-image").style.visibility="visible"},checkText2ShowSendButton(),Ct('#onwebchatemailtext').on('keyup',function(e){isRTLlanguage(Ct('#onwebchatemailtext').val().substring(0,2))?(Ct('#onwebchatemailtext')[0].style.setProperty("direction","rtl","important"),Ct('#onwebchatemailtext')[0].style.setProperty("text-align","right","important")):(Ct('#onwebchatemailtext')[0].style.setProperty("direction","","important"),Ct('#onwebchatemailtext')[0].style.setProperty("text-align","left","important"))}),Ct('#onprechattext').on('keyup',function(e){isRTLlanguage(Ct('#onprechattext').val().substring(0,2))?(Ct('#onprechattext')[0].style.setProperty("direction","rtl","important"),Ct('#onprechattext')[0].style.setProperty("text-align","right","important")):(Ct('#onprechattext')[0].style.setProperty("direction","","important"),Ct('#onprechattext')[0].style.setProperty("text-align","left","important"))});var ne,oe,ie=0,se=parseInt(Ct("#onwbchat_window").css('width'));try{document.getElementById('webchat_header').addEventListener('mousedown',S,!1),document.getElementById('onweb_minimize_btn_icon_id').removeEventListener('mousedown',S),window.addEventListener('mouseup',T,!1)}catch(re){}F()}Ct=jQuery.noConflict(!0),'undefined'==typeof JSON&&(dt=!0);var Me=!1;10705==ae&&t()&&(Me=!0),'function'!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'')}),maximizeChatWindow=function(){if(Ct("#onwbchat_window").css("animation-iteration-count","0"),document.getElementById("onwbchat_window").style.setProperty("box-shadow","rgba(0, 0, 0, 0.43) 0px 0em 1.2em","important"),(1==Y||qe)&&Ct("#onwbchat_window").fadeIn(100,'swing'),"none"==Ct("#onwbchat_window #div_chat_max_title").css("display")&&B(),
Ct("#onweb_chatimage_div #onweb_chatimage").css("display","none"),Ct("#onwbchat_window .onweb_chatimage_x").css("display","none"),1==de||0!=le||null!=l('chattext')&&''!=l('chattext')?1==ne&&0===l('chattext').length?(ee="prechat",Ct("#onwbchat_window").find(".chat_area,.chat_message,.chat_info").css("display","none"),Ct("#onwbchat_window").find("#offline_form").css("display","none"),Ct("#onwbchat_window").find("#prechat_form").css("display","block"),Ct("#onwbchat_window #div_chat_max_title_span").text(it('max_title',D))):(ee="chat",Ct("#onwbchat_window").find(".chat_area,.chat_message,.chat_info").css("display","block"),Ct("#onwbchat_window").find("#offline_form").css("display","none"),Ct("#onwbchat_window").find("#prechat_form").css("display","none"),Ct("#onwbchat_window #div_chat_max_title_span").text(it('max_title',D))):(ee="offline",Ct("#onwbchat_window").find(".chat_area,.chat_message,.chat_info").css("display","none"),Ct("#onwbchat_window").find("#offline_form").css("display","block"),Ct("#onwbchat_window #div_chat_max_title_span").text(it('off_title',D)),Ct("#onwbchat_window").find("#prechat_form").css("display","none")),qe){Ct("#onwbchat_window").css("height","95%");var e=Ct("#onwbchat_window").width();Ct("#onwbtxtarea")[0].style.setProperty("width",e-48-23*x+"px","important"),Ct("#chat_area_id").css("width",e-0+"px","important"),Ct("#webchat_header")[0].style.setProperty("width",e-40+"px","important")}else document.getElementById("onwbchat_window").style.setProperty("height",me+"px","important"),Ct("#onwbchat_window").css("top",u+"px"),Ct("#onwbchat_window").css("left",w+"px"),1==x&&document.getElementById("onwbchat_window").style.setProperty("bottom","20px","important");return 1==x?(document.getElementById("div_chat_min_title").style.setProperty("line-height","42px","important"),document.getElementById("webchat_header").style.setProperty("height",he+"px","important")):document.getElementById("webchat_header").style.setProperty("height",he-0+4+"px","important"),Ct("#onwbchat_window").find(".onweb_minimize_btn").css("display","inline"),Ct("#onwbchat_window").find(".onweb_minimize_btn").css("position","absolute"),Ct("#onwbchat_window").find(".onweb_minimize_btn").css("right","0px"),Ct("#onwbchat_window .webchat_header").css("cursor","move"),Ct("#onwbchat_window #div_chat_max_title").css("display","block"),Ct("#onwbchat_window #div_chat_min_title").css("display","none"),Ct("#onwbchat_window #off-form-onwebchat-logo").css("display","block"),Ct("#onwbchat_window #onwebchat-logo-span").css("display","block"),Ct("#onwbchat_window .webchat_header").hover(function(){Ct("#onwbchat_window .webchat_header").css("opacity","1")},function(){Ct("#onwbchat_window .webchat_header").css("opacity","1")}),d('maxChat',1),loadEmoticons(),q(),S(),!1},minimizeChatWindow=function(){return(1==Y||qe)&&Ct("#onwbchat_window").fadeOut(0),"block"==Ct("#onwbchat_window #div_chat_max_title").css("display")&&T(),d('maxChat',0),setTimeout(function(){Ct("#onwbchat_window").find(".chat_area,.chat_message,.chat_info").hide(),Ct(".onwebchatbox").css("height","60px"),Ct("#onwbchat_window .webchat_header").css("cursor","pointer"),0==l('hideImage')&&(Ct("#onweb_chatimage_div #onweb_chatimage").css("display","inline"),Ct("#onweb_chatimage_div #onweb_chatimage").css("cursor","pointer"),Ct("#onweb_chatimage").css("animation-iteration-count","0")),Ct("#onwbchat_window .onweb_chatimage_x").css("display","inline"),Ct("#onwbchat_window #div_chat_min_title").css("display","block"),Ct("#onwbchat_window #div_chat_max_title").css("display","none"),Ct("#onwbchat_window #off-form-onwebchat-logo").css("display","none"),Ct("#onwbchat_window #onwebchat-logo-span").css("display","none"),document.getElementById("onwbchat_window").style.setProperty("box-shadow","0px 0px 5px 0px #777","important"),Ct("#onwbchat_window").find(".onweb_maximize_btn").css("display","inline"),qe||(Ct("#onwbchat_window").css("top","initial"),Ct("#onwbchat_window").css("left","initial"),Ct("#onwbchat_window").css(ge,we+"px"),1==x?(document.getElementById("webchat_header").style.setProperty("height","40px","important"),document.getElementById("onwbchat_window").style.setProperty("height","40px","important"),document.getElementById("onwbchat_window").style.setProperty("bottom","0px","important")):(document.getElementById("webchat_header").style.setProperty("height",he+"px","important"),document.getElementById("onwbchat_window").style.setProperty("height",he+"px","important"),document.getElementById("onwbchat_window").style.setProperty("bottom","0px","important")))},100),!1},hideChatWindow=function(){Ct("#onwbchat_window").fadeOut(300,'swing'),Ct("#onweb_chatimage_div #onweb_chatimage").fadeOut(300,'swing')},showChatWindow=function(){try{}catch(e){console.log(e)}0==Y&&0==qe&&Ct("#onwbchat_window").css("display","block"),1==l('hideImage')&&Ct("#onweb_chatimage_div #onweb_chatimage").css("display","none"),0==l('hideImage')&&Ct("#onweb_chatimage_div #onweb_chatimage").css("display","inline"),1==l('maxChat')?maximizeChatWindow():Ct("#onwbchat_window").find(".chat_area,.chat_message,.chat_info").hide()};var Oe,ze,Xe,qe;Ct.ajaxSetup({cache:!0}),dt||Me||(""!=R?Ct.when(Ct.getScript(st+"//cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js",function(e,t,n){}).done(function(e,t){}).fail(function(){}),Ct.get(R,function(e){if(""!=e)try{Ct.extend(!0,I,JSON.parse(e))}catch(t){console.log("exception parsing lang text file : "+t),console.log("lang text file data: "+e.substring(0,100)+" ...")}}).fail(function(){console.log("Error: language file failed to load! filename: "+R),console.log("Ensure that language file url is correct and is not blocked as cross-origin request."),'l1'!=D&&'l2'!=D&&(D='l1')}),Ct('head').append("")).done(function(){oe()}):Ct.when(Ct.getScript(st+"//cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js",function(e,t,n){}).done(function(e,t){}).fail(function(){}),Ct('head').append("")).done(function(){oe()})),enableMenuItem=function(e){Ct("#"+e).css("opacity",.84),Ct("#"+e).hover(function(e){Ct(this).css("opacity","mouseenter"===e.type?1:.84)}),document.getElementById(e)&&document.getElementById(e).style.setProperty("cursor","pointer","important")},disableMenuItem=function(e){Ct("#"+e).css("opacity",.5),Ct("#"+e).hover(function(e){Ct(this).css("opacity",("mouseenter"===e.type,.5))}),document.getElementById(e)&&document.getElementById(e).style.setProperty("cursor","initial","important")},function(e){var t='-',n=navigator.appVersion,o=navigator.userAgent,a=navigator.appName,i=''+parseFloat(navigator.appVersion),c=parseInt(navigator.appVersion,10);Xe=n+" -- "+o+" -- "+a+" -- "+i+" -- "+c+" -- "+navigator.platform+" -- "+navigator.oscpu;var s,r,l;-1!=(r=o.indexOf('Opera'))?(a='Opera',i=o.substring(r+6),-1!=(r=o.indexOf('Version'))&&(i=o.substring(r+8))):-1!=(r=o.indexOf('MSIE'))?(a='Internet Explorer',i=o.substring(r+5)):-1!=(r=o.indexOf('Edge'))||-1!=(r=o.indexOf('Edg/'))?(a='Edge',i=''):-1!=(r=o.indexOf('Chrome'))?(a='Chrome',i=o.substring(r+7)):-1!=(r=o.indexOf('Safari'))?(a='Safari',i=o.substring(r+7),-1!=(r=o.indexOf('Version'))&&(i=o.substring(r+8))):-1!=(r=o.indexOf('Firefox'))?(a='Firefox',i=o.substring(r+8)):-1!=o.indexOf('Trident/')?(a='Internet Explorer',i=o.substring(o.indexOf('rv:')+3)):(s=o.lastIndexOf(' ')+1)<(r=o.lastIndexOf('/'))&&(a=o.substring(s,r),i=o.substring(r+1),a.toLowerCase()==a.toUpperCase()&&(a=navigator.appName)),-1!=(l=i.indexOf(';'))&&(i=i.substring(0,l)),-1!=(l=i.indexOf(' '))&&(i=i.substring(0,l)),-1!=(l=i.indexOf(')'))&&(i=i.substring(0,l));var d=i.indexOf('.');if(d>0){var m=i.indexOf('.',i.indexOf('.')+1);m>0&&(i=i.substring(0,m))}c=parseInt(''+i,10),isNaN(c)&&(i=''+parseFloat(navigator.appVersion),c=parseInt(navigator.appVersion,10)),'Edge'==a&&(i=''),qe=!1,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(o)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(o.substr(0,4)))&&(qe=!0);var h=navigator.cookieEnabled?!0:!1;'undefined'!=typeof navigator.cookieEnabled||h||(document.cookie='testcookie',h=-1!=document.cookie.indexOf('testcookie')?!0:!1);var p='',g=[{s:'Windows 3.11',r:/Win16/},{s:'Windows 95',r:/(Windows 95|Win95|Windows_95)/},{s:'Windows ME',r:/(Win 9x 4.90|Windows ME)/},{s:'Windows 98',r:/(Windows 98|Win98)/},{s:'Windows CE',r:/Windows CE/},{s:'Windows 2000',r:/(Windows NT 5.0|Windows 2000)/},{s:'Windows XP',r:/(Windows NT 5.1|Windows XP)/},{s:'Windows Server 2003',r:/Windows NT 5.2/},{s:'Windows Vista',r:/Windows NT 6.0/},{s:'Windows 7',r:/(Windows 7|Windows NT 6.1)/},{s:'Windows 8.1',r:/(Windows 8.1|Windows NT 6.3)/},{s:'Windows 8',r:/(Windows 8|Windows NT 6.2)/},{s:'Windows 10',r:/(Windows 10|Windows NT 10.0)/},{s:'Windows NT 4.0',r:/(Windows NT 4.0|WinNT4.0)/},{s:'Windows',r:/(WinNT|Windows NT)/},{s:'Windows ME',r:/Windows ME/},{s:'Windows Phone',r:/Windows Phone/},{s:'Android',r:/Android/},{s:'Open BSD',r:/OpenBSD/},{s:'Sun OS',r:/SunOS/},{s:'Linux',r:/(Linux|X11)/},{s:'iOS',r:/(iPhone|iPad|iPod)/},{s:'Mac OS X',r:/Mac OS X/},{s:'Mac OS',r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:'QNX',r:/QNX/},{s:'UNIX',r:/UNIX/},{s:'BeOS',r:/BeOS/},{s:'OS/2',r:/OS\/2/},{s:'BlackBerry OS',r:/BlackBerry/},{s:'Search Bot',r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var w in g){var u=g[w];if(u.r.test(o)){p=u.s;break}}''==p&&(p=navigator.platform);var b=t;switch(/Windows/.test(p)&&(b=/Windows (.*)/.exec(p)[1],p='Windows'),p){case'Mac OS X':b=/Mac OS X (10[\.\_\d]+)/.exec(o)[1];break;case'Android':b=/Android ([\.\_\d]+)/.exec(o)[1];break;case'iOS':b=/OS (\d+)_(\d+)_?(\d+)?/.exec(n),b=b[1]+'.'+b[2]+'.'+(0|b[3])}var f='no check';if('undefined'!=typeof swfobject){var _=swfobject.getFlashPlayerVersion();f=_.major>0?_.major+'.'+_.minor+' r'+_.release:t}e.jscd={browser:a,browserVersion:i,mobile:qe,os:p,osVersion:b,cookies:h,flashVersion:f}}(this),ze=jscd.os+' '+jscd.osVersion,Oe=jscd.browser+' '+jscd.browserVersion;var He=r('onwbchttimesVisited');(''==He||void 0==He||'NaN'==He)&&(He=0,c("onwbchttimesVisited",1,93)),Ct.support.cors=!0}),{init:function(e){bt=e},set:function(e,t){if("name"==e){k=t;try{ut.emit('setclientdetails',ft,ae,k,"","","")}catch(n){}}else if("email"==e){C=t;try{ut.emit('setclientdetails',ft,ae,"",C,"","")}catch(n){}}else if("phone"==e){E=t;try{ut.emit('setclientdetails',ft,ae,"","",E,"")}catch(n){}}else if("notes"==e){P=t;try{ut.emit('setclientdetails',ft,ae,"","","",P)}catch(n){}}else if("pageUrl"==e)try{ut.emit('setclientpageurl',ft,ae,"",t)}catch(n){}else if("pageTitle"==e)try{ut.emit('setclientpageurl',ft,ae,t,"")}catch(n){}else"max"==e?1==t?(maximizeChatWindow(),Ct("#onwbtxtarea").focus()):0==t&&minimizeChatWindow():"show"==e?1==t?($=1,showChatWindow()):0==t&&($=0,hideChatWindow()):"online"==e?1==t?(le=1,showChatWindow()):0==t&&(le=0,showChatWindow()):"hideImage"==e||("language"==e?(D=t,('gr'==D||'el'==D)&&(D='l1'),'en'==D&&(D='l2'),'l1'!=D&&'l2'!=D&&(D='l1')):"languageFile"==e?R="":"onClick"==e?W=t:"onMaximize"==e?B=t:"onMinimize"==e?T=t:"onTrigger"==e?S=t:"onStartWriting"==e?M=t:"onUpdateOperators"==e?O=t:"onNewMessage"==e?z=t:"onWebChatLoaded"==e?F=t:"onlineColor"==e?(N=t,1==le&&""!=N&&Ct('#webchat_header')[0].style.setProperty('background-color',N,'important')):"offlineColor"==e&&(j=t,1!=le&&""!=j&&(Ct('#webchat_header')[0].style.setProperty('background-color',j,'important'),Ct('#offlineform_btn')[0].style.setProperty('background-color',j,'important'))))},get:function(e){return"name"==e?k:"email"==e?C:"phone"==e?E:"notes"==e?P:"status"==e?1==le?"online":"offline":""}}}();