!(function(){var gnwebchat={bw8seajs:null,bw8chatjsroot:null,bw8chathost:null,bw8parseresroot:function(){var tagobjs=document.getelementsbytagname("script");for(var tagidx in tagobjs){if(typeof(tagobjs[tagidx].getattribute)=="undefined"){continue}var tagsrc=tagobjs[tagidx].getattribute("src");if(tagsrc!=null&&tagsrc.indexof("chatinit")!=-1){gnwebchat.bw8chatjsroot=tagsrc.replace(/chatinit[^.]*\.js.*$/,"");var myurlarr=tagsrc.match(/(http|https):\/\/([^\/]*)/i);if(myurlarr!=null){gnwebchat.bw8chathost=myurlarr[0]}break}}},bw8loadcssjspkg:function(tp,url,fun,parobj){var nowdate=new date();var version=""+nowdate.getfullyear()+nowdate.getmonth();if(url.indexof("?")==-1){url+="?rs=std-"+version}else{url+="&rs=std-"+version}var _doc=document.getelementsbytagname("head")[0];var js=null;if(tp=="css"){js=document.createelement("link");js.setattribute("rel","stylesheet");js.setattribute("type","text/css");js.setattribute("href",url)}else{js=document.createelement("script");js.setattribute("type","text/javascript");js.setattribute("src",url);js.setattribute("charset","gb2312");if(parobj){for(var i in parobj){js.setattribute(i,parobj[i])}}}js.caller=this;_doc.appendchild(js);if(!/*@cc_on!@*/0){js.onload=function(){if(typeof(fun)!="undefined"){fun()}}}else{js.onreadystatechange=function(){if(js.readystate=="loaded"||js.readystate=="complete"){if(typeof(fun)!="undefined"){fun()}}}}},initconfig:function(){gnwebchat.bw8seajs=seajs;gnwebchat.bw8seajs.config({base:gnwebchat.bw8chatjsroot+"sea-modules",paths:{"bw8im":gnwebchat.bw8chatjsroot+"sea-modules/bw8im",},alias:{"jquery":"jquery/jquery/1.10.1/jquery","entrance":"bw8im/im.entrance","store":"store/store.everything.min","upload":"aliyun/plupload.full.min",},debug:true,charset:"gbk",});gnwebchat.bw8seajs.use("entrance",function(entrance){var bw8imentrance=new entrance("bw8-chatwrap");var config={"bw8root":gnwebchat.bw8chathost,};bw8imentrance.init(config)})},init:function(){gnwebchat.bw8parseresroot();gnwebchat.bw8loadcssjspkg("js",gnwebchat.bw8chatjsroot+"sea-modules/seajs/sea.js",gnwebchat.initconfig,{id:"seajsnode"})}};gnwebchat.init()})();