if(!window.jQuery) { var script = document.createElement('script'); script.type = "text/javascript"; script.src = "https://servidorseguro.mysuite1.com.br/client/js/jquery.min.js"; window.onload = function(){ loadDocument(); }; document.getElementsByTagName('head')[0].appendChild(script); } else loadDocument(); var bloco_on_fechado, bloco_on_mensagem, bloco_on_dados, janela, atendimentoemcurso; var mensagem = ""; var on = ""; var hash = "946dc8df67d88416f1969600b1a82c0e"; var url = "https://servidorseguro.mysuite1.com.br/client/chatan.php"; var largurapopup = "600"; var alturapopup = "600"; var inf = ""; var minimizou = ""; var si = "85fd70d14fdedf07d1deb2a407d11ef2"; var timerChamada; var sigla = "lbl"; var empresa = "lebillet"; var stylefile = "style.css"; function loadDocument() { jQuery(document).ready(function(){ if (!atendimentoemcurso) { jQuery("#divChat #nome").val(""); jQuery("#divChat #email").val(""); jQuery("#divChat #setor").val(""); mostraBalao(); timerChamada = setTimeout(function(){ if (jQuery("#divChat #bloco-on-fechado").length > 0) { if (minimizou != 1 && minimizou != true) mostraBlocoOn(); } }, 5000); setClickMinimize(); setClickBlocoFechado(); setEnviarMensagem(); setClickEnviar(); jQuery("#divChat form").submit(function(e){ e.preventDefault(); }); setHoverBlocoFechado(''); } }); } function importaCss(arrayCss) { for (var i=0; i 0 && jQuery("#divChat #email").val() != "") var email = jQuery("#divChat #email").val(); else var email = ""; var setor = jQuery("#divChat #setor").val(); mensagem = encodeURIComponent(jQuery("#divChat #mensagem").val()); var lfa = nome + "_*_" + email + "_*_" + setor + "_*_" + mensagem; var params = "?h=" + hash + "&lfa=" + lfa; if (inf != "") params = params + "&inf="+inf; var urlChamada = url + params; //if (urlChamada.indexOf("https") != -1) //{ //urlChamada = urlChamada.replace("https://servidorseguro", "http://"+empresa); urlChamada += '&sl='+sigla; //} var configpop = "width="+largurapopup+" ,height="+alturapopup+" ,scrollbars=yes,resizable=no"; janela = window.open(urlChamada, "chatonline", configpop); jQuery("#divChat").html(bloco_final); setClickMinimize(); jQuery.ajax({ type: "POST", url: "https://servidorseguro.mysuite1.com.br/client/cf/limpa_session.php?si="+si, dataType: 'json', crossDomain: true, xhrFields:{ withCredentials: true }, data:{ }, success: function(data){ }, error: function(){ } }); return false; }); } function setHoverBlocoFechado(msgDirecionamento) { if (msgDirecionamento != "") { setTimeout(function(){ jQuery('#divChat .status-offline').hover( function(){ var jQuerythis = jQuery(this); // caching jQuery(this) jQuerythis.data('initialText', jQuerythis.find('label').text()); jQuerythis.find('label').text(msgDirecionamento); }, function(){ var jQuerythis = jQuery(this); // caching jQuery(this) jQuerythis.find('label').text(jQuerythis.data('initialText')); } ); }, 400); } } css = new Array('https://servidorseguro.mysuite1.com.br/client/cf/css/' + 'style.css'); importaCss(css); //js = new Array('https://servidorseguro.mysuite1.com.br/client/js/jquery.min.js'); //importaJs(js); div = document.createElement("div"); div.style.width = 200+"px"; div.style.height = 40+"px"; div.style.bottom = "0"; div.style.position = "fixed"; div.style.left = "0"; div.style.zindex = 1000; div.setAttribute("id", "divChat"); divTemp = document.createElement("div"); bloco_on_fechado = '
\ \
'; bloco_off_fechado = ' \
\ \
\ \
\ '; bloco_on_mensagem = '
\
\ \ Atendimento Online\ \
\
\
\
\
\
\
\
\
\
\ Operador\
\
\
\ Olá, em que posso ajudar ?\
\ 13:46\
\
\
\
\
\
\
\
\
\ \
\
\
\
\
\
\
\ Desenvolvido por:\
\
\
\
\
'; bloco_on_dados = '
\
\ \ Atendimento Online\ \
\
\
\
\
\ \
\
\ \
\
\
\
\
\
\ Desenvolvido por:\
\
\
\
\
'; bloco_final = '
\
\ \ Atendimento Online\ \
\
\
\
\
\ \
\
\
\
\
\
\ Desenvolvido por:\
\
\
\
\
'; div.innerHTML = bloco_off_fechado; document.body.appendChild(div); if(window.jQuery){ setClickBlocoFechado(); }