document.open(); live800_companyID="121649"; var enterurl="http://www.diablo3goldlife.com"; var isOldSkin=false; jid="7506278194"; live800_configID="2633"; var live800_baseUrl="chat32.live800.com"; var live800_baseHtmlUrl="chat32.live800.com"; var live800_baseWebApp="/live800"; var live800_baseChatHtmlDir="/chatClient"; live800_codeType="steady2"; live800_configContent="live800_float=1&live800_online=http%3A%2F%2Fchat8.live800.com%2Flive800%2FchatClient%2Ficons%2F2000_online.gif&live800_offline=http%3A%2F%2Fchat8.live800.com%2Flive800%2FchatClient%2Ficons%2F2000_offline.gif&live800_switch=0"; window.onerror = function(){return true;}; if(!live800)var live800={}; if(!live800.Sys)live800.Sys={}; if(!live800.utils)live800.utils={}; //proxy function if(live800_codeType=="steady"){ if (!window.Sys){ window.Sys=live800.Sys; }else{ if(!window.Sys.getObj)window.Sys.getObjt=live800.Sys.getObj; } }; function getchat() { //document.open(); live800_companyID="121649"; var enterurl="http://www.diablo3goldlife.com"; var isOldSkin=false; jid="7506278194"; live800_configID="2633"; var live800_baseUrl="chat32.live800.com"; var live800_baseHtmlUrl="chat32.live800.com"; var live800_baseWebApp="/live800"; var live800_baseChatHtmlDir="/chatClient"; live800_codeType="custom"; live800_configContent="live800_float=1&live800_online=http%3A%2F%2Fchat8.live800.com%2Flive800%2FchatClient%2Ficons%2F2000_online.gif&live800_offline=http%3A%2F%2Fchat8.live800.com%2Flive800%2FchatClient%2Ficons%2F2000_offline.gif&live800_switch=0"; var openurl = live800.globalStaticIcon.getChatboxUrl(); //window.open(''+openurl+'\', \'chatbox'+ live800_companyID + '\', \'toolbar=0,scrollbars=0,location=0,menubar=0,resizable=1,width=570,height=424\'); //this.newWindow.focus();this.newWindow.opener=window;return false; MyWindow=window.open(''+openurl+'','MyWindow','toolbar=0,scrollbars=0,location=0,menubar=0,resizable=1,width=570,height=424'); } if(!StaticIcon_generate)var StaticIcon_generate=function(){return live800.globalStaticIcon.generate();}; /* * Sys utils */ live800.Sys.urlDecode=function(str){ if("undefined" == typeof decodeURIComponent){ return unescape(str).replace(/\+/g, ' ').replace(/%2B/g,'+'); } else { return unescape(str).replace(/\+/g, ' ').replace(/%2B/g,'+'); } }; live800.Sys.getObj=function(objId){if (document.getElementById)return document.getElementById(objId);else if (document.all)return document.all(objId);}; live800.Sys.urlToParams=function(urlContent){ cmdMap = new Array(); cmdParams = new Array(); pos = -1; while (true) { newPos = urlContent.indexOf('&', pos+1); if (newPos>=0) { encodedProperty = urlContent.substring(pos+1, newPos); } else { encodedProperty = urlContent.substring(pos+1, urlContent.length); } equalsPos = encodedProperty.indexOf('='); paramName = encodedProperty.substring(0, equalsPos); paramValue = live800.Sys.urlDecode(encodedProperty.substring(equalsPos+1, encodedProperty.length)); cmdParams[paramName] = paramValue; if (newPos==-1) { break; } pos = newPos; } return cmdParams; }; live800.utils.paramsToUrl=function(params){ var urlString=""; for(var i in params){ if(params[i]!=""&&(typeof params[i]!="function")){ urlString+=params[i]+"&"; } } return urlString.substring(0,urlString.length-1); }; live800.utils.getTimestampPara=function(){ return "timestamp="+new Date().getTime(); }; live800.utils.getParam=function(){ var paramUrl=""; var getCookie=this.getCookie; if(getCookie("operatorId")!=null&&typeof getCookie("operatorId")!="undefined"&&getCookie("operatorId").length!=0&&getCookie("operatorId")!="undefined"){ paramUrl="operatorId="+getCookie("operatorId"); } if(getCookie("skillId")!=null&&getCookie("skillId")!="undefined"&&getCookie("skillId").length!=0&&getCookie("skillId")!="undefined"){ paramUrl=paramUrl+"&skillId="+getCookie("skillId"); } return paramUrl; }; live800.utils.setCookie=function(name,value){ var Days = 30; var exp = new Date(); //new Date("December 31, 9998"); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); }; live800.utils.getCookie=function(name){ var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); arr=document.cookie.match(reg); if(arr){return unescape(arr[2]);}else{return null;} }; live800.utils.delCookie=function(name){ var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval=this.getCookie(name); if(cval!=null){document.cookie= name + "="+cval+";expires="+exp.toGMTString();} }; live800.utils.setLiveCookie=function(){ this.delCookie("operatorId"); this.delCookie("skillId"); var params=live800.params; if(typeof params["live800_operator"]!="undefined"&¶ms["live800_operator"].length!=0&¶ms["live800_operator"]!="undefined") { this.setCookie("operatorId",params["live800_operator"]); } if(typeof params["live800_skill"]!="undefined"&¶ms["live800_skill"].length!=0&¶ms["live800_skill"]!="undefined") { this.setCookie("skillId",params["live800_skill"]); } }; live800.utils.getGid=function(){ if(typeof jid!="undefined"){ return "jid="+jid; }else{ return "";} }; live800.utils.getParam=function(){ var url=""; var params = live800.Sys.urlToParams(live800_configContent); if(typeof params["live800_operator"]!="undefined"&¶ms["live800_operator"].length!=0&¶ms["live800_operator"]!="undefined"){ url="operatorId="+params["live800_operator"]; } if(typeof params["live800_skill"]!="undefined"&¶ms["live800_skill"].length!=0&¶ms["live800_skill"]!="undefined"){ url=url+"skillId="+params["live800_skill"]; } return url; }; live800.utils.getTrustfulVisitorInfo=function(){ var visitorInfoUrl=""; if(typeof trustfulInfo!="undefined"&&trustfulInfo.length>0&&trustfulInfo!=null&&trustfulInfo!="null"){ visitorInfoUrl="info="+trustfulInfo; } return visitorInfoUrl; }; live800.utils.URLEncode=function(Str){ if(Str==null||Str=="") {return "";} var newStr=""; function toCase(sStr){ return sStr.toString(16).toUpperCase(); } for(var i=0,icode,len=Str.length;i=0x30&&icode<=0x39)||(icode>=0x41&&icode<=0x5A)||(icode>=0x61&&icode<=0x7A)){ newStr+=Str.charAt(i);} else{ newStr+="%"+toCase(icode);} } else if(icode<0x800){ newStr+="%"+toCase(0xC0+(icode>>6)); newStr+="%"+toCase(0x80+icode%0x40); } else{ newStr+="%"+toCase(0xE0+(icode>>12)); newStr+="%"+toCase(0x80+(icode>>6)%0x40); newStr+="%"+toCase(0x80+icode%0x40); } } return newStr; }; live800.utils.getEnterUrl=function(){ var url=""; if(enterurl=="null"){ enterurl=document.URL;} url=this.URLEncode(enterurl); return "enterurl="+url; }; //static Object live800.StaticIcon=function(inLogger, inPreferences){ this.logger = inLogger; this.preferences = inPreferences; }; live800.StaticIcon.prototype={ start:function(){ this.generate(); }, generate:function(){ if((typeof live800_codeType)=="undefined"){live800_codeType="null";} var layerHtml; var param=live800.utils.getParam(); layerHtml= ''; layerHtml += ''; layerHtml += ''; if(live800_codeType=="custom"||live800_codeType==null||live800_codeType==""||live800_codeType=="null"){ document.write(layerHtml); } if(live800_codeType=="steady2"||live800_codeType=="steady"){ return layerHtml; } }, getChatboxUrl:function(){ var urlString=""; urlString+=this.preferences["protocol"] + "://" + this.preferences["baseUrl"] + this.preferences["baseWebapp"] + this.preferences["baseChatHtmlDir"] +"/chatbox.jsp?"; urlString+="companyID="+this.preferences["companyID"]; urlString+="&configID="+this.preferences["configID"]; var utils=live800.utils; var params={ "jid":utils.getGid(), "enterUrl":utils.getEnterUrl(), "param":utils.getParam(), "info":utils.getTrustfulVisitorInfo(), "timestamp":utils.getTimestampPara() }; urlString+="&"+utils.paramsToUrl(params); return urlString; } }; live800.params=live800.Sys.urlToParams(live800_configContent); live800.utils.setLiveCookie(); if(live800_companyID == null || live800_companyID == ""){alert("miss companyID");}else{ var params=live800.params; preferences = new Array(); preferences["companyID"] = live800_companyID; preferences["configID"] = live800_configID; preferences["online"] = (params["live800_online"] !=null ? params["live800_online"] : ""); preferences["offline"] = (params["live800_offline"] !=null ? params["live800_offline"] : ""); preferences["protocol"] = "http"; preferences["baseUrl"] = live800_baseUrl; preferences["baseHtmlUrl"] = live800_baseHtmlUrl; preferences["baseWebapp"] = live800_baseWebApp; preferences["baseChatHtmlDir"] = live800_baseChatHtmlDir; preferences["visitorIDInSession"] = preferences["companyID"] + "chater"; var globalStaticIcon = new live800.StaticIcon("", preferences); globalStaticIcon.start(); live800.globalStaticIcon=globalStaticIcon; }