function timer() { date = new Date(); return date.getTime(); } function check() { date = new Date(); } function icheck() { time = timer(); if (ismac > -1) { imgwidth = document.getElementById("doimgreload").width; } else { imgwidth = image.width; } if (imgwidth == 3) { x=setcookie("vivo_status","3",10); if ( document.getElementById("IMGAJUDA") != null ) { document.getElementById("IMGAJUDA").src = 'http://www.atendimentoaovivo.com.br/chat/images/ajuda.gif'; } if (document.getElementById("VivoAjuda") != null ) { document.getElementById("VivoAjuda").style.visibility="visible"; } } if (imgwidth == 1) { x=setcookie("vivo_status","1",10); if (document.getElementById("ImgChatVivo") != null ) { document.getElementById("ImgChatVivo").src = online_image; } } if (imgwidth == 2) { x=setcookie("vivo_status","2",10); if ( document.getElementById("ImgChatVivo") != null ) { document.getElementById("ImgChatVivo").src = offline_image; } } } function start() { time = timer(); if (ismac > -1) { document.getElementById("doimgreload").src = "http://chat.atendimentoaovivo.com.br/vivo_imgstat.asp?hora="+time+"&IDC=1667&ID="+getcookie("vivo_id"); icheck(); } else { image = new Image; image.src = "http://chat.atendimentoaovivo.com.br/vivo_imgstat.asp?hora="+time+"&IDC=1667&ID="+getcookie("vivo_id"); image.onload = icheck; } setTimeout("tracker();",160000); } function tracker() { time = timer(); if (ismac > -1) { document.getElementById("doimgreload").src = "http://chat.atendimentoaovivo.com.br/vivo_imgstat.asp?hora="+time+"&IDC=1667&ID="+getcookie("vivo_id"); icheck(); } else { image = new Image; image.src = "http://chat.atendimentoaovivo.com.br/vivo_imgstat.asp?hora="+time+"&IDC=1667&ID="+getcookie("vivo_id"); image.onload = icheck; } if ((time - starttime) < 3600000) { setTimeout("tracker();",160000); } } function AceitouChat() { document.getElementById('VivoAjuda').style.visibility='hidden'; var vivo_id = getcookie("vivo_id"); var vivo_email = getcookie("vivo_email"); var vivo_nome = getcookie("vivo_nome"); var vivo_custom = getcookie("vivo_custom"); var vivo_status=getcookie("vivo_status"); xWindow=window.open('http://chat.atendimentoaovivo.com.br/default.asp?layout=0&q=2&msg08=O+operador+gostaria+de+conversar+com+voc%EA%2E&msg09=Voc%EA+ir%E1+conversar+com+um+de+nossos+operadores%2E&msg13=Deixe+seu+nome+e+email+para+que+possamos+entrar+em+contato+com+voc%EA%3A&IDC=1667&vivo_id='+vivo_id+'&vivo_logo=http://www.atendimentoaovivo.com.br/images/logo.gif&vivo_bgcolor=White&vivo_empresa=SOS+MONOGRAFIA&vivo_askdepto=0&vivo_askEmail=1&vivo_askCustom=0&vivo_txtCustom=&vivo_nome='+vivo_nome+'&vivo_custom='+vivo_custom+'&vivo_status='+vivo_status+'&vivo_email='+vivo_email+'&img_chat=http://www.atendimentoaovivo.com.br/chat/images/chat_img.jpg','CHAT','width=410, height=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no'); } function ApagaVivoAjuda() { var vivo_id = getcookie("vivo_id"); var vivo_visitas = getcookie("vivo_visitas"); var vivo_email = getcookie("vivo_email"); var vivo_nome = getcookie("vivo_nome"); var vivo_custom = getcookie("vivo_custom"); var idc = 1667; var pagatu = document.getElementById("IMGAJUDA").src; var strPagina = 'http://chat.atendimentoaovivo.com.br/vivo_recusou.asp?v2=1&idc='+idc+'&vivo_id='+vivo_id+'&img='+pagatu; document.getElementById("IMGAJUDA").src = strPagina; document.getElementById('VivoAjuda').style.visibility='hidden'; } function setcookie(name,value,duration){ cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration); document.cookie=cookiestring; if(!getcookie(name)){ return false; } else{ return true; } } function getchat() { var vivo_id = getcookie("vivo_id"); var vivo_email = getcookie("vivo_email"); var vivo_nome = getcookie("vivo_nome"); var vivo_custom = getcookie("vivo_custom"); var vivo_status=getcookie("vivo_status"); xWindow=window.open('http://chat.atendimentoaovivo.com.br/default.asp?layout=0&msg08=O+operador+gostaria+de+conversar+com+voc%EA%2E&msg09=Voc%EA+ir%E1+conversar+com+um+de+nossos+operadores%2E&msg13=Deixe+seu+nome+e+email+para+que+possamos+entrar+em+contato+com+voc%EA%3A&IDC=1667&vivo_id='+vivo_id+'&vivo_logo=http://www.atendimentoaovivo.com.br/images/logo.gif&vivo_bgcolor=White&vivo_empresa=SOS+MONOGRAFIA&vivo_askdepto=0&vivo_askEmail=1&vivo_askCustom=0&vivo_txtCustom=&vivo_nome='+vivo_nome+'&vivo_custom='+vivo_custom+'&vivo_status='+vivo_status+'&vivo_email='+vivo_email+'&img_chat=http://www.atendimentoaovivo.com.br/chat/images/chat_img.jpg','CHAT','width=410, height=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no'); } function getexpirydate( nodays){ var UTCstring; Today = new Date(); nomilli=Date.parse(Today); Today.setTime(nomilli+nodays*24*60*60*1000); UTCstring = Today.toUTCString(); return UTCstring; } function getcookie(cookiename) { var cookiestring=""+document.cookie; var index1=cookiestring.indexOf(cookiename); if (index1==-1 || cookiename=="") return ""; var index2=cookiestring.indexOf(';',index1); if (index2==-1) index2=cookiestring.length; return unescape(cookiestring.substring(index1+cookiename.length+1,index2)); } function check(id) { } var status = ""; var online_image = "http://www.atendimentoaovivo.com.br/chat/images/defonline.gif"; var offline_image = "http://www.atendimentoaovivo.com.br/chat/images/defoffline.gif"; var starttime = timer(); var time; var ismac = navigator.platform.indexOf('Mac'); var image; var imgwidth; var refurl = escape(document.referrer); var page = escape(document.location.toString()); var useragent = navigator.appName + " - " + navigator.userAgent; var sRef = window.document.referrer; var sPath = window.location.href; var sTitle= window.document.title; var vivo_id = getcookie("vivo_id"); var vivo_visitas = getcookie("vivo_visitas"); var vivo_email = getcookie("vivo_email"); var vivo_nome = getcookie("vivo_nome"); var vivo_custom = getcookie("vivo_custom"); var idc=1667; var strPagina = 'idc='+idc+'&ref='+sRef+'&pag='+sPath+'&vivo_id='+vivo_id+'&vivo_visitas='+vivo_visitas+'&vivo_custom='+vivo_custom+'&vivo_nome='+vivo_nome+'&vivo_email='+vivo_email+'&vivo_title='+sTitle; document.write('
'); strPagina = 'http://chat.atendimentoaovivo.com.br/vivo_ncheck.asp?' + strPagina; document.write(''); start();