function stopError() {
return true;
}
window.onerror = stopError;
var homepage="http://www.qxtxjx.com/kefu/";
var im_id="0013095";
var im_cid="kf0001";
var im_wid="1";
var im_sessionid="c968c7cfee482326da5c46fde57a7385";
var im_uid="0013095";
var im_randstr="c968c7cfee482326da5c46fde57a7385";
var im_title="在线客服";
var im_thecount=5;
var im_count=0;
var im_posx="left";
var im_x=60;
var im_posy="";
var im_y=300;
var im_tipstyle="006";
var im_urlkg="1";
var im_url="";
var im_opennew="0";
var im_autoinvite="Y";
var im_effect="0";
var im_inviteindex="2";
var im_invitetitle="欢迎光临呼呼通!";
var im_invitecontent="请问有什么可以帮您的么?";
var floatstop=false;
var isIE = document.all && window.external ? 1 : 0;
var StartInvite=false;
var UseDrag=false;
var NotAgree=false;
if(isIE){
window.attachEvent('onload',eqmk_onload);
}else{
window.addEventListener('load',eqmk_onload,false);
}
function $(id) {
var obj=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
if(document.layers)obj.style=obj;
return obj;
}
////////////////////////////////////////////////////////////////////
function ForceWindow(){
this.r = document.documentElement;
this.f = document.createElement("FORM");
this.f.target = "_blank";
this.f.method = "post";
this.r.insertBefore(this.f, this.r.childNodes[0]);
}
ForceWindow.prototype.open = function(sUrl){
this.f.action = sUrl;
this.f.submit();
}
var myWindow = new ForceWindow();
////////////////////////////////////////////////////////////////////
var JS_URL_TMP=homepage+'getdata/content/client.php?datatype=get';
JS_URL_TMP+='&action=update';
JS_URL_TMP+='&cid='+im_cid;
JS_URL_TMP+='&im_wid='+im_wid;
JS_URL_TMP+='&im_uid='+im_id;
JS_URL_TMP+='&im_sessionid='+im_sessionid;
JS_URL_TMP+='&im_systemlanguage='+(navigator.systemLanguage?navigator.systemLanguage:navigator.language);
JS_URL_TMP+='&im_color='+screen.colorDepth;
JS_URL_TMP+='&im_screensize='+screen.width + '*' + screen.height;
JS_URL_TMP+='&im_charset='+document.charset;
JS_URL_TMP+='&im_pageurl='+escape(window.location.href);
JS_URL_TMP+='&im_referer='+escape(window.document.referrer);
document.writeln('');
////////////////////////////////////////////////////////////////////
document.writeln('
");
document.writeln("
");
document.writeln('');
document.writeln("");
if (!document.layers)
//创建背景透明
function showbg(){
var re = {};
if (document.documentElement && document.documentElement.clientHeight) {
var doc = document.documentElement;
re.width = (doc.clientWidth > doc.scrollWidth) ? doc.clientWidth - 1 : doc.scrollWidth;
re.height = (doc.clientHeight > doc.scrollHeight) ? doc.clientHeight : doc.scrollHeight;
}
else {
var doc = document.body;
re.width = (window.innerWidth > doc.scrollWidth) ? window.innerWidth : doc.scrollWidth;
re.height = (window.innerHeight > doc.scrollHeight) ? window.innerHeight : doc.scrollHeight;
}
document.getElementById("ly").style.display="block";
document.getElementById("invite_div").style.display="block";
document.getElementById("ly").style.cssText = "position:absolute;left:0px;top:0px;width:100%;height:"+re.height+"px;filter:Alpha(Opacity=20);opacity:0.2;background-color:#000000;z-index:1;";
}
function CheckStatus(){
if(window.status.substr(0,11)=='kefu_invite'){
var t=window.status.split('###');
im_wid=t[1];
$('invite_top_center').innerHTML=t[2]+':';
$('invite_text').innerHTML=t[3];
window.status='';
NewInvite();
}
}
function CheckNewData(){
JS_URL_TMP=homepage+'getdata/content/client.php?datatype=get';
JS_URL_TMP+='&action=newGet2';
JS_URL_TMP+='&cid='+im_cid;
JS_URL_TMP+='&wid='+im_wid;
JS_URL_TMP+='&uid='+im_uid;
$("eqmk_kefu_code_js").src=JS_URL_TMP;
}
window.status=window.status.toString()+' ';
if(window.status!==''){
setInterval("CheckStatus()",50);
document.writeln('
');
}else{
setInterval("CheckNewData()",6000);
}
function OpenDialog(wid){
if($("invite_div").style.display=='none'){
$("invite_div").style.display='';
showbg();
}
if (im_urlkg==0 && im_url!="")
{
homeindex=im_url+"?act=/";
}
else
{
homeindex=homepage;
}
window.open(homeindex+"kf.php?mod=client&cid="+im_cid+"&wid="+wid+"&uid="+im_sessionid,"KefuDialog","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=700,height=472");
document.getElementById("invite_div").style.visibility = "hidden";
}
function Accept(){
OpenDialog(im_wid);
document.getElementById("ly").style.display="none";
}
function Next(){
document.getElementById("ly").style.display="none";
document.getElementById("invite_div").style.display="none";
//NotAgree=true;
}
function CloseDiv(){
document.getElementById("ly").style.display="none";
document.getElementById("frame_div").style.visibility = "hidden";
floatstop=true;
}
function eqmk_onload(){
if(im_autoinvite=='Y')setTimeout("NewInvite()",im_thecount*1000);}
lastScrollY = 0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("frame_div").style.top = parseInt(document.getElementById("frame_div").style.top)+percent+"px";
lastScrollY=lastScrollY+percent;
}
window.setInterval("heartBeat()",1);
lastScrollY2 = 0;
function heartBeat2(){
var diffY2;
if (document.documentElement && document.documentElement.scrollTop)
diffY2 = document.documentElement.scrollTop;
else if (document.body)
diffY2 = document.body.scrollTop
else
{/*Netscape stuff*/}
percent2=.1*(diffY2-lastScrollY2);
if(percent2>0)percent2=Math.ceil(percent2);
else percent2=Math.floor(percent2);
document.getElementById("invite_div").style.top = parseInt(document.getElementById("invite_div").style.top)+percent2+"px";
lastScrollY2=lastScrollY2+percent2;
}
window.setInterval("heartBeat2()",1);
var expDays = 1;
var page =homepage+"kf.php?mod=client&cid="+im_cid+"&wid="+im_wid+"&uid="+im_sessionid;
var windowprops = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=700,height=472";
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*1*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);
windowopennewkf=window.open(page, "", windowprops);
}
else {
count++;
SetCookie('count', count, exp);
}
}
function NewInvite(){
if(im_inviteindex=='0'){
return false;
}
if($("invite_div").style.display!=='none'){
return false;
}
if(NotAgree){
return false;
}
if(im_opennew=="1"){
checkCount();
if(windowopennewkf == null)
window.location=homepage+"kf.php?mod=client&cid="+im_cid+"&wid="+im_wid+"&uid="+im_sessionid;
return false;
}
if($("invite_div").style.display=='none'){
$("invite_div").style.display='';
if(im_effect==1)
{
showbg();
}
}
}