document.write('
'); var ehooObj; setTimeout("initEhooEvt()",0); function opnEhooTalk(obj){ var arr=obj.id.split("ehoosrvlist"); var url="http://im.31535.com/client.php?locale=zh-cn&style=original="+arr[1]; window.open(url); } function opnShowIcn(){ window.open("http://im.31535.com/client.php?locale=zh-cn&style=original"); } function showEhooErrMsg(err){ switch(err){ case 1: alert("通信失败:发起界面代码缺少(ehootip)对象。") break; case 2: alert("通信失败:发起界面代码缺少(titlefortip)对象。") break; case 3: alert("通信失败:发起界面代码缺少(accetpfortip或nextfortip)对象。") break; } } function initEhooEvt(){ attachBtns(); if(document.getElementById("ehootip")==null){ showEhooErrMsg(1); }else{ document.getElementById("ehootip").style.display="block"; } if(document.getElementById("titlefortip")==null){ showEhooErrMsg(2); }else{ document.getElementById("titlefortip").innerHTML="您好,欢迎您访问重庆风信科技营销型站网建设在线客服平台,请问有什么需要帮忙的?"; } resetEhooPos(); } function attachBtns(){ var accetpfortip=document.getElementById("accetpfortip"); var nextfortip=document.getElementById("nextfortip"); if(accetpfortip==null||nextfortip==null){ showEhooErrMsg(3); return; } if(accetpfortip.attachEvent){ accetpfortip.attachEvent("onclick",accetpEvt); nextfortip.attachEvent("onclick",nextEvt); }else if(accetpfortip.addEventListener){ accetpfortip.addEventListener("click",accetpEvt,false); nextfortip.addEventListener("click",nextEvt,false); } } function accetpEvt(){ document.getElementById("ehootip").style.display="none"; window.open("http://im.31535.com/client.php?locale=zh-cn&style=original");document.getElementById("ehoobox").style.display="block"; resetEhooPos(); } function nextEvt(){ document.getElementById("ehootip").style.display="none"; document.getElementById("ehoobox").style.display="block"; resetEhooPos(); } window.onresize=function(){ resetEhooPos(); } window.onscroll=function(){ resetEhooPos(); } function getID(swfID){ if (navigator.appName.indexOf("Microsoft") > -1){ ehooObj = window[swfID]; } else { ehooObj = document[swfID]; } } function getTopFrameObj(para){ if(para==""){ var val=window.top; }else{ var val=window.top.document.getElementById(para); } return val; } function getBodyCW(){ var obj=getTopFrameObj(""); if(obj.innerWidth){ bodyCW=obj.innerWidth; }else if(obj.document.documentElement&&obj.document.documentElement.clientWidth){ bodyCW=obj.document.documentElement.clientWidth; }else if(obj.document.body){ bodyCW=obj.document.body.clientWidth; } return parseInt(bodyCW); } function getBodyCH(){ var obj=getTopFrameObj(""); if(obj.innerHeight){ bodyCH=obj.window.innerHeight; }else if(obj.document.documentElement&&obj.document.documentElement.clientHeight){ bodyCH=obj.document.documentElement.clientHeight; }else if(obj.document.body){ bodyCH=obj.document.body.clientHeight; } return parseInt(bodyCH); } function dealStrPx(str){ return parseInt(str.replace("px","")); } function resetEhooPos(){ var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); document.getElementById("ehoobox").style.left=((getBodyCW()-120)+0)+"px"; document.getElementById("ehoosrvlist").style.left=((getBodyCW()-110)+0)+"px"; document.getElementById("ehoobox").style.top=((getBodyCH()-168)/2+0+parseInt(scrollTop))+"px"; document.getElementById("ehoosrvlist").style.top=((getBodyCH()-document.getElementById("ehoosrvlist").offsetHeight)/2+0+parseInt(scrollTop))+"px"; document.getElementById("ehootip").style.left=(getBodyCW()-430)/2+"px"; document.getElementById("ehootip").style.top=((getBodyCH()-138)/2+parseInt(scrollTop))+"px"; } document.write(''); document.write('');