www.gusucode.com > 【T683】驾校驾驶学校汽车类行业网站织梦模板 > 【T683】驾校驾驶学校汽车类行业网站织梦模板/templets/dede58/style/bw.js

    SWFObject_baidu=function(a,b){this.cid=b;this.swfId=a.id;this.options=a;this.asObjects={};this.onLoadInit=function(){};SWFObject_baidu.instances[this.swfId]=this};SWFObject_baidu.prototype.load=function(){((window.BDBridge&&window.BDBridge.Lib)||window.baidu).swf.create(this.options,this.cid)};SWFObject_baidu.prototype.getASObject=function(a){return this.asObjects[a.asoId]};SWFObject_baidu.prototype.registerASObject=function(c){var b=c.asoId;var a=this.swfId;return this.asObjects[b]=new ASObject_baidu({asoId:b,swfId:a})};SWFObject_baidu.prototype.getASObjectProperty=function(a){if(this.swf==null){this.swf=document[this.swfId]||window[this.swfId]}return this.swf.getASObjectProperty(a)};SWFObject_baidu.prototype.setASObjectProperty=function(a){if(this.swf==null){this.swf=document[this.swfId]||window[this.swfId]}this.swf.setASObjectProperty(a)};SWFObject_baidu.prototype.callASObjectMethod=function(a){if(this.swf==null){this.swf=document[this.swfId]||window[this.swfId]}return this.swf.callASObjectMethod(a)};SWFObject_baidu.instances={};SWFObject_baidu.getSWFObject=function(a){return SWFObject_baidu.instances[a.swfId]};SWFObject_baidu.dispatchASObjectEvent=function(e){var d=e.swfId;var c=e.asoId;var f=e.type;var h=e.data;var a=SWFObject_baidu.getSWFObject({swfId:d});var b=(c==undefined)?a:a.getASObject({asoId:c});var j="on"+f.substr(0,1).toUpperCase()+f.substr(1);if(b[j]!=null){b[j](h)}};SWFObject_baidu.registerASObject=function(d){var c=d.swfId;var b=d.asoId;var a=SWFObject_baidu.getSWFObject(d);a.registerASObject(d)};ASObject_baidu=function(a){this.swfId=a.swfId;this.asoId=a.asoId;this.swfObject=SWFObject_baidu.getSWFObject(a);if(ASObject_baidu.instances[this.swfId]==null){ASObject_baidu.instances[this.swfId]={}}ASObject_baidu.instances[this.swfId][this.asoId]=this};ASObject_baidu.prototype.get=function(a){return this.swfObject.getASObjectProperty({asoId:this.asoId,property:a})};ASObject_baidu.prototype.set=function(b,a){this.swfObject.setASObjectProperty({asoId:this.asoId,property:b,value:a})};ASObject_baidu.prototype.call=function(b,a){return this.swfObject.callASObjectMethod({asoId:this.asoId,method:b,parameters:a})};ASObject_baidu.instances={};window.baiduLS=window.baiduLS||{version:"1-0-0"};baiduLS.localStorage=baiduLS.localStorage||{mobile:function(){var a=navigator.userAgent;return !!a.match(/.*Mobile.*/)||("ontouchstart" in window)}(),onLoadInit:function(){}};baiduLS.localStorage.load=function(a,c){if(baiduLS.localStorage.mobile){if(baiduLS.localStorage.onLoadInit){baiduLS.localStorage.onLoadInit()}return}baiduLS.localStorage.so=new SWFObject_baidu(a,c);var b=baiduLS.localStorage.so;b.onLoadInit=function(d){baiduLS.localStorage.ao=b.asObjects.localStorage;if(baiduLS.localStorage.onLoadInit){baiduLS.localStorage.onLoadInit()}};b.load()};baiduLS.localStorage.read=function(b,a){if(baiduLS.localStorage.mobile){return window.localStorage.getItem(b+"_"+a)}return baiduLS.localStorage.ao.call("read",[b,a])};baiduLS.localStorage.write=function(c,a,b){if(baiduLS.localStorage.mobile){return window.localStorage.setItem(c+"_"+a,b)}return baiduLS.localStorage.ao.call("write",[c,a,b])};baiduLS.localStorage.remove=function(b,a){if(baiduLS.localStorage.mobile){return window.localStorage.removeItem(b+"_"+a)}return baiduLS.localStorage.ao.call("remove",[b,a])};baiduLS.localStorage.clear=function(b){if(baiduLS.localStorage.mobile){for(var a in window.localStorage){if(window.localStorage.hasOwnProperty(i)&&i.indexOf(b)==0){window.localStorage.setItem(b+"_"+key,"")}}return}return baiduLS.localStorage.ao.call("clear",[b])};var BDBridgeStat=(function(){var d={siteId:"",mainId:""};var o={mainId:"",subId:"",sessionId:"",eventId:"",chatId:"",from:"",open:"",valid:"",count:""};var r="http://hm.baidu.com/hm.gif";var n=0;var c="&nv=0&st=4&v=bridge-0.2&rnd=";var l={};var s={REFRESH_IM:1,SEND_INVITE:3,ACCEPT_INVITE:4,SEND_MESS:5,VISITOR_IM:6,SERVER_IM:7,START_IM:0};var b=["subId","sessionId","eventId","chatId","from","open","valid","count"];var j={visitor_count:0};function m(){return Math.floor(Math.random()*10000000000)}function h(v){var t=new Image();var u=r+"?"+v;t.onload=t.onerror=function(){t=null};t.src=u}function k(v,t){for(var u in v){if(v.hasOwnProperty(u)){t[u]&&(v[u]=t[u])}}}function a(t){var u="si="+d.siteId+"&et=99&ep="+d.mainId;u=u+e(t);u=u+c+m();h(u)}function e(u){var w;var x;var v="";var t=b.length;for(w=0;w<t;w++){x=b[w];v+=u[x]===""?("*"+n):("*"+u[x])}return v}function p(t){if(j.visitor_count){k(o,t);o.eventId=s.VISITOR_IM;o.count=j.visitor_count;o.valid=1;a(o);j.visitor_count=0;o.valid=0}}function f(t){if(!t.chatId){j.visitor_count+=t.count}else{k(o,t);o.eventId=s.VISITOR_IM;o.valid=1;a(o);j.visitor_count=0;o.valid=0}}return function(v,u,t){if(!v){return}d.siteId=d.siteId||u.siteId||0;d.mainId=d.mainId||u.mainId||0;v=v.toUpperCase();switch(v){case"VISITOR_IM":f(t);break;case"START_IM":p(t);break;default:k(o,t);o.eventId=s[v];a(o)}}}());var BDBridgeLog=(function(){var d={};var c=BDBridge.BD_BRIDGE_ROOT+"statlog/stat.gif";var b={SEND_INVITE:"invite",CLICK_ICON:"clickIcon",CLOSE_INVITE:"inviteclose",CLICK_MESS:"clickIconMess",BLOCK_POP:"blockpop",ALREADY_OPEN:"alreadyopen",OPEN_WEBIMLITE:"openwebimlite",LOAD_TIME:"loadtime",GET_BROWSER:"browser"};function f(k,j){k=k+a(k,j.data);var h=new Image();h.onload=function(){h.onload=null;h.onerror=null;h=null;if(j.onsuccess){j.onsuccess()}};h.onerror=function(){h.onload=null;h.onerror=null;h=null;if(j.onfail){j.onfail()}};h.src=k}function a(h,l){var k=({}).toString.call(l);var m="?";if(h.indexOf("?")>-1){m="&"}if(k==="[object Object]"){for(var j in l){if(l.hasOwnProperty(j)){m+=j+"="+encodeURIComponent(l[j])+"&"}}m+="t="+e()}return m}var e=function(){var h=0;return function(){var j=new Date().getTime();j+="_"+h++;return j}}();return function(m,j,l,h){if(!m||!b[m]){return}d.siteId=d.siteId||l||0;d.ucid=d.ucid||h||0;var k=c+"?siteid="+d.siteId+"&ucid="+d.ucid+"&type="+b[m];f(k,{data:j||{}})}})();var BDBrowser=(function(){var b={};var e={chrome:1,firefox:2,safari:3,opera:4,ie:6};function a(h,j){var f=e[h];if(f===6){f=j;if(f>9){f=9}else{if(f<6){f=6}}}if(!f){f=5}return f}function c(){for(var f in b){if(b.hasOwnProperty(f)&&b[f]){b.type=a(f,b[f]);return}}if(Object.hasOwnProperty.call(window,"ActiveXObject")&&!window.ActiveXObject){b.type=9;return}b.type=5}function d(){b.chrome=/chrome\/(\d+\.\d+)/i.test(navigator.userAgent)?+RegExp["\x241"]:undefined;b.firefox=/firefox\/(\d+\.\d+)/i.test(navigator.userAgent)?+RegExp["\x241"]:undefined;b.ie=/msie (\d+\.\d+)/i.test(navigator.userAgent)?(document.documentMode||+RegExp["\x241"]):undefined;b.opera=/opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent)?+(RegExp["\x246"]||RegExp["\x242"]):undefined;b.safari=/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent)?+(RegExp["\x241"]||RegExp["\x242"]):undefined;c()}d();return b})();var BDBridge=window.BDBridge||{};BDBridge.rcvbase=BDBridge.rcvbase||(function(){var m;var k=BDBridge.BD_BRIDGE_RCV_ROOT,d=BDBridge.BD_BRIDGE_DATA,j=BDBridge.BD_BRIDGE_INVITE,b,f;var a={monitored:false,entered:false,group_data:null,zhixin:"",ls:null,lsId:"bridge",lsKey:{bid:BDBridge.BD_BRIDGE_DATA.siteid+"bid24",data:BDBridge.BD_BRIDGE_DATA.siteid+"data",last:BDBridge.BD_BRIDGE_DATA.siteid+"last",show:BDBridge.BD_BRIDGE_DATA.siteid+"show",instance:BDBridge.BD_BRIDGE_DATA.siteid+"instance",chat:BDBridge.BD_BRIDGE_DATA.siteid+"chat",startload:BDBridge.BD_BRIDGE_DATA.siteid+"startload"},enterAgain:0,reportTimer:null,reportInviteStatus:0,group_callback_list:[],refresh_callback_list:[],autoInvite_callbacklist:[],monitor_callback_list:[],reject_callback_list:[],enter_callback_list:[]};var l={HOLMES_REPORT_URL:"http://hm.baidu.com/hm.gif"};var e=BDBridgeStat;var c=BDBridgeLog;var h={setCookie:function(n,o,p){if(p){BDBridge.Lib.cookie.setRaw(n+d.siteid,o,{expires:p*24*60*60*1000,path:"/"})}else{BDBridge.Lib.cookie.setRaw(n+d.siteid,o,{path:"/"})}},getCookie:function(n){var o=BDBridge.Lib.cookie.getRaw(n+d.siteid);return o},getTimeZone:function(){var o=new Date().getTimezoneOffset();var n=parseInt(o/60);var r=o%60;var p="-";if(n<0||r<0){p="+";n=-n;if(r<0){r=-r}}n=n+"";r=r+"";return"UTC"+p+n+":"+r},getParams:function(){var p=window.navigator;var n=window.screen;var o={};o.lang=p.language||p.systemLanguage;o.rsl=n.width+"*"+n.height;o.tz=h.getTimeZone();o.cbit=n.colorDepth;return o},enter:function(){d=d?d:BDBridge.BD_BRIDGE_DATA;if(!a.entered){a.entered=true;if(BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.bid)==null){BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.bid,"")}d.bid=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.bid);d.bid=d.bid!=null?d.bid:"";d.location=window.location.href;d.title=document.title.substring(0,100).replace(/\r|\n/g,"");var o=(document.referrer.indexOf("cpro.baidu.com")==-1)?document.referrer:h.__getCproSrc(document.referrer);var y=o;var u=window.location.host;if(y==""){if(h.getCookie("BRIDGE_R")){y=h.getCookie("BRIDGE_R")}else{h.setCookie("BRIDGE_R",y,2)}}else{if(y.indexOf(u)==-1){h.setCookie("BRIDGE_R",y,2)}else{y=h.getCookie("BRIDGE_R");if(y==null){y=o}}}d.referrer=y;var v=["baidu.com","baidu.com","google.com","google.cn","bing.com","search.live.com","search.yahoo.com","one.cn.yahoo.com","sogou.com","gougou.com","youdao.com","soso.com","zhongsou.com","search.114.vnet.cn"];var x=["wd","word","q","q","q","q","p","p","query","search","q","w","w","kw"];var w=["gbk","gbk","utf8","utf8","utf8","utf8","utf8","utf8","gbk","utf8","utf8","gbk","gbk","gbk"];d.word="";d.coding="";for(var t=0,s=v.length;t<s;t++){if(o.indexOf(v[t])==-1){continue}else{d.word=BDBridge.Lib.url.parseQuery(o,x[t]);d.word=d.word!=null?d.word:"";d.coding=w[t];break}}d.bdclkid=BDBridge.Lib.url.parseQuery(window.location.href,"bdclkid");d.bdclkid=d.bdclkid!=null?d.bdclkid:"";var z=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.firstInfo)||"{}";z=BDBridge.Lib.json.parse(z);var n=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.prevInfo)||"{}";n=BDBridge.Lib.json.parse(n);b=new Date().getTime();k=k?k:BDBridge.BD_BRIDGE_RCV_ROOT;var p="Enter.php?callback=BDBridge.rcvbase.__handleEnter&siteid="+d.siteid+"&bid="+d.bid+"&referrer="+encodeURIComponent(d.referrer)+"&word="+encodeURIComponent(d.word)+"&coding="+d.coding+"&bdclkid="+d.bdclkid+"&title="+encodeURIComponent(d.title)+"&lv="+(n.lv||"0")+"&ucid="+d.ucid+"&lc="+(n.lc||"0")+"&ls="+(n.ls||"")+"&lvp="+(n.lvp||"0")+"&vis_type="+(BDBridge.Lib.mobile?2:3)+"&ftime="+(z.ft||"0")+"&fs="+(z.fs||"")+"&ltime="+(n.lt||"0")+"&"+BDBridge.Lib.parseUrlParam(h.getParams())+"&t="+(new Date()).getTime().toString();BDBridge.Lib.loadScript("BDBridgeSendData",k.replace("rqiao.baidu.com","r.qiao.baidu.com")+p)}},__getCproSrc:function(n){var p=BDBridge.Lib.url.parseQuery(n,"word");var o=BDBridge.Lib.url.parseQuery(n,"u");if(p!=null&&o==null){n=p}else{if(p==null&&o!=null){n=o}else{return""}}n=n.replace(/%3A/gi,":").replace(/%2F/gi,"/").replace(/%3F/gi,"?");n=n.replace(/(((http|https):\/\/)?[\w\.-]+)(\/|\?)?\S*/i,"$1");if(n.search(/^(http|https):\/\//i)==-1){n="http://"+n}return n},startMonitor:function(){if(!a.monitored){h.enter();a.monitored=true}},_convertGroup:function(y){if(!y){return[]}var r=y.length;var z=0;var A="";var o="";var w="";for(var x=0;x<r;x++){if(y[x]["user"].length>0){z++;A=y[x]["groupid"];o=y[x]["groupname"];w=x}}if(z==0){return[]}if(z==1){var v=0;var t=y[w]["user"];for(var u=0,p=t.length;u<p;u++){if((t[u]["islogin"]-0)!=0){v=1;break}}y[w].online=v}else{for(var u=0;u<r;u++){var t=y[u]["user"];if(t.length!=0){var v=0;for(var s=0,p=t.length;s<p;s++){if((t[s]["islogin"]-0)!=0){v=1;break}}y[u].online=v}}}return y},__doGroup:function(n){a.group_callback_list.push(n);if(a.group_data){h.__handleEnter(a.group_data)}else{h.enter()}},doAutoInvite:function(n){a.autoInvite_callbacklist.push(n)},doInvite:function(n){a.refresh_callback_list.push(n);h.startMonitor()},stopMonitor:function(){if(a.monitored){h._leave();a.monitored=false}},_getAuthorityGroup:function(v){var t=BDBridge.BD_BRIDGE_GROUP,o=[],w=t.length,s=v.length,u,n,p,r;for(p=0;p<w;p++){n=t[p];for(r=0;r<s;r++){u=v[r];if(u.groupid==n){o.push(u);break}}}return o},__handleEnter:function(t){d=d?d:BDBridge.BD_BRIDGE_DATA;var u=[];j=BDBridge.BD_BRIDGE_INVITE;BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.bid,t.bid);d.bid=t.bid;d.from=t.from;d.word=t.word;d.wordid=t.wordid;d.wordtype=t.wordtype;if(typeof t.zhixin!="undefined"&&t.zhixin!==""){a.zhixin=t.zhixin;BDBridge.BD_BRIDGE_WEBIM.webimopentype=0}if(typeof t.service_type!="undefined"&&t.service_type>0){a.servicetype=t.service_type}u=h._getAuthorityGroup(t.group);d.group=h._convertGroup(u);(function(){if(BDBridge.Lib.mobile&&(BDBridge.BD_BRIDGE_ICON_CONFIG.iconlvtype==0||BDBridge.BD_BRIDGE_INVITE.inviteauto==1)){var x=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.prevInfo)||"{}";x=BDBridge.Lib.json.parse(x);var y=x.ls||"";var w=BDBridge.BD_BRIDGE_ROOT+"?module=default&controller=webim&action=visdistribute";var z="&siteid="+d.siteid+"&ucid="+d.ucid+"&groupid=&groupname=&from="+encodeURIComponent(d.from)+"&lastsubid="+y+"&callback=BDBridge.Lib.webim.handleVisDistribute";BDBridge.Lib.loadScript("BDBridgeVisDistribute",w+z)}}());var r=BDBridge.Lib.json,p=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.prevInfo)||"{}";p=r.parse(p);p.lv=t.lv||0;p.lvp=t.lvp||0;p.lt=t.ltime||0;BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.prevInfo,r.stringify(p));var v=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.firstInfo)||"{}";v=r.parse(v);v.ft=t.ftime||0;BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.firstInfo,r.stringify(v));if(BDBridge.Lib.cookie.getRaw("BRIDGE_REFRESH")==null){if(j.invitemanual==1){BDBridge.Lib.cookie.setRaw("BRIDGE_REFRESH",5000)}else{BDBridge.Lib.cookie.setRaw("BRIDGE_REFRESH",15000)}}if(t.saved==1){a.entered=true;if(BDBridge.Lib.cookie.getRaw("BRIDGE_CLOCK")==null){BDBridge.Lib.cookie.setRaw("BRIDGE_CLOCK",(new Date()).getTime())}BDBridge.Lib.cookie.setRaw("BRIDGE_NEED",1);a.reportTimer=setInterval(BDBridge.rcvbase.__refresh,500);var n=a.enter_callback_list.length;while(n--){a.enter_callback_list[n].call(null,d,t.group)}}else{if(t.saved==0&&a.enterAgain<3){a.entered=false;h.enter();a.enterAgain++}}var n=a.group_callback_list.length;while(n--){a.group_callback_list[0](t.group);a.group_callback_list.shift()}a.group_data=t.group;if(j.inviteauto!=0){if(j.invitetype==0){if(BDBridge.Lib.cookie.getRaw("BRIDGE_INVITE_1")==null){BDBridge.Lib.cookie.setRaw("BRIDGE_INVITE_1",0)}if(BDBridge.Lib.cookie.getRaw("BRIDGE_INVITE_1")==0){BDBridge.Lib.cookie.setRaw("BRIDGE_INVITE_1",1)}else{return}}var n=a.autoInvite_callbacklist.length;while(n--){a.autoInvite_callbacklist[0](t.group);a.autoInvite_callbacklist.shift()}}var o=new Date().getTime();var s=o-BDBridge.Lib.startTime;c("LOAD_TIME",{cost:s},d.siteid,d.ucid)},__refresh:function(){k=k?k:BDBridge.BD_BRIDGE_RCV_ROOT;d=d?d:BDBridge.BD_BRIDGE_DATA;if(BDBridge.Lib.cookie.getRaw("BRIDGE_NEED")==1){if((new Date()).getTime()-BDBridge.Lib.cookie.getRaw("BRIDGE_CLOCK")>=BDBridge.Lib.cookie.getRaw("BRIDGE_REFRESH")){var n="Refresh.php?callback=BDBridge.rcvbase.__handleRefresh&bid="+d.bid+"&siteid="+d.siteid+"&ucid="+d.ucid+"&t="+(new Date()).getTime().toString();BDBridge.Lib.loadScript("BDBridgeReport",k+n);BDBridge.Lib.cookie.setRaw("BRIDGE_CLOCK",(new Date()).getTime())}}else{clearInterval(a.reportTimer)}},__handleRefresh:function(s){if(s.saved==0){BDBridge.Lib.cookie.setRaw("BRIDGE_NEED",0)}var p=a.refresh_callback_list,n=p.length,o=0;if(s.status==1&&!a.reportInviteStatus){e("SEND_INVITE",{siteId:d.SITE_ID,mainId:d.mainid},{subId:s.subid||0,open:1});var r=a.zhixin==""?"":("&orderKey="+encodeURIComponent(a.zhixin));var t=a.servicetype==undefined?"":("&servicetype="+encodeURIComponent(a.servicetype));BDBridge.Lib.imgRequest(BDBridge.BD_BRIDGE_ROOT+"statlog/stat.gif?","siteid="+d.siteid+"&ucid="+d.ucid+"&type=invite"+r+t+"&t="+(+new Date()));a.reportInviteStatus=1}else{if(s.status!=1){a.reportInviteStatus=0}}while(o<n){p[o](s);o++}},reject:function(r){k=k?k:BDBridge.BD_BRIDGE_RCV_ROOT;d=d?d:BDBridge.BD_BRIDGE_DATA;var o=new Image();var p="bid="+d.bid+"&siteid="+d.siteid+"&ucid="+d.ucid+"&t="+(new Date()).getTime().toString();o.src=k+"Reject.php?"+p;o.onload=function(){};a.reject_callback_list.push(r);var n=a.reject_callback_list.length;while(n--){a.reject_callback_list[0]();a.reject_callback_list.shift()}},_leave:function(){k=k?k:BDBridge.BD_BRIDGE_RCV_ROOT;d=d?d:BDBridge.BD_BRIDGE_DATA;if(d.bid!=undefined){var n=new Image();var o="bid="+d.bid+"&siteid="+d.siteid+"&ucid="+d.ucid+"&t="+(new Date()).getTime().toString();n.onload=function(){};n.src=k+"Leave.php?"+o}}};return m={__doGroup:h.__doGroup,__handleEnter:h.__handleEnter,__refresh:h.__refresh,__handleRefresh:h.__handleRefresh,startMonitor:h.startMonitor,stopMonitor:h.stopMonitor,doInvite:h.doInvite,doAutoInvite:h.doAutoInvite,reject:h.reject,getOrderKey:function(){return a.zhixin},addRefreshHandler:function(n){a.refresh_callback_list.push(n)},addEnterHandler:function(n){a.enter_callback_list.push(n)}}})();var BDBridge=window.BDBridge||{};BDBridge.group=BDBridge.group||(function(){var c;var e=BDBridge.BD_BRIDGE_DATA;var a={SCHEME:{policy:function(h,f){},random:function(h,f){return b.__getRandomGroup(h)}},POLICY:{address:function(){return 2},familiarity:function(){return 1}},SCHEME_INFO:"random",POLICY_INFO:[]};var d={onlineGroup:null,offlineGroup:null,group:e.group};var b={_getPolicy:function(m,j){len=m.length,maxValue=0;var k=0;var n="";var l,h;for(var f=0;f<len;f++){l=0;for(h in policy_info){l+=a.POLICY[POLICY_INFO[h]]()}if(l>maxValue){maxValue=l;k=m[f]["groupid"];n=m[f]["groupname"]}}return({groupid:k,groupname:n})},_convertGroup:function(t){var h=t.length;var u=0;var r="";d.onlineGroup=[];d.offlineGroup=[];for(var s=0;s<h;s++){if(t[s]["user"].length>0){u++;tempId=t[s]["groupid"];tempName=t[s]["groupname"];r=s}}if(u==0){d.onlineGroup=null;d.offlineGroup=null}else{if(u==1){var p=0;var m=t[r]["user"];for(var o=0,f=m.length;o<f;o++){if((m[o]["islogin"]-0)!=0){p=1;break}}if(p){d.onlineGroup.push(r)}else{d.offlineGroup.push(r)}}else{for(var o=0;o<h;o++){var m=t[o]["user"];if(m.length!=0){var p=0;for(var k=0,f=m.length;k<f;k++){if((m[k]["islogin"]-0)!=0){p=1;break}}if(p){d.onlineGroup.push(o)}else{d.offlineGroup.push(o)}}}}}},__getRandomGroup:function(k){if(!d.onlineGroup||!d.offlineGroup){b._convertGroup(k)}if(d.onlineGroup){return{}}var h=d.onlineGroup.length;var f=d.offlineGroup.length;var j=(h-0!=0)?d.onlineGroup[BDBridge.Lib.getRandom(0,h)]:d.offlineGroup[BDBridge.Lib.getRandom(0,f)];var l=e.group[j];return{groupid:l.groupid,groupname:l.groupname}}};return c={getGroupData:function(f){BDBridge.rcvbase.__doGroup(f)},getGroupObj:function(h,f){return a.SCHEME[a.SCHEME_INFO](h,f)}}})();var BDBridge=window.BDBridge||{};BDBridge.api=BDBridge.api||(function(){function a(b){switch(b){case"icon":BDBridge.Icon.hide();break;case"invite":BDBridge.invite.hide();break;case"mess":BDBridge.pigeon.hide();break;default:BDBridge.Icon.hide();BDBridge.invite.hide();BDBridge.pigeon.hide();break}}window.BaiduBridge={};BaiduBridge.hide=a})();var BDBridge=window.BDBridge||{};BDBridge.Icon=BDBridge.Icon||(function(){var t;var o,b,j,k='<iframe id="BDBridgeIconIframe" src="about:blank" frameborder="0" marginheight="0" marginwidth="0" style="display:none;_filter:alpha(opacity=0);"></iframe><div id="IconContainer"><div id = "bridgehead"><div class = "bdbridge-icon-head" style="z-index:2147483647;" id="bdbridgeIconBg"></div><div id = "bridgeopacity"></div></div><div id ="bridgebottom" style="position:relative;"><div class="bdbridge-icon-left" style="position:absolute;left:0px;top:0;zoom:1;"><div id="bdbridge-left-close" style="cursor:pointer;"></div></div><div class="bdbridge-icon-right" style="*position:relative;z-index:100;" ><div class = "bdbridge-icon-group" id="IconGp"></div><div class = "bdbridge-icon-bottom" id="BrIcon"></div></div><div style="clear:both;font-size:0;line-height:0;"></div></div></div>',f=false,m,d,n,r,c,p,a={};var h=BDBridgeLog;var s={ROOT:BDBridge.BD_BRIDGE_ROOT+"res/iconbgcolorful/",BG_COLOR:"#F0D9BA",chatType:{byInvite:0,bySelf:1,enforce:5},BDBRIDGE_ICON_SPECIAL:[{left:"0_left.png",right:"0_right.png",lrw:25,lrh:66,close:"0_close.png",closeh:148,closew:92,x:12,dw:143,y:60,bg:"#0fb2cf",w:169,h:104,btn:"#daf8f8",txt:"#318f9f",filename:"0.png",description:"贴心服务"},{left:"1_left.png",right:"1_right.png",lrw:25,lrh:66,close:"1_close.png",closeh:165,closew:82,x:35,dw:143,y:60,bg:"#3e72af",w:200,h:100,btn:"#e7bee6",txt:"#a564ae",filename:"1.png",description:"紫色气泡"},{left:"2_left.png",right:"2_right.png",lrw:30,lrh:30,close:"2_close.png",closeh:133,closew:89,x:5,dw:143,y:8,bg:"#8a4910",w:187,h:61,btn:"#e9b180",txt:"#985b24",filename:"2.png",description:"休闲风格"},{left:"3_left.png",right:"3_right.png",lrw:25,lrh:66,close:"3_close.png",closeh:134,closew:77,x:17,dw:143,y:98,bg:"#c51700",w:174,h:132,btn:"#fbe9c1",txt:"#ed6a5b",filename:"3.png",description:"新年快乐"},{left:"4_left.png",right:"4_right.png",lrw:25,lrh:66,close:"4_close.png",closeh:105,closew:60,x:6,dw:143,y:105,bg:"#732f18",w:155,h:151,btn:"#efc692",txt:"#876252",filename:"4.png",description:"礼品多多"},{left:"5_left.png",right:"5_right.png",lrw:25,lrh:66,close:"5_close.png",closeh:134,closew:61,x:20,dw:143,y:153,bg:"#feb0da",w:189,h:205,btn:"#fbe9c1",txt:"#ed6a5b",filename:"5.png",description:"粉红惊喜"},{left:"6_left.png",right:"6_right.png",lrw:25,lrh:66,close:"6_close.png",closeh:152,closew:66,x:8,dw:143,y:245,bg:"#2f1c21",w:160,h:275,btn:"#f1c995",txt:"#734f40",filename:"6.png",description:"纸醉金迷"},{left:"7_left.png",right:"7_right.png",lrw:23,lrh:66,close:"7_close.png",closeh:133,closew:53,x:12,dw:143,y:117,bg:"#66b821",w:167,h:174,btn:"#fbe9c1",txt:"#ed6a5b",filename:"7.png",description:"缤纷乐园"},{left:"8_left.png",right:"8_right.png",lrw:24,lrh:68,close:"8_close.png",closeh:115,closew:53,x:17,dw:143,y:118,bg:"#e7e7e7",w:182,h:169,btn:"#fef7b4",txt:"#5f574f",filename:"8.png",description:"烂漫童趣"},{left:"9_left.png",right:"9_right.png",lrw:23,lrh:66,close:"9_close.png",closeh:125,closew:44,x:56,dw:143,y:86,bg:"#454641",w:228,h:134,btn:"#fbe9c1",txt:"#ed6a5b",filename:"9.png",description:"二战风云"},{left:"10_left.png",right:"10_right.png",lrw:25,lrh:66,close:"10_close.png",closeh:175,closew:68,x:36,dw:143,y:203,bg:"#ec4b96",w:201,h:217,btn:"#ffb7b7",txt:"#9d6980",filename:"10.png",description:"灯绿酒红"},{left:"11_left.png",right:"11_right.png",lrw:25,lrh:66,close:"11_close.png",closeh:136,closew:74,x:9,dw:143,y:136,bg:"#53b2ea",w:176,h:160,btn:"#cceefe",txt:"#1171c8",filename:"11.png",description:"森林雪人"},{left:"12_left.png",right:"12_right.png",lrw:25,lrh:66,close:"12_close.png",closeh:62,closew:116,x:72,dw:143,y:85,bg:"#6f9d1f",w:233,h:130,btn:"#d7f2a8",txt:"#5d8958",filename:"12.png",description:"可爱绿蛙"},{left:"13_left.png",right:"13_right.png",lrw:25,lrh:66,close:"13_close.png",closeh:148,closew:74,x:6,dw:143,y:114,bg:"#e6224c",w:174,h:141,btn:"#f2d0d3",txt:"#d86767",filename:"13.png",description:"可爱鸟儿"},{left:"14_left.png",right:"14_right.png",lrw:25,lrh:66,close:"14_close.png",closeh:114,closew:67,x:0,dw:143,y:60,bg:"#2968af",w:159,h:112,btn:"#c1daf4",txt:"#318f9f",filename:"14.png",description:"商务沟通"},{left:"15_left.png",right:"15_right.png",lrw:25,lrh:66,close:"15_close.png",closeh:142,closew:85,x:0,dw:143,y:60,bg:"#af2991",w:163,h:104,btn:"#f7b9d8",txt:"#cd469d",filename:"15.png",description:"酷炫镁光"},{left:"16_left.png",right:"16_right.png",lrw:25,lrh:66,close:"16_close.png",closeh:131,closew:73,x:10,dw:143,y:54,bg:"#6f5915",w:174,h:100,btn:"#d3c188",txt:"#978855",filename:"16.png",description:"咖啡早报"},{left:"17_left.png",right:"17_right.png",lrw:30,lrh:71,close:"17_close.png",closeh:123,closew:66,x:7,dw:143,y:90,bg:"#c01814",w:165,h:127,btn:"#f9ca94",txt:"#dc9764",filename:"17.png",description:"圣诞大礼"},{left:"18_left.png",right:"18_right.png",lrw:25,lrh:66,close:"18_close.png",closeh:121,closew:73,x:12,dw:143,y:75,bg:"#055f19",w:160,h:119,btn:"#fbe9c1",txt:"#ed6a5b",filename:"18.png",description:"圣诞大礼"},{left:"19_left.png",right:"19_right.png",lrw:30,lrh:73,close:"19_close.png",closeh:170,closew:78,x:14,dw:143,y:120,bg:"#53b2ea",w:180,h:134,btn:"#ffc3bb",txt:"#d3232c",filename:"19.png",description:"温暖情怀"},{left:"20_left.png",right:"20_right.png",lrw:30,lrh:71,close:"20_close.png",closeh:136,closew:61,x:5,dw:143,y:115,bg:"#c01814",w:166,h:144,btn:"#f9ca94",txt:"#dc9764",filename:"20.png",description:"摇摆挂饰"},{left:"21_left.png",right:"21_right.png",lrw:30,lrh:54,close:"21_close.png",closeh:171,closew:107,x:24,dw:143,y:91,bg:"#2aaf0c",w:180,h:141,btn:"#fbe9c1",txt:"#ed6a5b",filename:"21.png",description:"果绿青春"},{left:"22_left.png",right:"22_right.png",lrw:23,lrh:66,close:"22_close.png",closeh:136,closew:88,x:31,dw:143,y:77,bg:"#402810",w:206,h:128,btn:"#c0a888",txt:"#49301d",filename:"22.png",description:"国风书香"},{left:"23_left.png",right:"23_right.png",lrw:25,lrh:66,close:"23_close.png",closeh:177,closew:90,x:4,dw:143,y:160,bg:"#1152bf",w:178,h:195,btn:"#a5caff",txt:"#6f5a60",filename:"23.png",description:"蓝月亮"},{left:"24_left.png",right:"24_right.png",lrw:25,lrh:66,close:"24_close.png",closeh:179,closew:101,x:35,dw:143,y:92,bg:"#cab7f9",w:220,h:140,btn:"#ffc3bb",txt:"#d06369",filename:"24.png",description:"紫色迷情"},{left:"25_left.png",right:"25_right.png",lrw:25,lrh:66,close:"25_close.png",closeh:143,closew:88,x:14,dw:143,y:104,bg:"#0fb2cf",w:165,h:143,btn:"#a8e0f1",txt:"#2e93c2",filename:"25.png",description:"田园路牌"},{left:"26_left.png",right:"26_right.png",lrw:25,lrh:66,close:"26_close.png",closeh:188,closew:95,x:21,dw:143,y:104,bg:"#495a38",w:195,h:155,btn:"#d2e8b9",txt:"#6c8156",filename:"26.png",description:"水墨荷塘"},{left:"27_left.png",right:"27_right.png",lrw:25,lrh:66,close:"27_close.png",closeh:134,closew:115,x:34,dw:143,y:84,bg:"#C61700",w:197,h:133,btn:"#FDF9EC",txt:"#EC6B65",filename:"27.png",description:"龙年吉祥"},{left:"28_left.png",right:"28_right.png",lrw:25,lrh:66,close:"28_close.png",closeh:180,closew:120,x:43,dw:143,y:148,bg:"#194431",w:250,h:190,btn:"#e5f6fe",txt:"#1574c8",filename:"28.png",description:"免费试学"},{left:"29_left.png",right:"29_right.png",lrw:25,lrh:66,close:"29_close.png",closeh:148,closew:115,x:39,dw:143,y:118,bg:"#c61800",w:222,h:170,btn:"#fdf7e9",txt:"#e96757",filename:"29.png",description:"财神到"},{left:"30_left.png",right:"30_right.png",lrw:25,lrh:66,close:"30_close.png",closeh:165,closew:106,x:36,dw:143,y:148,bg:"#C51700",w:215,h:139,btn:"#FDF8EC",txt:"#ED6A5B",filename:"30.png",description:"金蛇报喜"},{left:"31_left.png",right:"31_right.png",lrw:25,lrh:66,close:"31_close.png",closeh:148,closew:115,x:16,dw:143,y:118,bg:"#C51700",w:175,h:173,btn:"#FDF8EC",txt:"#ED6A5B",filename:"31.png",description:"吉庆有余"}],SYS_ICON_BG:[{filename:"01.png",description:"花朵绽放",bgcolor:"#3290cd"},{filename:"02.png",description:"蓝海战略",bgcolor:"#275f87"},{filename:"03.png",description:"办公商务",bgcolor:"#3d6a7f"},{filename:"04.png",description:"青春纪念",bgcolor:"#71874c"},{filename:"05.png",description:"开卷有益",bgcolor:"#a09a80"},{filename:"06.png",description:"海滨小镇",bgcolor:"#a08f72"},{filename:"07.png",description:"绿海沙滩",bgcolor:"#826a6d"},{filename:"08.png",description:"长天翱翔",bgcolor:"#406e9e"},{filename:"09.png",description:"气球旅行",bgcolor:"#93c4eb"},{filename:"10.png",description:"健康宝贝",bgcolor:"#e9dee1"},{filename:"11.png",description:"夏日麦田",bgcolor:"#db9544"},{filename:"12.png",description:"蝶舞纷飞",bgcolor:"#2990be"},{filename:"13.png",description:"鱼戏牡丹",bgcolor:"#ece6cd"},{filename:"14.png",description:"绿色商务",bgcolor:"#6c8626"},{filename:"15.png",description:"康乃馨香",bgcolor:"#f1cdcd"},{filename:"16.png",description:"健康之源",bgcolor:"#e3dee0"}],containerId:""};var e={handleMessList:[]};var l={__formatIcon:function(){b.special=s.BDBRIDGE_ICON_SPECIAL[b.special];b.background.url="";b.background.color=b.special.bg;b.head.url="";b.head.width=b.special.w;b.head.height=b.special.h;b.button.url="";b.button.color=b.special.btn;b.button.text=b.special.txt},_convertGroup:function(y){var z=y;var v=[];var w;var u=z.length;var x;for(w=0;w<u;w++){x=z[w];if(x&&x.user&&x.user.length>0){v.push(x)}}return v},_compat:function(){if(BDBridge.Lib.ie&&m("spanThemeBegin")){m("BDBridgeWrap").innerHTML="";_createIcon()}},_createIcon:function(){var w=m("BDBridgeWrap")||m("BDBridgeNewWrap"),v,u;if(!w){w=document.createElement("div");w.id="BDBridgeWrap"}if(b.flow==0){if(m("BDBridgeFixedWrap")){s.containerId="BDBridgeFixedWrap";m("BDBridgeFixedWrap").style.textAlign="left"}else{return}}else{s.containerId="BDBridgeIconWrap";v=document.createElement("div");v.id=s.containerId;v.style.textAlign="left";w.appendChild(v)}u=m(s.containerId);u.innerHTML=k;u.style.display="none";m("BDBridgeLS").style.background="#eee"},hideIcon:function(){var u=m(s.containerId);u.style.display="none"},_expanIcon:function(){var w=m("bdbridge-left-close"),D=d("bdbridge-icon-right","BDBridgeWrap")[0]||d("bdbridge-icon-right","BDBridgeFixedWrap")[0],y=d("bdbridge-icon-left","BDBridgeWrap")[0]||d("bdbridge-icon-left","BDBridgeFixedWrap")[0],F=y.style.cssFloat,z=m("bridgehead"),A=m("bridgebottom"),v=b,x=m(s.containerId),B=v.position,u=v.flow,G=[],C=0;if(!f){D.style.visibility="hidden";z.style.visibility="hidden";a.container_width=x.style.width;a.container_height=x.style.height;a.bottom_left=A.style.left;a.bottom_marginleft=A.style.marginLeft;x.style.overflow="hidden";if(u!=2){if(B==0||B==2||B==4){w.className=" bdbridge-left-hd-img"}else{w.className=" bdbridge-right-hd-img"}x.style.width="25px";x.style.height="68px";A.style.top=-z.offsetHeight+"px"}else{G=s.BDBRIDGE_ICON_SPECIAL[v.special];w.style.width=G.closew+"px";w.style.height=G.closeh+"px";a.leftDivTop=y.style.top;a.leftDivBottom=y.style.bottom;var E=G.close?s.ROOT+G.close:"";if(E){if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){w.style.backgroundImage="none";w.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+E+")"}else{w.style.background=p("url(#{0}) no-repeat",E)+""}}x.style.width=G.closew+"px";x.style.height=G.closeh+"px";A.style.top=-z.offsetHeight+"px";A.style.left=0;A.style.marginLeft=0}y.style.position="relative";f=true}else{D.style.visibility="visible";z.style.visibility="visible";x.style.width=a.container_width;x.style.height=a.container_height;x.style.overflow="";A.style.top=0;if(u!=2){if(B==0||B==2||B==4){w.className="bdbridge-left-img";y.style.left=0}else{w.className="bdbridge-right-img"}}else{G=s.BDBRIDGE_ICON_SPECIAL[v.special];w.style.width=G.lrw+"px";w.style.height=G.lrh+"px";y.style.top=a.leftDivTop;y.style.bottom=a.leftDivBottom;A.style.left=a.bottom_left;A.style.marginLeft=a.bottom_marginleft;var E;if(B==0||B==2||B==4){E=G.left?s.ROOT+G.left:""}else{E=G.right?s.ROOT+G.right:""}if(E){if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){w.style.backgroundImage="none";w.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+E+")"}else{w.style.background=p("url(#{0}) no-repeat",E)+""}}}y.style.position="absolute";f=false}if(!(B==2||B==4||B==0)){if(y.style&&parseInt(y.style.left,10)==0){y.style.left="";y.style.right=0}else{y.style.right="";y.style.left=0}}if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){l._scroll()}},_hexToRgb:function(v,y){if(y==undefined){y=null}if(v.substr(0,1)=="#"){v=v.substr(1)}var x;var w;var u;if(v.length==3){x=v.substr(0,1);x+=x;w=v.substr(1,1);w+=w;u=v.substr(2,1);u+=u}else{if(v.length==6){x=v.substr(0,2);w=v.substr(2,2);u=v.substr(4,2)}else{return y}}x=parseInt(x,16);w=parseInt(w,16);u=parseInt(u,16);if(isNaN(x)||isNaN(w)||isNaN(u)){return y}else{return{r:x,g:w,b:u}}},setSkin:function(){var x=b,A=x.background,z=A.color,v=A.url,C="#{0} url(#{1})",u=m("bridgehead"),w=x.flow,B;if(w!=2){u.style.backgroundColor=z;u.style.backgroundImage=v?p("url(#{0})",v)+"":""}else{B=s.BDBRIDGE_ICON_SPECIAL[x.special];var y=B.filename?s.ROOT+B.filename:"";if(y){if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){u.style.backgroundImage="none";u.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+y+")"}else{u.style.background=p("url(#{0})",y)+""}}}},setSize:function(){var K=b,y=K.flow,E=K.head.height,F=K.iconlvtype,v=F==1?24:15,w=m("IconGp"),x=m("bridgeopacity"),C=m("BDBridgeIconIframe"),D=[],z=m("bridgehead"),B=m("bridgebottom"),J=0,u=m(s.containerId),I,G,L,A=K.position,H;if(y!=2){H=(F==0)?0:(A==1||A==3||A==5)?23:25;G=parseInt(K.head.width);btnwidth=(G-20>0)?(G-20):0;z.style.width=G+"px";z.style.height=E+"px";c.style.width=G+H+"px";if(F!=0){w.style.width=G+"px"}x.style.width=G+"px";B.style.width=G+H+"px";B.style.marginLeft=0;C&&(C.style.width=G+H+"px");u.style.width=G+H+"px"}else{I=s.BDBRIDGE_ICON_SPECIAL[K.special];G=parseInt(I.dw);btnwidth=(G-20>0)?(G-20):0;H=I.lrw;z.style.width=I.w+"px";z.style.height=I.h+"px";B.style.width=G+H+"px";if(F!=0){w.style.width=G+"px"}B.style.marginLeft=I.x+"px";c.style.width=G>I.w?G:parseInt(I.w,10)+H+"px";C&&(C.style.width=c.style.width);u.style.width=I.w+H+"px"}D=d("bdbridge-group-item",(y!=0?"BDBridgeWrap":"BDBridgeFixedWrap"));each(D,function(N,M){N.style.width=btnwidth+"px";N.style.height=v+"px";L=N.childNodes[0];L.style.width=btnwidth+"px";L.style.height=v+"px"});ele2=d("bdbridge-user-group-item",(y!=0?"BDBridgeWrap":"BDBridgeFixedWrap"));each(ele2,function(N,M){N.style.width=btnwidth+"px";N.style.height=v+"px";L=N.childNodes[0];L.style.width=btnwidth+"px";L.style.height=v+"px"})},ajustSize:function(){var x=d("bdbridge-icon-left","BDBridgeWrap")[0]||d("bdbridge-icon-left","BDBridgeFixedWrap")[0],y=m("bridgehead").clientHeight,z=m("bridgebottom").offsetHeight,u=m(s.containerId),w=m("BDBridgeIconIframe");var v=b;y=m("bridgehead").clientHeight;if(v.iconlvtype==0){c.style.height=y+"px";w&&(w.style.height=y+"px");u.style.height=y+"px"}else{c.style.height=y+z+"px";w&&(w.style.height=y+z+"px");u.style.height=y+z+"px"}},ajustbackground:function(){var I=b,E=BDBridge.Lib.G,H=E("IconGp"),L=I.background.color,z=E("bridgeopacity"),y=E("bdbridgeIconBg").style.zIndex,A=I.background.url,J=I.background.bgcolor,w=I.flow,C,u,G,v,x,K,F=[],B=[];if(A.indexOf("res/")!=-1){picindex=parseInt(A.substring(A.lastIndexOf("/")+1,A.lastIndexOf(".")),10);picindex=parseInt(picindex,10)-1;C=s.SYS_ICON_BG[picindex].bgcolor?s.SYS_ICON_BG[picindex].bgcolor:s.BG_COLOR}else{C=J?J:s.BG_COLOR}u=l._hexToRgb(C);if(w==2){F=s.BDBRIDGE_ICON_SPECIAL[I.special];H.style.background=F.bg}else{if(u){G=u.r;v=u.g;x=u.b;z.style.display="block";if(!L){H.style.background=C}else{H.style.background=L}B[B.length]=p("background:-moz-linear-gradient(top, rgba(#{0},#{1},#{2},0), rgba(#{0},#{1},#{2},1))",G,v,x);B[B.length]=p("background:-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(#{0},#{1},#{2},0)), to(rgba(#{0},#{1},#{2},1)))",G,v,x);B[B.length]=p("background:-webkit-linear-gradient(0 0, 0 bottom, from(rgba(#{0},#{1},#{2},0)), to(rgba(#{0},#{1},#{2},1)))",G,v,x);B[B.length]=p("background:-o-linear-gradient(top, rgba(#{0},#{1},#{2},0), rgba(#{0},#{1},#{2},1))",G,v,x);B[B.length]=p("background:linear-gradient(to bottom, rgba(#{0},#{1},#{2},0), rgba(#{0},#{1},#{2},1))",G,v,x);z.style.cssText+=";"+B.join(";");z.style.filter=p("alpha(opacity=10 finishopacity=100 style=1 startx=#{0},starty=#{1},finishx=#{2},finishy=#{3}) progid:DXImageTransform.Microsoft.gradient(startcolorstr=#{4},endcolorstr=#{5},gradientType=0)",0,0,0,100,C,C);z.style.zIndex=--y}}if(w==2||L||I.iconlvtype==0){z.style.display="none"}if(I.iconlvtype==0){var D=E("bridgebottom");D.style.display="none"}},setHeadBg:function(){var x=b,w=x.head.url,y=m("bdbridgeIconBg"),u=x.head.height-0,z=m("bridgeopacity"),v=x.flow;if(v!=2){y.style.display="block";y.style.top=u-30+"px";if(w){if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){y.style.backgroundImage="none";y.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+w+")"}else{y.style.backgroundImage=p("url(#{0})",w)}}z.style.top=u-40+"px"}else{y.style.display="none"}},createGroup:function(){var N=b,w=N.iconlvtype,A=j.group,K=A?A.length:0,E,D=[],H=[],F=m("IconGp"),v="<div>#{0}#{1}</div>",C='<div class="#{5}" data-groupid="#{1}" data-groupname="#{3}" data-online="#{2}"><div class= "opacitymask"></div><div class="bdbridge-item #{4}"></div><div class="#{6}"><div class="masktxt" title="#{0}">#{0}</div></div></div>',O='<ul class="bdbridge-group">#{0}</ul>',u='<li class = "bdbridge-user-item" data-subid = "#{1}" data-subname = "#{2}" data-groupid = "#{3}" data-groupname ="#{4}" ><div class="bdbridge-item #{5}"></div><div class="bdbridge-item-txt" title="#{0}">#{0}</div><div style="clear:both;font-size:0;height:0;overflow:hidden;"></div></li>',y,z,M,G,B,L,x,J,I;if(K==0){return}if(w==1){for(J=0;J<K;J++){B=A[J];y=B.groupname;z=B.groupid;M=B.online;if(!B.user||B.user.length==0){continue}if(M){D.push(p(v,p(C,y,z,M,y," bdridge-group-img","bdbridge-group-item","bdbridge-item-group-txt")))}else{D.push(p(v,p(C,y,z,M,y," bdridge-group-img-disable","bdbridge-group-item","bdbridge-item-group-txt")))}}F.innerHTML=D.join("");n("IconGp","bdbridge-icon-group");n("IconGp","bdbridge-icon-group")}else{if(w==2){for(J=0;J<K;J++){B=A[J];y=B.groupname;z=B.groupid;E=B.user.length;H=[];for(I=0;I<E;I++){x="";userid=null;L=B.user[I];x=L.subname;userid=L.subid;G=L.islogin;if(G){H.push(p(u,x,userid,x,z,y,"bdridge-user-img"))}else{H.push(p(u,x,userid,x,z,y,"bdridge-user-img-disable"))}}if(E<=0){continue}D.push(p(v,p(C,y,z,M,y,"","bdbridge-user-group-item"),p(O,H.join("")),""))}F.innerHTML=D.join("");n("IconGp","bdbridge-icon-group")}else{F.innerHTML="";r("IconGp","bdbridge-icon-group")}}},getPosition:function(){var v=b,F=j.group,E=document.getElementById("IconContainer"),B=BDBridge.Lib.Q("bdbridge-icon-left","BDBridgeWrap")[0]||d("bdbridge-icon-left","BDBridgeFixedWrap")[0],y=m("bdbridge-left-close"),w=v.iconlvtype,G=d("bdbridge-icon-right","BDBridgeWrap")[0]||d("bdbridge-icon-right","BDBridgeFixedWrap")[0],C=m("bridgebottom"),A=m("bridgehead"),D=parseInt(v.position,10),x=m(s.containerId),u=v.flow,H;x.style.position="absolute";if(u!=0){switch(D){case 0:x.style.top="0";x.style.left="auto";x.style.right="0";x.style.margin="8px 8px 0 0";break;case 1:x.style.top="0";x.style.left="0";x.style.margin="8px 0 0 8px";break;case 2:x.style.top="50%";x.style.left="auto";x.style.right="0";x.style.marginRight="8px";x.style.marginTop=-parseInt(x.clientHeight/2,10)+"px";break;case 3:x.style.top="50%";x.style.left="0";x.style.marginLeft="8px";x.style.marginTop=-parseInt(x.clientHeight/2,10)+"px";break;case 4:x.style.top="auto";x.style.left="auto";x.style.bottom="0";x.style.right="0";x.style.margin="0 8px 8px 0";break;case 5:x.style.top="auto";x.style.bottom="0";x.style.left="0";x.style.margin="0 0 8px 8px";break}}if(!BDBridge.Lib.ie||(BDBridge.Lib.ie6plus&&!BDBridge.Lib.onQuirkMode)){if(u!=0){x.style.position="fixed"}else{x.style.position="relative"}}else{x.style.position="absolute";l._scroll();window.attachEvent("onscroll",l._scroll);window.attachEvent("onresize",l._scroll)}if(w==0){return}if(D==1||D==3||D==5){B.style.left="";B.style.right=0;if(u!=2){y.className=" bdbridge-right-img";G.style.marginRight="23px"}else{H=s.BDBRIDGE_ICON_SPECIAL[v.special];y.style.width=H.lrw+"px";y.style.height=H.lrh+"px";var z=H.right?s.ROOT+H.right:"";if(z){if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){y.style.backgroundImage="none";y.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+z+")"}else{y.style.background=p("url(#{0}) no-repeat",z)}}G.style.marginRight=1*H.lrw+"px"}C.style.left=0}else{if(D==0||D==2||D==4){B.style.left=0;B.style.right="";if(u!=2){G.style.marginLeft="25px";y.className=" bdbridge-left-img";A.style.marginLeft="25px"}else{H=s.BDBRIDGE_ICON_SPECIAL[v.special];y.style.width=H.lrw+"px";y.style.height=H.lrh+"px";var z=H.left?s.ROOT+H.left:"";if(z){if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){y.style.backgroundImage="none";y.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+z+")"}else{y.style.background=p("url(#{0}) no-repeat",z)}}A.style.marginLeft=1*H.lrw+"px";G.style.marginLeft=1*H.lrw+"px"}}}if(F.length==1&&v.iconlvtype==1){B.style.top="";B.style.bottom=0}if(F.length==1&&v.iconlvtype==2&&F[0].user.length==1){B.style.top="";B.style.bottom=0}},setBtnskin:function(){var J=b,L=J.button,A,G=L.color,E=L.text,y=L.url,v=J.iconlvtype,u=[],F=[],w=J.flow,C=J.special,I=[],K,H=0;if(v==1){u=d("bdbridge-group-item",(w!=0?"BDBridgeWrap":"BDBridgeFixedWrap"));each(u,function(Q,O){var N=Q.getAttribute("data-groupid"),M=Q.getAttribute("data-groupname");Q.style.marginTop=10+"px";Q.style.height=28+"px";Q.style.lineHeight=28+"px";Q.style.textAlign="center";K=Q.childNodes[0];var P=d("masktxt",Q);if(P&&P[0]&&P[0].style){P[0].style.color=w!=2?E:s.BDBRIDGE_ICON_SPECIAL[C].txt}if(w!=2){K.style.backgroundColor=G;K.style.backgroundImage=y?p("url(#{0})",y):"";Q.style.color=E}else{I=s.BDBRIDGE_ICON_SPECIAL[C];K.style.backgroundColor=I.btn;Q.style.color=I.txt}Q.onmouseover=(function(R){return function(){r(R,"opacitymask");n(R,"opacitymaskhover")}})(K);Q.onmouseout=(function(R){return function(){r(R,"opacitymaskhover");n(R,"opacitymask")}})(K);Q.onclick=(function(S,R){return function(){l._bridgeIconClick(S,R)}})(N,M)})}else{if(v==2){var B,z,x,D;u=d("bdbridge-user-group-item",(w!=0?"BDBridgeWrap":"BDBridgeFixedWrap"));each(u,function(O,M){B=O.getAttribute("data-groupid");z=O.getAttribute("data-groupname");O.style.marginTop=10+"px";var N=d("masktxt",O);N=N&&N[0];if(N&&N.style){N.style.color=w!=2?E:s.BDBRIDGE_ICON_SPECIAL[C].btn;return}if(w!=2){O.style.color=E}else{I=s.BDBRIDGE_ICON_SPECIAL[C];O.style.color=I.btn}});F=d("bdbridge-user-item",(w!=0?"BDBridgeWrap":"BDBridgeFixedWrap"));each(F,function(O,M){B=O.getAttribute("data-groupid");z=O.getAttribute("data-groupname");x=O.getAttribute("data-subid");D=O.getAttribute("data-subname");var N=d("bdbridge-item-txt",O);if(N&&N[0]&&N[0].style){N[0].style.color=w!=2?E:s.BDBRIDGE_ICON_SPECIAL[C].btn}if(w!=2){O.style.color=E}else{I=s.BDBRIDGE_ICON_SPECIAL[C];O.style.color=I.btn}if((BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6)||BDBridge.Lib.onQuirkMode){O.onmouseover=(function(P){return function(){n(P,"bdbridge-user-item-hover")}})(O);O.onmouseout=(function(P){return function(){r(P,"bdbridge-user-item-hover")}})(O)}O.onclick=(function(R,Q,P,S){return function(){l._bridgeSubClick(R,Q,P,S)}})(B,z,x,D)})}else{A=m("bridgehead");A.onmouseover=function(){n(this,"bdbridge-bridgehead-hover")};A.onmouseout=function(){r(this,"bdbridge-bridgehead-hover")};A.onclick=function(){l._bridgeClick()}}}},__renderIcon:function(){var w=j.group,v=m("BDBridgeIconIframe"),u;c=m("IconContainer");iconContainer=m(s.containerId);l.__encodeGroupName();if(b.flow==2&&typeof b.special!="object"){}iconContainer.style.display="block";f=false;l.createGroup();l.setSkin();l.setSize();l.setHeadBg();l.setBtnskin();l.ajustbackground();l.ajustSize();if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6&&v){v.style.display="block"}l.getPosition()},_bridgeClick:function(){var y=j.group,x,u=y.length,z={},A=false;for(x=0;x<u;x++){if(y[x].online){A=true;break}}var w=BDBridge.Icon.__getHandleList();if(w&&w.length>0&&!A){for(var v in w){w[v]()}}if(A){BDBridge.Lib.webim.accept({chattype:s.chatType.bySelf},BDBridge.Icon.__handleStopMouseup)}h("CLICK_ICON",{info:"bridgeClick"},j.siteid,j.ucid);return},_bridgeIconClick:function(x,B){var v=j.group,z,A=v.length,y={},u=false;for(z=0;z<A;z++){if(x==v[z].groupid){u=v[z].online;break}}var C=BDBridge.Icon.__getHandleList();if(C&&C.length>0&&!u){for(var w in C){C[w]()}}if(u){y.groupid=x;y.groupname=B;y.chattype=s.chatType.bySelf;BDBridge.Lib.webim.accept(y,BDBridge.Icon.__handleStopMouseup)}h("CLICK_ICON",{info:"bridgeIconClick"},j.siteid,j.ucid);return},_bridgeSubClick:function(y,E,I,J){var v=j.group,D=v.length,G,w,F,B,A,C,u=false,z={};for(B=0;B<D;B++){G=v[B];if(y==G.groupid){u=G.online;if(!u){break}else{w=G.user;C=w.length;for(A=0;A<C;A++){F=w[A];if(I==F.subid){u=F.islogin;break}}}}}var H=BDBridge.Icon.__getHandleList();if(H&&H.length>0&&!u){for(var x in H){H[x]()}h("CLICK_ICON",{info:"bridgeSubClick"},j.siteid,j.ucid);return}z.groupid=y;z.groupname=E;z.subid=I;z.subname=J;z.chattype=s.chatType.bySelf;BDBridge.Lib.webim.accept(z,BDBridge.Icon.__handleStopMouseup);h("CLICK_ICON",{info:"bridgeSubClick"},j.siteid,j.ucid);return},__encodeGroupName:function(){var v=j.group;if(!v){return}for(var u=0,w=v.length;u<w;u++){j.group[u].name=j.group[u].groupname.replace(/\\/g,"\\\\")}},__setPosition:function(){var w=m("BDBridgeIconWrap");var u=m("BDBridgeInviteWrap");var v=w.clientHeight;v=w.clientHeight;switch(b.position){case 0:w.style.top="0";w.style.left="auto";w.style.right="0";w.style.margin="8px 8px 0 0";break;case 1:w.style.top="0";w.style.left="0";w.style.margin="8px 0 0 8px";break;case 2:w.style.top="50%";w.style.left="auto";w.style.right="0";w.style.marginRight="8px";w.style.marginTop=-parseInt(v/2,10)+"px";break;case 3:w.style.top="50%";w.style.left="0";w.style.marginLeft="8px";w.style.marginTop=-parseInt(v/2,10)+"px";break;case 4:w.style.top="auto";w.style.left="auto";w.style.bottom="0";w.style.right="0";w.style.margin="0 8px 8px 0";break;case 5:w.style.top="auto";w.style.bottom="0";w.style.left="0";w.style.margin="0 0 8px 8px"}if(!BDBridge.Lib.ie||(BDBridge.Lib.ie6plus&&!BDBridge.Lib.onQuirkMode)){w.style.position="fixed";u.style.position="fixed"}else{w.style.position="absolute";u.style.position="absolute";_scroll();window.attachEvent("onscroll",_scroll);window.attachEvent("onresize",_scroll)}},_scroll:function(){var v=!BDBridge.Lib.onQuirkMode?document.documentElement:document.body;var u=m("BDBridgeIconWrap");if(b.position==0||b.position==1){u.style.top=v.scrollTop+"px"}else{if(b.position==2||b.position==3){u.style.top=parseInt(v.clientHeight/2,10)+v.scrollTop+"px"}else{u.style.bottom="auto";u.style.top=v.clientHeight+v.scrollTop-u.clientHeight-10+"px"}}},handleGroup:function(u){j.group=l._convertGroup(BDBridge.BD_BRIDGE_DATA.group);if(!j.group||j.group.length==0){b.iconlvtype=0}l.__renderIcon()},__handleStopMouseup:function(){if(document.getElementById(s.containerId)){document.getElementById(s.containerId).onmouseup=null}}};return t={__getHandleList:function(){return e.handleMessList},__setHandleList:function(u){e.handleMessList.push(u)},hide:l.hideIcon,init:function(){m=BDBridge.Lib.G;n=BDBridge.Lib.addClass;r=BDBridge.Lib.removeClass;p=BDBridge.Lib.string.format;d=BDBridge.Lib.Q;each=BDBridge.Lib.each;o=BDBridge.BD_BRIDGE_ROOT;b=BDBridge.BD_BRIDGE_ICON_CONFIG;j=BDBridge.BD_BRIDGE_DATA;BDBridge.Lib.loadCss(o+"asset/css/m-front-icon.css?v=20140626");l._createIcon();if(b.background.url!=""){b.background.url+="?_t="+(new Date()).getTime().toString()}if(window.opera){window.scroll(0,0)}m("bdbridge-left-close").onclick=l._expanIcon;BDBridge.group.getGroupData(l.handleGroup)}}})();var BDBridge=window.BDBridge||{};BDBridge.pigeon=BDBridge.pigeon||(function(){var self,ie=/msie (\d+)/.exec(navigator.userAgent.toLowerCase()),ie6plus=ie&&(parseInt(ie[1],10)>6),g,onQuirkMode=document.compatMode=="CSS1Compat"?false:true;var BD_BRIDGE_ROOT=BDBridge.BD_BRIDGE_ROOT,BD_BRIDGE_DATA=BDBridge.BD_BRIDGE_DATA,BD_BRIDGE_PIGEON_SOUL=BDBridge.BD_BRIDGE_PIGEON_SOUL;var CONFIG={INIT_HEAD_SHORT:31,INIT_HEAD_LONG:60,INIT_HEAD_FUCK:76,INPUT_WIDTH_FLOAT:200,INPUT_WIDTH_SPECIAL:220,INPUT_WIDTH_TIP:6,INPUT_WIDTH_GROUP:238,BODY_HEIGHT_FLOAT:242,BODY_HEIGHT_GROUP:244,OUTLINE_WIDTH_FLOAT:256,OUTLINE_WIDTH_GROUP:348,OUTLINE_HEIGHT_FLOAT:304,OUTLINE_HEIGHT_GROUP:324,COLOR_BLACK:"rgb(0,0,0)",COLOR_DARK:"rgb(102,102,102)",COLOR_GRAY:"rgb(153,153,153)",COLOR_LIGHT:"rgb(204,204,204)",SUBMIT_ACTION:"?module=default&controller=index&action=doMess",CHINESE:{TITLE:"欢迎给我们留言",TEXT:"留言内容",SEND:"发送",RIGHT_TIP:"百度提供技术支持",NAME:"姓名",PHONE:"电话%bd_bp_sp%请输入您的电话号码",ADDRESS:"地址",EMAIL:"邮箱%bd_bp_sp%请输入合法邮箱名",SELECT:"请选择",TIP_DEFAULT:"最多100个字符",TIP_MESS:"请在此输入留言内容,我们会尽快与您联系。",ERR_NOT_NULL:"不能为空",ERR_NOT_SELECTED:"未选择有效的值",ERR_TEXT_TOO_LONG:"不能超过500个字符",ERR_ITEM_TOO_LONG:"不能超过100个字符",ERR_TITLE:"对不起,您提交的留言存在以下错误:",ERR_NUMBER_ONLY:"应当全部由数字组成",ERR_EMAIL_STYLE:"不是标准邮箱格式",ERR_TEL_STYLE:"不是标准手机号码格式"},ENGLISH:{TITLE:"Send message to us",TEXT:"Contents",SEND:"Send",RIGHT_TIP:"Powered by Baidu",NAME:"Name",PHONE:"Tel%bd_bp_sp%Leave us your telephone number",ADDRESS:"Address",EMAIL:"Email%bd_bp_sp%Leave us your email",SELECT:"Please Select ",TIP_DEFAULT:"Less than 100 chars",TIP_MESS:"Leave us your message,we will contact you as soon as possible!",ERR_NOT_NULL:" is necessary",ERR_NOT_SELECTED:" is not correctly selected",ERR_TEXT_TOO_LONG:" should be less than 500 chars",ERR_ITEM_TOO_LONG:" should be less than 100 chars",ERR_TITLE:"Sorry, some errors exist in your submition:",ERR_NUMBER_ONLY:" should be numbers",ERR_EMAIL_STYLE:" is illegal",ERR_TEL_STYLE:"is illegal"},ID:{PIGEON:"BaiduBridgePigeon",CLOSE_BTN:"BdBPClose",SEND_BTN:"BdBPSend",EXTRAL_ITEMS:"BdBPExtral",TITLE_TEXT:"BdBPTitleText",TITLE:"BdBPTitle",NECESSARY:"BdBPAlert_",ITEM_WRAP:"BdBPItem_",ITEM_BORDER:"BdBPDiv_",ITEM_T_HEAD:"BdBPSpan_",ITEM_INPUT:"BdBPInput_",FORM:"BdBPForm0",IFRAME:"BdBPIframe",PIGEON_FOOT:"BdBPFoot",PIGEON_BODY:"BdBPBody",CR_TEXT:"BdBPCrText",CR_ICON:"BdBPCrIcon",ONE_PX:"BdBPOnePx",TWO_PX:"BdBPTwoPx",COPY_RIGHT:"BdBPCopyRight",CRI_RED:"BdBPCrIconRed",CRI_BLUE:"BdBPCrIconBlue",TICK:"BdBPTick"},CLASS:{BORDER:"bd_bp_border",BACKGROUND:"bd_bp_bg"},KEY_TO_SAVE:["bd_bp_messText","bd_bp_messName","bd_bp_messPhone","bd_bp_messAddress","bd_bp_messEmail"],EXTRAL_KEY:"bd_bp_extral_",TEXT:null,SYS_MESS_BG:[{filename:"01.png",description:"主题1",width:287,height:386,hdheight:56,closeh:9,closer:12,left:17,foldw:196,foldh:56},{filename:"02.png",description:"主题2",width:287,height:386,hdheight:56,closeh:9,closer:12,left:17,foldw:196,foldh:56},{filename:"03.png",description:"主题3",width:287,height:386,hdheight:61,closeh:13,closer:13,left:19,foldw:141,foldh:53},{filename:"04.png",description:"主题4",width:287,height:386,hdheight:61,closeh:13,closer:13,left:19,foldw:141,foldh:53},{filename:"05.png",description:"主题5",width:315,height:420,hdheight:90,closeh:44,closer:20,left:41,foldw:141,foldh:53},{filename:"06.png",description:"主题6",width:315,height:420,hdheight:90,closeh:44,closer:20,left:41,foldw:141,foldh:53},{filename:"07.png",description:"主题7",width:315,height:420,hdheight:90,closeh:44,closer:20,left:41,foldw:141,foldh:53},{filename:"08.png",description:"主题8",width:315,height:420,hdheight:90,closeh:44,closer:20,left:41,foldw:141,foldh:53},{filename:"09.png",description:"主题9",width:315,height:420,hdheight:90,closeh:44,closer:20,left:41,foldw:141,foldh:53}]};var log=BDBridgeLog;var buf={messSpecialType:0,tmpParent:null,tmpNode:null,tmpColorList:{},itemCounter:0,tmpTips:{},scrolled:0,defaultICounter:0,sendTimer:false,onlineGroup:null};var controller={_trim:function(str){var trimer=new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)","g");return str.replace(trimer,"")},_stopDefault:function(e){var e=e||window.event;if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}},_loadCss:function(url){var css=document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("href",url);document.getElementsByTagName("head")[0].appendChild(css)},_hexToRgb:function(hex_string,default_){if(default_==undefined){default_=null}if(hex_string.substr(0,1)=="#"){hex_string=hex_string.substr(1)}var r;var g;var b;if(hex_string.length==3){r=hex_string.substr(0,1);r+=r;g=hex_string.substr(1,1);g+=g;b=hex_string.substr(2,1);b+=b}else{if(hex_string.length==6){r=hex_string.substr(0,2);g=hex_string.substr(2,2);b=hex_string.substr(4,2)}else{return default_}}r=parseInt(r,16);g=parseInt(g,16);b=parseInt(b,16);if(isNaN(r)||isNaN(g)||isNaN(b)){return default_}else{return{r:r/255,g:g/255,b:b/255}}},_rgbToHex:function(r,g,b,includeHash){r=Math.round(r*255);g=Math.round(g*255);b=Math.round(b*255);if(includeHash==undefined){includeHash=true}r=r.toString(16);if(r.length==1){r="0"+r}g=g.toString(16);if(g.length==1){g="0"+g}b=b.toString(16);if(b.length==1){b="0"+b}return((includeHash?"#":"")+r+g+b).toUpperCase()},_hslToRgb:function(hue,saturation,lum){var red,green,blue;if(lum==0){red=0;green=0;blue=0}else{var i=Math.floor(hue*6);var f=(hue*6)-i;var p=lum*(1-saturation);var q=lum*(1-(saturation*f));var t=lum*(1-(saturation*(1-f)));switch(i){case 1:red=q;green=lum;blue=p;break;case 2:red=p;green=lum;blue=t;break;case 3:red=p;green=q;blue=lum;break;case 4:red=t;green=p;blue=lum;break;case 5:red=lum;green=p;blue=q;break;case 6:case 0:red=lum;green=t;blue=p;break}}return{r:red,g:green,b:blue}},_rgbToHsl:function(red,green,blue){var max=Math.max(Math.max(red,green),blue);var min=Math.min(Math.min(red,green),blue);var hue;var saturation;var lum=max;if(min==max){hue=0;saturation=0}else{var delta=(max-min);saturation=delta/max;if(red==max){hue=(green-blue)/delta}else{if(green==max){hue=2+((blue-red)/delta)}else{hue=4+((red-green)/delta)}}hue/=6;if(hue<0){hue+=1}if(hue>1){hue-=1}}return{h:hue,s:saturation,l:lum}},getHeadColor:function(color){var rgb=(buf.tmpColorList[color]&&buf.tmpColorList[color].rgb)?buf.tmpColorList[color].rgb:(buf.tmpColorList[color]={},buf.tmpColorList[color].rgb=controller._hexToRgb(color));var hsl=(buf.tmpColorList[color]&&buf.tmpColorList[color].hsl)?buf.tmpColorList[color].hsl:(buf.tmpColorList[color]={},buf.tmpColorList[color].hsl=controller._rgbToHsl(rgb.r,rgb.g,rgb.b));return(1-hsl.l+hsl.s<0.3)?"#000":"#fff"},getClothColor:function(color){var rgb=(buf.tmpColorList[color]&&buf.tmpColorList[color].rgb)?buf.tmpColorList[color].rgb:(buf.tmpColorList[color]={},buf.tmpColorList[color].rgb=controller._hexToRgb(color));var hsl=(buf.tmpColorList[color]&&buf.tmpColorList[color].hsl)?buf.tmpColorList[color].hsl:(buf.tmpColorList[color]={},buf.tmpColorList[color].hsl=controller._rgbToHsl(rgb.r,rgb.g,rgb.b));rgb=controller._hslToRgb(hsl.h,hsl.s/2,1-(1-hsl.l)/5);return controller._rgbToHex(rgb.r,rgb.g,rgb.b)},getTipColor:function(color){var rgb=(buf.tmpColorList[color]&&buf.tmpColorList[color].rgb)?buf.tmpColorList[color].rgb:(buf.tmpColorList[color]={},buf.tmpColorList[color].rgb=controller._hexToRgb(color));var hsl=(buf.tmpColorList[color]&&buf.tmpColorList[color].hsl)?buf.tmpColorList[color].hsl:(buf.tmpColorList[color]={},buf.tmpColorList[color].hsl=controller._rgbToHsl(rgb.r,rgb.g,rgb.b));rgb=controller._hslToRgb(0,0,((hsl.l<0.15||hsl.l>0.6)?1-hsl.l:hsl.l));return controller._rgbToHex(rgb.r,rgb.g,rgb.b)},_getTextWidth:function(text,fontFamily){if(!buf.tmpParent){buf.tmpParent=document.createElement("div");buf.tmpParent.style.overflow="hidden";buf.tmpParent.style.width="0px";buf.tmpParent.style.position="relative";buf.tmpNode=document.createElement("div");buf.tmpNode.style.position="absolute";buf.tmpNode.style.whiteSpace="nowrap";buf.tmpNode.style.fontSize="12px";buf.tmpNode.style.padding="0";buf.tmpNode.style.margin="0";buf.tmpNode.style.width="auto";buf.tmpNode.style.fontWeight="normal";if(fontFamily){buf.tmpNode.style.fontFamily=fontFamily}}document.body.appendChild(buf.tmpParent);buf.tmpParent.appendChild(buf.tmpNode);buf.tmpNode.innerHTML=controller._encodeHTML(text);var result=buf.tmpParent.scrollWidth;result=buf.tmpParent.scrollWidth;document.body.removeChild(buf.tmpParent);return result},focusHandler:function(tar){var id=tar.id.match(/\d+/),tagName=tar.tagName.toLowerCase(),GRAY=CONFIG.COLOR_GRAY,elem;if(elem=document.getElementById(CONFIG.ID.ITEM_BORDER+id)){elem.style.borderColor=GRAY}if(elem=document.getElementById(CONFIG.ID.ITEM_T_HEAD+id)){elem.style.borderColor=GRAY;elem.style.color=CONFIG.COLOR_BLACK}tar.style.borderColor=GRAY;if((tagName=="input"||tagName=="textarea")&&!tar.style.color.match(/(rgb\(0.*\))|(\s*#0+)/)){tar.value=""}tar.style.color=CONFIG.COLOR_BLACK},blurHandler:function(tar){var id=tar.id.match(/\d+/),tagName=tar.tagName.toLowerCase(),color_light=CONFIG.COLOR_LIGHT,elem;if(elem=document.getElementById(CONFIG.ID.ITEM_BORDER+id)){elem.style.borderColor=color_light}if(elem=document.getElementById(CONFIG.ID.ITEM_T_HEAD+id)){elem.style.borderColor=color_light;elem.style.color=CONFIG.COLOR_DARK}tar.style.borderColor=color_light;if((tagName=="input"||tagName=="textarea")&&(tar.value=="")){tar.style.color=color_light;tar.value=buf.tmpTips[id]}else{if(tagName=="select"&&tar.selectedIndex==0){tar.style.color=color_light}}},_validateEmail:function(data){return(data.match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/))},_validateTel:function(data){return(data.match(/^[\d\*\+\-\#]{1,}$/))},_encodeHTML:function(s){return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},_decodeHTML:function(s){return s.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},_decodeData:function(items){items=eval(items);for(var i=0,len=items.length;i<len;++i){items[i].key=controller._decodeHTML(items[i].key);if(items[i].subItems){for(var j=0,_len=items[i].subItems.length;j<_len;++j){items[i].subItems[j]=controller._decodeHTML(items[i].subItems[j])}}}return items},_buildMess:function(colortype,messType,type){var result=[],TEXT=CONFIG.TEXT,iCounter=buf.itemCounter,config=CONFIG;result[result.length]="<div>";result[result.length]=messType?'<span id="%Bd_BP_Span_%'+(iCounter)+'" style="display:none;">'+TEXT.TEXT+'</span>\n                    <textarea name="'+config.KEY_TO_SAVE[iCounter]+'" id="%Bd_BP_Input_%'+(iCounter)+'" onFocus="javascript:BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" class="bd_bp_mess" style="width:'+(colortype?config.INPUT_WIDTH_FLOAT:config.INPUT_WIDTH_SPECIAL)+'px;">'+TEXT.TIP_MESS+"</textarea>":'<div class="bd_bp_0_head" id="%Bd_BP_Span_%'+(iCounter)+'">'+TEXT.TEXT+'</div>\n                    <textarea name="'+config.KEY_TO_SAVE[iCounter]+'" id="%Bd_BP_Input_%'+(iCounter)+'" onFocus="javascript:BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" class="bd_bp_mess" style="width:'+config.INPUT_WIDTH_GROUP+'px;">'+TEXT.TIP_MESS+"</textarea>";result[result.length]='<span class="bd_bp_alert" id="%Bd_BP_Alert_%'+iCounter+'" style="display:'+(type?"":"none")+'">*</span><div class="bd_bp_clear_all"></div>';result[result.length]="</div>";buf.tmpTips[iCounter++]=TEXT.TIP_MESS;buf.itemCounter=iCounter;return result.join("")},_buildOrgans:function(json){var html=[],text=CONFIG.TEXT,type=json.backgroundColor?1:0;html[html.length]=controller._buildMess(type,json.messType,1);html[html.length]=controller._buildItem(type,json.messType,json.messItemName,text.NAME);html[html.length]=controller._buildItem(type,json.messType,json.messItemPhone,text.PHONE);html[html.length]=controller._buildItem(type,json.messType,json.messItemAddress,text.ADDRESS);html[html.length]=controller._buildItem(type,json.messType,json.messItemEmail,text.EMAIL);buf.defaultICounter=buf.itemCounter;html[html.length]='<div id="%Bd_BP_Extral%">';html[html.length]=controller.buildExtralItems(type,json.messType,eval(json.extraMessItems));html[html.length]="</div>";return html.join("")},buildExtralItems:function(colortype,messType,items,needDecode){buf.itemCounter=buf.defaultICounter;if(!(items instanceof Array||(typeof items).toLowerCase=="array")){return}if(needDecode){controller._decodeData(items)}var result=[];for(var i=0,len=items.length;i<len;++i){result[result.length]=controller._buildItem(colortype,messType,((items[i].necessity-0)?1:0),items[i].key,items[i].subItems)}return controller._doReplace(result.join(""))},_buildItem:function(colortype,messType,type,key,subItems){if(!key||key==""){return}var result=[],iCounter=buf.itemCounter,IS_IE=ie,QUIRKS=onQuirkMode,config=CONFIG,KEY_TO_SAVE=CONFIG.KEY_TO_SAVE,isSelect=subItems&&((subItems instanceof Array)||((typeof subItems).toLowerCase=="array")),tip=isSelect?("-"+config.TEXT.SELECT+controller._encodeHTML(key)+"-"):(key.split(/%bd_bp_sp%/)[1]||config.TEXT.TIP_DEFAULT);key=key.split(/%bd_bp_sp%/)[0];result[result.length]='<div id="%Bd_BP_Item_%'+iCounter+'" style="margin:8px 0 0 0;'+((type==2)?"display:none":"")+'">';var width=controller._getTextWidth(key,"Arial"),isTextArea=false;if(iCounter>=KEY_TO_SAVE.length){if(!isSelect&&width>60){isTextArea=true;var tmpWidth=controller._getTextWidth(key.slice(5),"Arial");key=controller._trim(key.slice(0,5).concat(" ").concat(key.slice(5)));width=controller._getTextWidth(key.slice(0,5),"Arial");width=(tmpWidth>width)?tmpWidth:width}}if(messType){if(isSelect){result[result.length]='<div id="%Bd_BP_Div_%'+(iCounter)+'" class="bd_bp_item" style="border-right:0;"><span id="%Bd_BP_Span_%'+(iCounter)+'" class="bd_bp_1_head" style="border-right:0;">'+controller._encodeHTML(key)+'<span id="%Bd_BP_Alert_%'+iCounter+'" class="bd_bp_alert"'+((type==1)?"":'style="display:none')+'">*</span></span></div>';result[result.length]='<select name="'+(KEY_TO_SAVE[iCounter]||config.EXTRAL_KEY+(iCounter-buf.defaultICounter))+'" id="%Bd_BP_Input_%'+(iCounter)+'" '+(IS_IE?"onfocusin":"onfocus")+'="BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" class="bd_bp_select" style="width:'+((colortype?config.INPUT_WIDTH_FLOAT:config.INPUT_WIDTH_SPECIAL)-width-7-((type==1)?config.INPUT_WIDTH_TIP:0))+'px;">';result[result.length]='<option selected="true" value='+tip+">"+tip+"</option>";for(var i=0,len=subItems.length;i<len;++i){result[result.length]='<option value="'+controller._encodeHTML(subItems[i])+'">'+controller._encodeHTML(subItems[i])+"</option>"}result[result.length]="</select>"}else{result[result.length]='<div id="%Bd_BP_Div_%'+(iCounter)+'" class="bd_bp_item" '+((isTextArea)?('style="height:40px;"'):"")+'><span id="%Bd_BP_Span_%'+(iCounter)+'" class="bd_bp_1_head" style='+((isTextArea)?('"width:'+((width-0)+((IS_IE&&QUIRKS)?9:0))+"px;"):'"')+'height:40px;">'+controller._encodeHTML(key)+'<span id="%Bd_BP_Alert_%'+iCounter+'" class="bd_bp_alert"'+((type==1)?"":'style="display:none')+'">*</span></span>';if(isTextArea){result[result.length]='<textarea name="'+(KEY_TO_SAVE[iCounter]||config.EXTRAL_KEY+(iCounter-buf.defaultICounter))+'" onFocus="javascript:BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" id="%Bd_BP_Input_%'+(iCounter)+'" class="bd_bp_0_input" style="height:36px;width:'+((colortype?config.INPUT_WIDTH_FLOAT:config.INPUT_WIDTH_SPECIAL)-width-9-((type==1)?config.INPUT_WIDTH_TIP:0))+"px;"+((iCounter==2||iCounter==4)?"ime-mode:disabled;":"")+'">'+tip+"</textarea></div>"}else{result[result.length]='<input name="'+(KEY_TO_SAVE[iCounter]||config.EXTRAL_KEY+(iCounter-buf.defaultICounter))+'" value="'+tip+'" onFocus="javascript:BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" id="%Bd_BP_Input_%'+(iCounter)+'" class="bd_bp_0_input" maxlength="100" type="text" style="width:'+((colortype?config.INPUT_WIDTH_FLOAT:config.INPUT_WIDTH_SPECIAL)-width-9-((type==1)?config.INPUT_WIDTH_TIP:0))+"px;"+((iCounter==2||iCounter==4)?"ime-mode:disabled;":"")+'"/></div>'}}}else{if(subItems&&((subItems instanceof Array)||((typeof subItems).toLowerCase=="array"))){result[result.length]='<span id="%Bd_BP_Span_%'+(iCounter)+'" class="bd_bp_0_head">'+controller._encodeHTML(key)+"</span>";result[result.length]='<select name="'+(KEY_TO_SAVE[iCounter]||config.EXTRAL_KEY+(iCounter-buf.defaultICounter))+'" id="%Bd_BP_Input_%'+(iCounter)+'" '+(IS_IE?"onfocusin":"onfocus")+'="BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" class="bd_bp_select" style="width:'+(config.INPUT_WIDTH_GROUP+((QUIRKS)?0:2))+'px;">';result[result.length]='<option selected="true" value="-'+config.TEXT.SELECT+controller._encodeHTML(key)+'-">-'+config.TEXT.SELECT+controller._encodeHTML(key)+"-</option>";for(var i=0,len=subItems.length;i<len;++i){result[result.length]='<option value="'+controller._encodeHTML(subItems[i])+'">'+controller._encodeHTML(subItems[i])+"</option>"}result[result.length]="</select>"}else{result[result.length]='<span id="%Bd_BP_Span_%'+(iCounter)+'" class="bd_bp_0_head">'+controller._encodeHTML(key)+"</span>";if(isTextArea){result[result.length]='<textArea name="'+(KEY_TO_SAVE[iCounter]||config.EXTRAL_KEY+(iCounter-buf.defaultICounter))+'" id="%Bd_BP_Input_%'+(iCounter)+'" onFocus="javascript:BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" class="bd_bp_1_input" style="height:40px;width:'+config.INPUT_WIDTH_GROUP+"px;"+((iCounter==2||iCounter==4)?"ime-mode:disabled;":"")+'">'+tip+"</textArea>"}else{result[result.length]='<input name="'+(KEY_TO_SAVE[iCounter]||config.EXTRAL_KEY+(iCounter-buf.defaultICounter))+'" value="'+tip+'" id="%Bd_BP_Input_%'+(iCounter)+'" onFocus="javascript:BDBridge.pigeon.focusHandler(this);" onBlur="javascript:BDBridge.pigeon.blurHandler(this);" class="bd_bp_1_input" maxlength="100" type="text" style="width:'+config.INPUT_WIDTH_GROUP+"px;"+((iCounter==2||iCounter==4)?"ime-mode:disabled;":"")+'"/>'}}}result[result.length]='<div class="bd_bp_clear_all"></div></div>';buf.tmpTips[iCounter++]=tip;buf.itemCounter=iCounter;return result.join("")},_doReplace:function(s){var p_id=CONFIG.ID;return s.replace(/%Bd_BP_Close%/g,p_id.CLOSE_BTN).replace(/%Baidu_Bridge_Pigeon%/g,p_id.PIGEON).replace(/%Bd_BP_Send%/g,p_id.SEND_BTN).replace(/%Bd_BP_Extral%/g,p_id.EXTRAL_ITEMS).replace(/%Bd_BP_Title%/g,p_id.TITLE).replace(/%Bd_BP_TitleText%/g,p_id.TITLE_TEXT).replace(/%Bd_BP_Alert_%/g,p_id.NECESSARY).replace(/%Bd_BP_Item_%/g,p_id.ITEM_WRAP).replace(/%Bd_BP_Div_%/g,p_id.ITEM_BORDER).replace(/%Bd_BP_Span_%/g,p_id.ITEM_T_HEAD).replace(/%Bd_BP_Input_%/g,p_id.ITEM_INPUT).replace(/%Bd_BP_Form_0%/g,p_id.FORM).replace(/%Bd_BP_Body%/g,p_id.PIGEON_BODY).replace(/%Bd_BP_Foot%/g,p_id.PIGEON_FOOT).replace(/%Bd_BP_Iframe%/g,p_id.IFRAME).replace(/%Bd_BP_Cr_Icon%/g,p_id.CR_ICON).replace(/%Bd_BP_Cr_Text%/g,p_id.CR_TEXT).replace(/%Bd_BP_1Px%/g,p_id.ONE_PX).replace(/%Bd_BP_2Px%/g,p_id.TWO_PX).replace(/%Bd_BP_CopyRight%/g,p_id.COPY_RIGHT).replace(/%Bd_BP_CRIRed%/g,p_id.CRI_RED).replace(/%Bd_BP_CRIBlue%/g,p_id.CRI_BLUE).replace(/%Bd_BP_Tick%/g,p_id.TICK).replace(/%bd_bp_border%/g,CONFIG.CLASS.BORDER).replace(/%bd_bp_bg%/g,CONFIG.CLASS.BACKGROUND).replace(/%bd_bp_cloth%/g,CONFIG.CLASS.CLOTH)},lockPosition:function(type){var mess=document.getElementById(CONFIG.ID.PIGEON),closePic=document.getElementById("closepic"),IS_IE=ie,IE6_PLUS=ie6plus,QUIRKS=onQuirkMode;controller.lockPosition._scroll=function(){if(!IS_IE||(IE6_PLUS&&!QUIRKS)){return}var page=!QUIRKS?document.documentElement:document.body;if(type){mess.style.top=page.clientHeight-mess.clientHeight+page.scrollTop-5+"px";closePic&&(closePic.style.top=page.clientHeight-closePic.clientHeight+page.scrollTop+"px")}else{mess.style.top=parseInt(page.clientHeight/2,10)+page.scrollTop-5+"px";closePic&&(closePic.style.top=parseInt(page.clientHeight/2)+page.scrollTop+"px")}};if(!IS_IE||(IE6_PLUS&&!QUIRKS)){mess.style.position="fixed";closePic&&(closePic.style.position="fixed")}else{mess.style.position="absolute";closePic&&(closePic.style.position="absolute");window.attachEvent("onscroll",controller.lockPosition._scroll);window.attachEvent("onresize",controller.lockPosition._scroll)}},_clearTips:function(force){var IS_IE=ie,IE6_PLUS=ie6plus,input;for(var i=0;i<buf.itemCounter;++i){input=document.getElementById(CONFIG.ID.ITEM_INPUT+i);if(BDBridge.Lib.mobile){if(input.tagName.toLowerCase()=="select"){input.options[0].value=buf.tmpTips[i];input.options[0].innerHTML=buf.tmpTips[i];input.selectedIndex=0}else{input.value=""}continue}if(!input.style.color.match(/(rgb\(0.*\))|(\s*#0+)/)||force){if(input.tagName.toLowerCase()=="select"){if(input.style.color.match(/(rgb\(0.*\))|(\s*#0+)/)&&IS_IE&&!IE6_PLUS){continue}input.options[0].value=buf.tmpTips[i];input.options[0].innerHTML=buf.tmpTips[i];input.selectedIndex=0;input.style.color=CONFIG.COLOR_LIGHT}else{input.value=buf.tmpTips[i];input.style.color=CONFIG.COLOR_LIGHT}}}},scroll:function(e){var e=e||window.event,ID=CONFIG.ID,mess=document.getElementById(ID.PIGEON),clostBtn=document.getElementById(ID.CLOSE_BTN),pos=BD_BRIDGE_PIGEON_SOUL.position,iframe=document.getElementById("Baidu_Bridge_Pigeon_Iframe");controller.setPosition(pos);if(e){if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}}if(!buf.scrolled){buf.scrolled=1;CONFIG.OUTLINE_HEIGHT_FLOAT=document.getElementById(ID.PIGEON).clientHeight;mess.style.height="26px";mess.style.cursor="pointer";iframe&&(iframe.style.height="26px");document.getElementById(ID.PIGEON_FOOT).style.display="none";document.getElementById(ID.PIGEON_BODY).style.display="none";mess.onclick=BDBridge.pigeon.scroll}else{buf.scrolled=0;var dis=document.getElementById(ID.PIGEON_BODY).style.display;if(dis=="block"||dis==""){CONFIG.OUTLINE_HEIGHT_FLOAT=document.getElementById(ID.PIGEON).clientHeight}document.getElementById(ID.PIGEON_FOOT).style.display="block";document.getElementById(ID.PIGEON_BODY).style.display="block";mess.style.height=CONFIG.OUTLINE_HEIGHT_FLOAT+"px";mess.style.cursor="default";iframe&&(iframe.style.height=CONFIG.OUTLINE_HEIGHT_FLOAT+"px");mess.onclick=""}controller.lockPosition._scroll&&controller.lockPosition._scroll()},setPosition:function(pos){var container=g("BaiduBridgePigeon");var winWidth;var winHeight;if(document.compatMode=="CSS1Compat"){winWidth=document.documentElement.clientWidth;winHeight=document.documentElement.clientHeight}else{winWidth=document.body.clientWidth;winHeight=document.body.clientHeight}var cWidth=container.clientWidth;var cHeight=container.clientHeight;pos=parseInt(pos,10);switch(pos){case 0:container.style.bottom=0;container.style.left=0;container.style.right="";break;case 1:container.style.bottom=0;container.style.left="";container.style.right=0;break;case 2:container.style.bottom=(winHeight-cHeight)/2+"px";container.style.left=(winWidth-cWidth)/2+"px";container.style.right="";break;default:}},show:function(){document.getElementById(CONFIG.ID.PIGEON).style.display="block"},showBigSpecial:function(){document.getElementById(CONFIG.ID.PIGEON).style.display="block";document.getElementById("closepic").style.display="none"},showSmallSpecial:function(){document.getElementById(CONFIG.ID.PIGEON).style.display="none";document.getElementById("closepic").style.display="block"},hide:function(){document.getElementById(CONFIG.ID.PIGEON).style.display="none"},_succeed:function(){document.getElementById(CONFIG.ID.SEND_BTN).onclick=controller._checkSend;controller._clearTips(1)},_fail:function(){document.getElementById(CONFIG.ID.SEND_BTN).onclick=controller._checkSend;controller._clearTips()},_checkSend:function(e){controller._stopDefault(e);if(e){if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}}var TEXT=CONFIG.TEXT,IS_IE=ie,errors=[TEXT.ERR_TITLE],ID=CONFIG.ID,i,tmpNode,tmpTitle,tmpTagName,tmpValue;for(i=0;i<buf.itemCounter;++i){tmpNode=document.getElementById(ID.ITEM_INPUT+i);if(typeof tmpNode.textContent=="string"){tmpTitle=document.getElementById(ID.ITEM_T_HEAD+i).textContent}else{tmpTitle=document.getElementById(ID.ITEM_T_HEAD+i).innerText}tmpValue=controller._trim(tmpNode.value);tmpTagName=tmpNode.tagName.toLowerCase();if(BDBridge.Lib.mobile){if(tmpValue==""&&document.getElementById(ID.NECESSARY+i).style.display!="none"){errors.push("\t"+controller._decodeHTML(tmpTitle)+(tmpTagName=="select"?TEXT.ERR_NOT_SELECTED:TEXT.ERR_NOT_NULL))}else{if(tmpTagName=="textarea"&&tmpNode.value.length>(i==0?500:100)){errors.push("\t"+tmpTitle+(i==0?TEXT.ERR_TEXT_TOO_LONG:TEXT.ERR_ITEM_TOO_LONG))}else{if(i==4&&tmpValue!=""&&!controller._validateEmail(tmpValue)){errors.push("\t"+tmpTitle+TEXT.ERR_EMAIL_STYLE)}}}if(i==2&&tmpValue!=""&&!controller._validateTel(tmpValue)){errors.push("\t"+tmpTitle+TEXT.ERR_TEL_STYLE)}if(tmpValue==""){if(tmpNode.tagName.toLowerCase()=="select"){tmpNode.options[0].value="";tmpNode.options[0].innerHTML=""}else{tmpNode.value=""}}}else{if(!tmpNode.style.color.match(/(rgb\(0.*\))|(\s*#0+)/)&&document.getElementById(ID.NECESSARY+i).style.display!="none"){errors.push("\t"+controller._decodeHTML(tmpTitle)+(tmpTagName=="select"?TEXT.ERR_NOT_SELECTED:TEXT.ERR_NOT_NULL))}else{if(tmpTagName=="textarea"&&tmpNode.value.length>(i==0?500:100)){errors.push("\t"+tmpTitle+(i==0?TEXT.ERR_TEXT_TOO_LONG:TEXT.ERR_ITEM_TOO_LONG))}else{if(i==4&&tmpNode.style.color.match(/(rgb\(0.*\))|(\s*#0+)/)&&!controller._validateEmail(tmpValue)){errors.push("\t"+tmpTitle+TEXT.ERR_EMAIL_STYLE)}}}if(i==2&&tmpNode.style.color.match(/(rgb\(0.*\))|(\s*#0+)/)&&!controller._validateTel(tmpValue)){errors.push("\t"+tmpTitle+TEXT.ERR_TEL_STYLE)}if(!tmpNode.style.color.match(/(rgb\(0.*\))|(\s*#0+)/)){if(tmpNode.tagName.toLowerCase()=="select"){tmpNode.options[0].value="";tmpNode.options[0].innerHTML=""}else{tmpNode.value=""}}}}if(errors.length>1){alert(errors.join("\n"));controller._clearTips();return}else{var json={},keys=CONFIG.KEY_TO_SAVE,i;json.items=[];for(i=0;i<buf.itemCounter;i++){tmpNode=document.getElementById(ID.ITEM_INPUT+i);if(typeof tmpNode.textContent=="string"){tmpTitle=document.getElementById(ID.ITEM_T_HEAD+i).textContent}else{tmpTitle=document.getElementById(ID.ITEM_T_HEAD+i).innerText}tmpValue=controller._trim(tmpNode.value);if(i==0){json.mess=tmpValue}else{json.items.push({title:tmpTitle,value:tmpValue,name:tmpNode.name})}}var tmpCharset=false;if(IS_IE){tmpCharset=document.charset;document.charset="utf-8"}BDBridge.pigeonFuc.getStatus(controller._handleSendStatus);BDBridge.pigeonFuc.send(json);if(IS_IE){document.charset=tmpCharset}document.getElementById(ID.SEND_BTN).onclick="";if(buf.messSpecialType){controller._closeSpecial(e)}else{controller._close(e)}}},_createContainer:function(){var div=document.getElementById("BDBridgeWrap")||document.getElementById("BDBridgeNewWrap");if(!div){div=document.createElement("div");div.id="BDBridgeWrap"}var dMess=document.createElement("div");dMess.id="BDBridgeMess";div.appendChild(dMess)},create:function(json,element,clear,needDecode){if(!(json&&element)){return}if(needDecode){json.extraMessItems=decodeData(json.extraMessItems)}controller._close=function(e){controller._stopDefault(e);if(e){if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}}if(json.messType){BDBridge.pigeon.scroll(e)}else{controller.hide()}};controller._closeSpecial=function(e){controller._stopDefault(e);var pos=BD_BRIDGE_PIGEON_SOUL.position;controller.setPosition(pos);if(e){if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}}var url=json.backgroundUrl.toString(),format=BDBridge.Lib.string.format,g=BDBridge.Lib.G,closepicCt=g("closepic"),closeIframe=g("Baidu_Bridge_Pigeon_Close_Iframe"),closepicBg=g("Baidu_Bridge_Pigeon_closepic_bg"),pcindex,spConfig,picwidth,picheight,closepic;pcindex=url.substring(url.lastIndexOf("/")+1,url.lastIndexOf("."));spConfig=CONFIG.SYS_MESS_BG[pcindex-1];url=url.replace(/"/g,"");picwidth=spConfig.foldw;picheight=spConfig.foldh;closepic=url.replace(/\.png$/,"_foldup.png");if(closepicBg){closepicBg.style.background=closepic?format("url(#{0})",closepic):"";if(ie&&!ie6plus){closepicBg.style.background="none";closepicBg.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+closepic+")"}closepicBg.style.width=picwidth+"px";closepicBg.style.height=picheight+"px"}else{closepicCt.style.background=closepic?format("url(#{0})",closepic):""}closepicCt.style.width=picwidth+"px";closepicCt.style.height=picheight+"px";if(closeIframe){closeIframe.style.width=picwidth+"px";closeIframe.style.height=picheight+"px"}g("BaiduBridgePigeon").style.display="none";g("closepic").style.display="block";closepicCt.onclick=function(){g("BaiduBridgePigeon").style.display="block";g("closepic").style.display="none"}};if(json.backgroundColor){buf.messSpecialType=0;controller._born(json,element,clear)}else{buf.messSpecialType=1;controller._bornSpecial(json,element,clear)}(function(){if(!BDBridge.Lib.mobile){return}var pigeon=document.getElementById(CONFIG.ID.PIGEON);var textareas=pigeon.getElementsByTagName("textarea");var inputs=pigeon.getElementsByTagName("input");var i;var len;var tmp;for(i=0,len=textareas.length;i<len;i++){tmp=textareas[i];tmp.onfocus=null;tmp.onblur=null;tmp.setAttribute("placeholder",tmp.value);tmp.value=""}for(i=0,len=inputs.length;i<len;i++){tmp=inputs[i];tmp.onfocus=null;tmp.onblur=null;tmp.setAttribute("placeholder",tmp.value);tmp.value=""}}());document.getElementById(CONFIG.ID.SEND_BTN).onmouseover=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/normal/,"hover");me.style.background=newBg}};document.getElementById(CONFIG.ID.CLOSE_BTN).onmouseover=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/normal/,"hover");me.style.background=newBg}};document.getElementById(CONFIG.ID.SEND_BTN).onmouseout=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/hover/,"normal");me.style.background=newBg}};document.getElementById(CONFIG.ID.CLOSE_BTN).onmouseout=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/hover/,"normal");me.style.background=newBg}};document.getElementById(CONFIG.ID.SEND_BTN).onmousedown=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/hover/,"press");me.style.background=newBg}};document.getElementById(CONFIG.ID.CLOSE_BTN).onmousedown=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/hover/,"press");me.style.background=newBg}};document.getElementById(CONFIG.ID.SEND_BTN).onmouseup=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/press/,"normal");me.style.background=newBg}};document.getElementById(CONFIG.ID.CLOSE_BTN).onmouseup=function(){var me=this,oldBg=me.style.background,newBg;if(!json.backgroundColor){newBg=oldBg.replace(/press/,"normal");me.style.background=newBg}}},_born:function(json,element,type){if(!(json&&element)){return}buf.itemCounter=0;buf.tmpTips={};CONFIG.TEXT=(json.language-0)?CONFIG.ENGLISH:CONFIG.CHINESE;var html=[],config=CONFIG,tmpColor;html[html.length]='<div id="%Baidu_Bridge_Pigeon%" style="'+(type?"":"z-index:2147483647;");html[html.length]=json.messType?("width:"+config.OUTLINE_WIDTH_FLOAT+"px;bottom:"+(type==1?"38px;":"0px;")+(json.position?"right":"left")+(type==1?":17px;":":0px;")):((type?"":"display:none;")+"width:"+config.OUTLINE_WIDTH_GROUP+"px;height:"+config.OUTLINE_HEIGHT_GROUP+"px;top:50%;left:50%;margin-left:-"+(config.OUTLINE_WIDTH_GROUP/2)+"px;margin-top:-"+(config.OUTLINE_HEIGHT_GROUP/2)+"px;");html[html.length]='">';if(ie&&!ie6plus){html[html.length]='<iframe src="about:blank;" frameborder="0" marginheight="0" marginwidth="0" id="Baidu_Bridge_Pigeon_Iframe" style="width:'+config.OUTLINE_WIDTH_FLOAT+"px;height:"+config.OUTLINE_HEIGHT_GROUP+'px;_filter:alpha(opacity=0);position:absolute;top:0;left:0;"></iframe>';html[html.length]='<div style="position:relative; z-index: 10;">'}html[html.length]='<div id="%Bd_BP_2Px%" class="%bd_bp_bg%" style="background-color:'+json.backgroundColor+'">&nbsp;</div>';html[html.length]='<div id="%Bd_BP_1Px%" class="%bd_bp_bg%" style="background-color:'+json.backgroundColor+'">&nbsp;</div>';html[html.length]='<div class="bd_bp_pigeon %bd_bp_bg%" style="border-left:1px solid '+json.backgroundColor+";border-right:1px solid "+json.backgroundColor+";border-bottom: 1px solid "+json.backgroundColor+';">';html[html.length]='	<div id="%Bd_BP_Title%" class="%bd_bp_bg%" style="background-color:'+json.backgroundColor+';">';if(!ie||ie6plus){html[html.length]='<div id="%Bd_BP_TitleText%" class="%bd_bp_bg%" style=" background-position:'+(json.language?"0 0;":"0 0;")+'"></div>'}else{html[html.length]='<div id="%Bd_BP_TitleText%" class="%bd_bp_bg%" style=" background-position:'+(json.language?"0 0;":"0 0;")+" background-image:none; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+BD_BRIDGE_ROOT+'img/matrix/mess-text.png);"></div>'}html[html.length]='<a id="%Bd_BP_Close%" hideFocus="true" href="javascript:;"></a>';html[html.length]='	<div class="bd_bp_clear_all"></div></div>';html[html.length]='	<div id="%Bd_BP_Body%" style="padding-left:10px;max-height:'+(json.messType?config.BODY_HEIGHT_FLOAT:config.BODY_HEIGHT_GROUP)+"px;_height:expression((this.clientHeight>="+(json.messType?config.BODY_HEIGHT_FLOAT:config.BODY_HEIGHT_GROUP)+")?'"+(json.messType?config.BODY_HEIGHT_FLOAT:config.BODY_HEIGHT_GROUP)+"':'auto');zoom:1;\">";html[html.length]='		<form id="%Bd_BP_Form_0%" target="%Bd_BP_Iframe%" accept-charset="utf-8" method="post" '+(type?"":'action="'+BD_BRIDGE_ROOT+config.SUBMIT_ACTION+"&siteid="+BD_BRIDGE_DATA.siteid+"&ucid="+BD_BRIDGE_DATA.ucid+"&page_id="+BDBridge.pageid+'"')+">";html[html.length]=controller._buildOrgans(json);html[html.length]="		</form>";html[html.length]="	</div>";html[html.length]='	<div class="%bd_bp_border%" id="%Bd_BP_Foot%" style="padding:0 '+(json.messType?"8px":"27px 0 8px")+';">';html[html.length]='       <div id="%Bd_BP_Send%">';html[html.length]='        <div class = "opacitymask" style = "background:'+json.backgroundColor+';"></div>';html[html.length]='		  <a hideFocus="true" href="javascript:;" style="line-height:22px;position:relative;font-weight:bold;">'+config.TEXT.SEND+"</a>";html[html.length]="        </div>";html[html.length]='        <div class="BdBridgeLogo"></div>';html[html.length]='		<div class="bd_bp_clear_all"></div>';html[html.length]="	</div>";html[html.length]="</div>";if(ie&&!ie6plus){html[html.length]="</div>"}html[html.length]="</div>";element.innerHTML=controller._doReplace(html.join(""));if(!type){controller.lockPosition(json.messType)}document.getElementById(config.ID.CLOSE_BTN).onclick=controller._close;if(!type){document.getElementById(config.ID.SEND_BTN).onclick=controller._checkSend}},_bornSpecial:function(json,element,type){if(!(json&&element)){return}buf.itemCounter=0;buf.tmpTips={};CONFIG.TEXT=(json.language-0)?CONFIG.ENGLISH:CONFIG.CHINESE;var html=[],config=CONFIG,spConfig,url=json.backgroundUrl.toString(),pcindex,closeHeight,closeRight,sendpic,closepic,left,width,height,tmpColor;pcindex=url.substring(url.lastIndexOf("/")+1,url.lastIndexOf("."));pcindex=parseInt(pcindex,10);spConfig=CONFIG.SYS_MESS_BG[pcindex-1];url=url.replace(/"/g,"");width=spConfig.width;height=spConfig.height;closeHeight=spConfig.closeh;closepic=url.replace(/\.png$/,"_normal.png");closeRight=spConfig.closer;sendpic=json.language?url.replace(/\.png$/,"_send_normal_2.png"):url.replace(/\.png$/,"_send_normal.png");left=spConfig.left;if(!ie||ie6plus){html[html.length]='<div id="%Baidu_Bridge_Pigeon%" style="background:url('+url+");width:"+width+"px;height:"+height+"px;"+(type?"":"z-index:2147483647;");html[html.length]="bottom:"+(type==1?"38px;":"0px;")+(json.position?"right":"left")+(type==1?":17px;":":0px;");html[html.length]='">'}else{html[html.length]='<div id="%Baidu_Bridge_Pigeon%" style="width:'+width+"px;height:"+height+"px;"+(type?"":"z-index:2147483647;");html[html.length]="bottom:"+(type==1?"38px;":"0px;")+(json.position?"right":"left")+(type==1?":17px;":":0px;");html[html.length]='">';html[html.length]='<iframe src="about:blank;" frameborder="0" marginheight="0" marginwidth="0" style="width:'+width+"px;height:"+height+'px;_filter:alpha(opacity=0);position:absolute;top:0;left:0;"></iframe>';html[html.length]='<div style="position:absolute;top:0;left:0;z-index: 5;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+url+");width:"+width+"px;height:"+height+'px;"></div>'}html[html.length]='<div class="bd_bp_pigeon %bd_bp_bg%" style="position:relative; z-index:10;">';html[html.length]='	<div id="%Bd_BP_Title%" class="%bd_bp_bg%" style="height:'+spConfig.hdheight+'px;">';html[html.length]='<a id="%Bd_BP_Close%" style="background:url('+closepic+");margin-Top:"+closeHeight+"px;margin-right:"+closeRight+'px;width:23px;height:23px; hideFocus="true" href="javascript:;"></a>';html[html.length]='	<div class="bd_bp_clear_all"></div></div>';html[html.length]='	<div id="%Bd_BP_Body%" style="background:none;margin-left:'+left+"px; margin-right:12px; max-height:"+(json.messType?config.BODY_HEIGHT_FLOAT:config.BODY_HEIGHT_GROUP)+"px;_height:expression((this.clientHeight>="+(json.messType?config.BODY_HEIGHT_FLOAT:config.BODY_HEIGHT_GROUP)+")?'"+(json.messType?config.BODY_HEIGHT_FLOAT:config.BODY_HEIGHT_GROUP)+"':'auto');zoom:1;\">";html[html.length]='		<form id="%Bd_BP_Form_0%" target="%Bd_BP_Iframe%" accept-charset="utf-8" method="post" '+(type?"":'action="'+BD_BRIDGE_ROOT+config.SUBMIT_ACTION+"&siteid="+BD_BRIDGE_DATA.siteid+"&ucid="+BD_BRIDGE_DATA.ucid+"&page_id="+BDBridge.pageid+'"')+">";html[html.length]=controller._buildOrgans(json);html[html.length]="		</form>";html[html.length]="	</div>";html[html.length]='	<div class="%bd_bp_border%" id="%Bd_BP_Foot%" style="border:none;background:none;padding:0 '+(json.messType?"8px":"27px 0 8px")+';height: 32px;">';html[html.length]='		 <a  id="%Bd_BP_Send%" hideFocus="true" href="javascript:;" style="width:104px;height:28px;left:40px;position:absolute;background:url('+sendpic+');line-height:28px;font-weight:bbold;"></a>';html[html.length]='		<div class="bd_bp_clear_all"></div>';html[html.length]="	</div>";html[html.length]="</div>";html[html.length]="</div>";html[html.length]='<div id="closepic" style="display:none;position:absolute;bottom:0;'+(json.position?"right:0px;":"left:0px;")+'" class="BaiduBridgePigeon-closepic">';if(ie&&!ie6plus){html[html.length]='<iframe src="about:blank;" frameborder="0" marginheight="0" marginwidth="0" id="Baidu_Bridge_Pigeon_Close_Iframe" style="_filter:alpha(opacity=0);position:absolute;top:0;left:0;"></iframe>';html[html.length]='<div id="Baidu_Bridge_Pigeon_closepic_bg" style="position:relative; z-index:10;"></div>'}html[html.length]="</div>";element.innerHTML=controller._doReplace(html.join(""));if(!type){controller.lockPosition(json.messType)}if(type!=1){document.getElementById(config.ID.CLOSE_BTN).onclick=controller._closeSpecial}if(!type){document.getElementById(config.ID.SEND_BTN).onclick=controller._checkSend}},_convertGroup:function(group){var l=group.length;var actual=0;var tempId="";var tempName="";var tempIndex="";buf.onlineGroup=[];for(var a=0;a<l;a++){if(group[a]["user"].length>0){actual++;tempId=group[a]["groupid"];tempName=group[a]["groupname"];tempIndex=a}}if(actual==0){return}if(actual==1){var online=0;var user=group[tempIndex]["user"];for(var i=0,n=user.length;i<n;i++){if((user[i]["islogin"]-0)!=0){online=1;break}}if(online){buf.onlineGroup.push(tempIndex)}}else{for(var i=0;i<l;i++){var user=group[i]["user"];if(user.length!=0){var online=0;for(var j=0,n=user.length;j<n;j++){if((user[j]["islogin"]-0)!=0){online=1;break}}if(online){buf.onlineGroup.push(i)}}}}},handleClickIcon:function(){controller.show();if(buf.messSpecialType==0){buf.scrolled=1;BDBridge.pigeon.scroll()}else{controller.showBigSpecial()}var g=g?g:BDBridge.Lib.G;if(g("closepic")){g("closepic").style.display="none"}controller.setPosition(2);log("CLICK_MESS",{},BD_BRIDGE_DATA.siteid,BD_BRIDGE_DATA.ucid)},handleInvite:function(chatname){controller.show();if(chatname){controller._setMess(chatname)}if(buf.messSpecialType==0){if(buf.scrolled==1){BDBridge.pigeon.scroll()}}else{controller.showBigSpecial()}var g=g?g:BDBridge.Lib.G;if(g("closepic")){g("closepic").style.display="none"}controller.setPosition(2);log("CLICK_MESS",{},BD_BRIDGE_DATA.siteid,BD_BRIDGE_DATA.ucid)},_handleGroup:function(data){if(!buf.onlineGroup){controller._convertGroup(data)}controller.create(BD_BRIDGE_PIGEON_SOUL,document.getElementById("BDBridgeMess"),0);if(BD_BRIDGE_PIGEON_SOUL.disableMess!=0){controller.hide()}else{if(buf.onlineGroup.length==0){controller.show()}else{controller.hide()}}},_handleSendStatus:function(status){if(status==1){controller._succeed()}else{if(status==0){controller._fail()}}},_setMess:function(mess){document.getElementById(CONFIG.ID.ITEM_INPUT+0).value=mess;document.getElementById(CONFIG.ID.ITEM_INPUT+0).style.color=CONFIG.COLOR_BLACK}};return self={focusHandler:controller.focusHandler,blurHandler:controller.blurHandler,create:controller.create,handleClickIcon:controller.handleClickIcon,handleInvite:controller.handleInvite,scroll:controller.scroll,buildExtralItems:controller.buildExtralItems,getClothColor:controller.getClothColor,getTipColor:controller.getTipColor,getHeadColor:controller.getHeadColor,show:controller.show,hide:controller.hide,getID:function(){return CONFIG.ID},getCLASS:function(){return CONFIG.CLASS},init:function(){var invite=BDBridge.invite;BD_BRIDGE_ROOT=BDBridge.BD_BRIDGE_ROOT;BD_BRIDGE_DATA=BDBridge.BD_BRIDGE_DATA;BD_BRIDGE_PIGEON_SOUL=BDBridge.BD_BRIDGE_PIGEON_SOUL;g=g?g:BDBridge.Lib.G;controller._createContainer();var cssPath=BDBridge.Lib.mobile?"asset/css/m-front-mess-mobile.css?v=20130705":"asset/css/m-front-mess.css?v=20130723";controller._loadCss(BD_BRIDGE_ROOT+cssPath);if(BDBridge.Icon&&BDBridge.Icon.__setHandleList){BDBridge.Icon.__setHandleList(controller.handleClickIcon)}if(invite&&invite.__setHandleList){invite.__setHandleList(controller.handleInvite)}if(BD_BRIDGE_PIGEON_SOUL.messFloatType==0){BDBridge.group.getGroupData(controller._handleGroup)}else{controller.create(BD_BRIDGE_PIGEON_SOUL,document.getElementById("BDBridgeMess"),0);if(BD_BRIDGE_PIGEON_SOUL.disableMess!=0){controller.hide()}}}}})();var BDBridge=window.BDBridge||{};BDBridge.pigeonFuc=BDBridge.pigeonFuc||(function(){var d;var b=BDBridge.BD_BRIDGE_ROOT,h=BDBridge.BD_BRIDGE_DATA;var f=BDBridgeStat;var a={SCHEME:{hiddenform:function(j){c._form_send(j)}},SCHEME_INFO:"hiddenform",SUBMIT_ACTION:"?module=default&controller=index&action=doMess"};var e={status:false,sendTimer:null,callbacklist:[],sCounter:0};var c={_form_send:function(m){var r=b+a.SUBMIT_ACTION+"&siteid="+h.siteid+"&ucid="+h.ucid+"&page_id="+BDBridge.pageid;var o=BDBridge.Lib.G("BdBPIframe")?BDBridge.Lib.G("BdBPIframe"):BDBridge.Lib.createIframe("BdBPIframe","BdBPIframe","display:none");BDBridge.Lib.bind(o,"load",c.succeed);var p=BDBridge.Lib.G("BdBPForm")?BDBridge.Lib.G("BdBPForm"):BDBridge.Lib.createForm("BdBPForm","post",r,"BdBPIframe",false,"utf-8");var l=[];var k,j=m.items.length;l[l.length]='		<input type="hidden" name="bd_bp_title" value="'+h.title+'"/>';l[l.length]='		<input type="hidden" name="bd_bp_referer" value="'+h.referrer+'"/>';l[l.length]='		<input type="hidden" name="bd_bp_tick" id="BdBPTick" value="'+(new Date()).getTime()+'"/>';l[l.length]='<input name="bd_bp_messText" value="'+m.mess+'" id= "BdBPInput_0" />';var n;for(k=0;k<j;k++){n=m.items[k].name?m.items[k].name:"bd_bp_extral_"+k;l[l.length]='<input name="'+n+'" value="'+m.items[k].value+'" id= "BdBPInput'+parseInt(k+1)+'" />'}p.innerHTML=l.join("");p.submit();e.sendTimer=setTimeout(BDBridge.pigeonFuc.__fail,3000)},succeed:function(){if(!e.sendTimer){return}f("SEND_MESS",{siteId:h.SITE_ID,mainId:h.mainid},{open:1});clearTimeout(e.sendTimer);e.sendTimer=null;var j=e.callbacklist.length;while(j--){e.callbacklist[0](1);e.callbacklist.shift()}},__fail:function(){e.sendTimer=null;var j=e.callbacklist.length;while(j--){e.callbacklist[0](0);e.callbacklist.shift()}}};return d={send:function(j){return a.SCHEME[a.SCHEME_INFO](j)},getStatus:function(j){e.callbacklist.push(j)},__fail:c.__fail}})();var BDBridge=window.BDBridge||{};BDBridge.invite=BDBridge.invite||(function(){var m;var j=BDBridge.BD_BRIDGE_ROOT,c=BDBridge.BD_BRIDGE_DATA,a=BDBridge.BD_BRIDGE_INVITE_CONFIG,h=BDBridge.BD_BRIDGE_INVITE,l='<iframe id="BDBridgeInviteIframe" frameborder="0" marginheight="0" marginwidth="0" src="about:blank" style="display:none;_filter:alpha(opacity=0);"></iframe><div id="InviteContainer"><div id="bridgeTopContainer"><a id="bridgeinviteclose" href="javascript:;"></a><div class="bdbridge-clearfix"><div id="decorationskin" style=""></div><div id="inviteright"><div id="preinvitetext" style="line-height:1.2;"></div><div id="invitebtn" class="bridge-invite-button"><div id="chatnow" class="invite-button" style="margin-left:5px;width:81px;height:26px;line-height:26px;font-size:12px;text-align:center;text-decoration:none;" href="javascript:;">现在咨询</div><div id="chatlater" class="invite-button" style="width:81px;height:26px;background:url('+j+'img/matrix/btn.png) -88px 0;" href="javascript:;"></div></div></div></div></div></div>';var e=BDBridgeStat;var d=BDBridgeLog;var k={BDBRIDGE_INVITE_FULL:{width:310,height:144},chatType:{byInvite:0,bySelf:1,enforce:5,autoInvite:3},ROOT:BDBridge.BD_BRIDGE_ROOT+"res/invitebgcolorful/",BDBRIDGE_INVITE_SPECIAL:[{w:327,h:210,x:17,y:33,filename:"0.png",description:"新年快乐"},{w:363,h:208,x:25,y:32,filename:"1.png",description:"每时每刻"},{w:350,h:269,x:8,y:59,filename:"2.png",description:"快乐沟通"},{w:400,h:248,x:74,y:80,filename:"3.png",description:"粉红惊喜"},{w:350,h:238,x:11,y:53,filename:"4.png",description:"纸醉金迷"},{w:350,h:270,x:29,y:109,filename:"5.png",description:"缤纷乐园"},{w:380,h:211,x:24,y:27,filename:"6.png",description:"烂漫童趣"},{w:540,h:220,x:186,y:52,filename:"7.png",description:"二战风云"},{w:291,h:290,x:0,y:133,filename:"8.png",description:"灯绿酒红"},{w:397,h:273,x:45,y:80,filename:"9.png",description:"节日快乐"},{w:350,h:227,x:39,y:76,filename:"10.png",description:"礼品多多"},{w:330,h:226,x:10,y:60,filename:"11.png",description:"圣诞大礼"},{w:322,h:177,x:5,y:26,filename:"12.png",description:"圣诞大礼"},{w:450,h:300,x:100,y:105,filename:"13.png",description:"紫色迷情"},{w:450,h:330,x:107,y:140,filename:"14.png",description:"果绿青春"},{w:420,h:225,x:72,y:44,filename:"15.png",description:"国风书香"},{w:326,h:235,x:25,y:75,filename:"16.png",description:"蓝月亮"},{w:377,h:204,x:56,y:12,filename:"17.png",description:"龙年吉祥"},{w:326,h:235,x:0,y:12,filename:"18.png",description:"免费试学"},{w:295,h:227,x:0,y:0,filename:"19.png",description:"财神到"},{w:318,h:203,x:0,y:12,filename:"20.png",description:"金蛇报喜"},{w:249,h:281,x:0,y:0,filename:"21.png",description:"吉庆有余"}],DECORATION_SIZE:{width:98,height:128},BACKGROUND_SIZE:{width:310,height:144},DEFAULTTIP:"您可直接在这里和我们联系!"};var b={inviteTimer0:null,inviteTimer1:null,inviteTimer2:null,intervalTimer:null,inviteGroupId:"",inviteGroupName:"",inviteSubid:"",inviteSubname:"",manualInvited:0,autoInvited:0,inviteStatus:0,invited:0,handleMessList:[]};var f={__hide:function(){g("BDBridgeInviteWrap").style.display="none"},hide:function(){g("BDBridgeInviteWrap").style.cssText+=";display:none !important;"},__show:function(){(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6)&&g("BDBridgeInviteIframe")&&(g("BDBridgeInviteIframe").style.display="block");g("InviteContainer")&&(g("InviteContainer").style.display="block");g("BDBridgeChatBox")&&(g("BDBridgeChatBox").style.display="block");g("BDBridgeInviteWrap")&&(g("BDBridgeInviteWrap").style.display="block");g("invitebtn").style.zoom=1},__keepShow:function(){b.inviteStatus=1;b.autoInvited=1;if(h.inviteauto==1){f.__show();if(h.invitedisaptype==1){var n=(h.invitedisaptime-0)*1000||20000;b.inviteTimer1=setTimeout(BDBridge.invite.__autoHide,n)}}},__autoHide:function(){b.inviteStatus=0;b.autoInvited=0;BDBridge.invite.__hide();if(h.inviterepeat==1){b.inviteTimer2=setTimeout(function(){BDBridge.invite.__keepShow()},30000)}},__ignore:function(){if(h.invitemanual==1&&b.manualInvited==1){clearTimeout(b.inviteTimer0);BDBridge.rcvbase.reject(f._handleRejct)}else{clearTimeout(b.inviteTimer1);BDBridge.invite.__autoHide()}},createInvite:function(){var p=BDBridge.Lib.G("BDBridgeWrap")||BDBridge.Lib.G("BDBridgeNewWrap"),n=a;if(!p){p=document.createElement("div");p.id="BDBridgeWrap"}var o=document.createElement("div");o.id="BDBridgeInviteWrap";p.appendChild(o);o.innerHTML=l;BDBridge.Lib.G("BDBridgeLS").style.background="#ccc";f.getPosition();f.setSkin();f.setDecoration();f.setSize();f.setText();f.setButton();f.bindEvents();if(n.head.show!=2&&n.mode==2){f.__createChatBox()}f.__hide()},getPosition:function(){var z=document.getElementById("InviteContainer"),w=document.getElementById("BDBridgeInviteWrap"),r=a,n=k.BDBRIDGE_INVITE_FULL,t=k.BDBRIDGE_INVITE_SPECIAL,v=r.show.pos-0,o=r.background.url,x=r.head.show,u=r.special,p=r.show.width,y=r.show.height;var s;if(window.innerWidth){s=window.innerWidth}else{if((document.body)&&(document.body.clientWidth)){s=document.body.clientWidth}}if(window.innerHeight){winHeight=window.innerHeight}else{if((document.body)&&(document.body.clientHeight)){winHeight=document.body.clientHeight}}if(x==2){p=t[u].w;y=t[u].h}else{if(o.indexOf("res/")!=-1){p=n.width;y=n.height}}if(x!=2&&r.mode==2){y+=51}switch(v){case 0:w.style.left="50%";w.style.top="50%";w.style.marginTop=-Math.ceil(y/2)+"px";w.style.marginLeft=-Math.ceil(p/2)+"px";break;case 1:w.style.top="auto";w.style.right="0";w.style.bottom="0";w.style.left="auto";break;case 2:w.style.top="auto";w.style.right="auto";w.style.bottom="0";w.style.left="0";break}},setSkin:function(){var p=a,r=k.BDBRIDGE_INVITE_SPECIAL,x=p.background,s=x.color,o=x.url,u=p.head.show,n=g("bridgeTopContainer"),t=g("inviteright"),v,w;if(u!=2){n.style.backgroundColor=s;n.style.backgroundImage=o?format("url(#{0})",o)+"":"";t.style.display="block"}else{w=r[p.special];v=w.filename?k.ROOT+w.filename:"";if(v){if(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]==6){n.style.backgroundImage="none";n.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+v+")"}else{n.style.background=format("url(#{0})",v)}}t.style.display="none"}},setDecoration:function(){var t=a,v=k.DECORATION_SIZE,s=g("decorationskin"),p=t.head,u=p.size,o=t.head.show,r=p.url,n=t.on;if(o==2){s.style.display="none";return}if(n){s.style.border="2px solid #fff";s.style.backgroundImage=r?format("url(#{0})",r)+"":"";if(r.indexOf("res/")!=-1){s.style.width="98px";s.style.height="128px"}else{if(u==1){s.style.width="98px";s.style.height="128px"}else{s.style.width="98px";s.style.height="78px";v.width=98;v.height=78}}s.style.visibility="visible"}else{s.style.visibility="hidden";s.style.width="98px";s.style.height="78px";v.width=98;v.height=78}},setText:function(){var r=a,p=k.DECORATION_SIZE,s=g("preinvitetext"),D=g("decorationskin"),o=p.height,C=r.text,z=r.show,t=z.font,x=z.fontsize,A=z.fontcolor,B,y=[];if(r.head.show==2){return}s.innerHTML=C;y[y.length]="color:"+A;y[y.length]="font-size:"+x+"px";y[y.length]="font-family:"+t;s.style.cssText+=";"+y.join(";")+";";for(var v=0,E,w=s.getElementsByTagName("a");E=w[v++];){E.style.color=A}B=s.offsetHeight;var u=((a.mode==0&&o==128)?15:0);isNaN(o)&&(o=0);var n=Math.ceil((o-B)/2-u);s.style.marginTop=(n<0?5:n)+"px"},setButton:function(){var s=a,p=g("chatlater"),r=g("chatnow"),u=s.mode,o=s.button,n=s.show,t=g("invitebtn");if(u==0){r.style.display="block";p.style.display="block";r.style.background=o}else{r.style.display="none";p.style.display="none";r.style.background=o}p.onclick="";r.onclick="";r.onmouseover=function(){addClass(this,"invite-button-hover")};p.onmouseover=function(){addClass(this,"invite-button-hover")};r.onmouseout=function(){removeClass(this,"invite-button-hover")};p.onmouseout=function(){removeClass(this,"invite-button-hover")}},setSize:function(){var J=a,w=k.BDBRIDGE_INVITE_SPECIAL,t=k.BDBRIDGE_INVITE_FULL,o=k.DECORATION_SIZE,H=k.BACKGROUND_SIZE,C=J.show.width,A=J.show.height,r=J.background.url,E=J.background.color,z=g("BDBridgeInviteWrap"),s=g("bridgeTopContainer"),x=g("InviteContainer"),K=g("preinvitetext"),v=g("decorationskin"),D=g("ChatBox"),n=g("BDBridgeChatArea"),u=g("BDBridgeInviteIframe"),I=J.head.show,G=[],B;if(I!=2){if(r.indexOf("res/")!=-1){C=t.width;A=t.height}B=o.width;var y=C-B-30;K.style.width=(y>0?y:0)+"px";if(D){var F=C-12;var p=C-12-46;D.style.width=(F>0?F:0)+"px";n.style.width=(p>0?p:0)+"px"}}else{G=w[J.special];A=G.h;C=G.w;s.style.cursor="pointer"}x.style.width=C+"px";x.style.height=A+"px";z.style.width=C+"px";setTimeout(function(){s.style.height=A+"px";s.style.width=C+"px"},0);H.width=C;H.height=A;if(!u){return}if(I!=2&&J.mode==2){u.style.width=C+"px";u.style.height=A+50+"px"}else{u.style.width=C+"px";u.style.height=A+"px"}},setIframeSize:function(){var o=BDBridge.Lib.G("BDBridgeInviteWrap"),n=BDBridge.Lib.G("BDBridgeInviteIframe");if(!n){return}n.style.width=o.offsetWidth+"px";n.style.height=o.offsetHeight+"px"},bindEvents:function(){var p=a,n=p.head.show,r=p.mode;if(n==2||r==1){BDBridge.Lib.G("InviteContainer").style.cursor="pointer";BDBridge.Lib.G("InviteContainer").onclick=f.bridgeInviteOpen}else{if(r==0){BDBridge.Lib.G("chatlater").onclick=bridgeInviteClose;BDBridge.Lib.G("chatnow").onclick=f.bridgeInviteOpen}}BDBridge.Lib.G("bridgeinviteclose").onclick=function(s){var s=s||window.event;if(s.stopPropagation){s.stopPropagation()}else{s.cancelBubble=true}BDBridge.Lib.stopDefault(s);bridgeInviteClose();d("CLOSE_INVITE",{},c.siteid,c.ucid)};var o=BDBridge.Lib.G("BDBridgeInviteWrap");if(!BDBridge.Lib.ie||(BDBridge.Lib.ie6plus&&!BDBridge.Lib.onQuirkMode)){o.style.position="fixed"}else{o.style.position="absolute";f.scroll();window.attachEvent("onscroll",f.scroll);window.attachEvent("onresize",f.scroll)}},scroll:function(){var t=!BDBridge.Lib.onQuirkMode?document.documentElement:document.body;var x=BDBridge.Lib.G("BDBridgeInviteWrap");var p=a,n=k.BDBRIDGE_INVITE_FULL,r=k.BDBRIDGE_INVITE_SPECIAL,u=p.show.pos-0,o=p.background.url,v=p.head.show,s=p.special,w=p.show.height;if(v==2){w=r[s].h}else{if(o.indexOf("res/")!=-1){w=n.height}}if(v!=2&&p.mode==2){w+=51}switch(u){case 0:x.style.top=parseInt(t.clientHeight/2,10)+t.scrollTop+"px";break;case 1:case 2:x.style.bottom="auto";x.style.top=t.clientHeight+t.scrollTop-w-5+"px";break}},__findInGroup:function(x){var w=c.group;var p="";var v="";var y="";for(var u=0,r=w.length;u<r;u++){var t=w[u]["user"];var o=t.length;for(var s=0;s<o;s++){if(x==t[s]["subid"]){p=w[u]["groupid"];v=w[u]["groupname"];y=t[s]["subname"];break}}}p=(p==="")?w[0]["groupid"]:p;v=(v==="")?w[0]["groupname"]:v;return({groupid:p,groupname:v,subname:y})},bridgeInviteOpen:function(){var p={};if(f.__detecSub()){if(b.manualInvited==1){p.subid=b.inviteSubid;p.groupid=b.inviteGroupId;p.groupname=b.inviteGroupName;p.subname=b.inviteSubname;e("ACCEPT_INVITE",{siteId:c.SITE_ID,mainId:c.mainid},{subId:p.subid,open:1});p.chattype=k.chatType.byInvite;BDBridge.Lib.webim.accept(p)}else{p.chattype=k.chatType.autoInvite;BDBridge.Lib.webim.accept(p)}}else{var o=BDBridge.invite.__getHandleList();if(o&&o.length>0){for(var n in o){o[n]("")}}}BDBridge.invite.__hide();BDBridge.invite.__doClear();d("CLICK_ICON",{info:"invite"},c.siteid,c.ucid)},__createChatBox:function(){var w=k.BACKGROUND_SIZE;var s=document.createElement("div");s.id="BDBridgeChatBox";s.innerHTML='<div id="BDBridgeChatBg"></div><div id="BDBridgeChatBgMiddle"></div><textarea id="BDBridgeChatArea" style="color:#999">'+k.DEFAULTTIP+'</textarea><a href="javascript:;" id="BDBridgeStartChat" hidefocus="true">&nbsp;</a>';var o=BDBridge.Lib.G("BDBridgeInviteWrap");o.appendChild(s);var t=BDBridge.Lib.G("InviteContainer");var n=BDBridge.Lib.G("BDBridgeChatArea");var v=BDBridge.Lib.G("bridgeinviteclose");var p=(w.width-70>0)?(w.width-70):0;var r=w.width-9;s.style.width=(r>0?r:0)+"px";n.style.width=p+"px";var u=BDBridge.Lib.G("BDBridgeChatBgMiddle");u.style.width=p+"px";if(BDBridge.Lib.ie&&BDBridge.Lib.onQuirkMode){v.style.height="10px";s.style.width=w.width+3+"px";s.style.height="62px";n.style.width=p+"px";n.style.height="35px"}n.onfocus=function(){if(this.value==k.DEFAULTTIP){this.value="";this.style.color="#000"}};n.onblur=function(){if(BDBridge.Lib.trim(this.value)==""){this.value=k.DEFAULTTIP;this.style.color="#999"}};BDBridge.Lib.G("BDBridgeStartChat").onclick=function(A){BDBridge.Lib.stopDefault(A);var B={},z={};B.subid=b.inviteSubid;B.groupid=b.inviteGroupId;B.groupname=b.inviteGroupName;B.subname=b.inviteSubname;n.value&&(B.chat=n.value);if(f.__detecSub()){if(b.manualInvited==1){e("ACCEPT_INVITE",{siteId:c.SITE_ID,mainId:c.mainid},{subId:B.subid,open:1});B.chattype=k.chatType.byInvite;BDBridge.Lib.webim.accept(B)}else{B.chattype=k.chatType.autoInvite;BDBridge.Lib.webim.accept(B)}}else{var y=BDBridge.invite.__getHandleList();if(y&&y.length>0){for(var x in y){y[x](n.value)}}}BDBridge.invite.__hide();f.__doClear();d("CLICK_ICON",{info:"invite"},c.siteid,c.ucid)}},__detecSub:function(){var p=c.group;for(var n=0,o;o=p[n++];){if(o.online){return true}}return false},__doClear:function(){clearTimeout(b.inviteTimer0);clearTimeout(b.intervalTimer);clearTimeout(b.inviteTimer1);clearTimeout(b.inviteTimer2)},_handleRejct:function(){b.inviteStatus=0;b.manualInvited=0;BDBridge.Lib.cookie.setRaw("BRIDGE_INVITE_0",1);if(h.inviterepeat==1){BDBridge.Lib.cookie.setRaw("BRIDGE_INVITE_0",0)}else{BDBridge.Lib.cookie.setRaw("BRIDGE_REFRESH",15000)}BDBridge.invite.__hide()},handleShow:function(o){if(h.invitemanual!=1){return}if(BDBridge.Lib.cookie.getRaw("BRIDGE_INVITE_0")==null){BDBridge.Lib.cookie.setRaw("BRIDGE_INVITE_0",0)}if(BDBridge.Lib.cookie.getRaw("BRIDGE_INVITE_0")==0&&o.status==1){b.invited==1;b.inviteStatus=1;b.manualInvited=1;b.inviteSubid=o.subid;var n=f.__findInGroup(o.subid);b.inviteGroupId=n.groupid;b.inviteGroupName=n.groupname;b.inviteSubname=n.subname;f.__show();if(h.invitedisaptype==1){var p=(h.invitedisaptime-0)*1000||20000;b.inviteTimer0=setTimeout(function(){BDBridge.rcvbase.reject(f._handleRejct)},p)}}},handleAutoShow:function(){b.intervalTimer=setTimeout(BDBridge.invite.__keepShow,h.invitetime*1000)},handleStopMouseup:function(){if(document.getElementById("BDBridgeNewWrap")||document.getElementById("BDBridgeWrap")){(document.getElementById("BDBridgeNewWrap")||document.getElementById("BDBridgeWrap")).onmouseup=null}}};return m={__ignore:f.__ignore,__hide:f.__hide,hide:f.hide,__show:f.__show,__createChatBox:f.__createChatBox,__doClear:f.__doClear,chatRender:false,__getHandleList:function(){return b.handleMessList},__setHandleList:function(n){b.handleMessList.push(n)},__autoHide:f.__autoHide,__keepShow:f.__keepShow,init:function(){g=BDBridge.Lib.G;addClass=BDBridge.Lib.addClass;removeClass=BDBridge.Lib.removeClass;format=BDBridge.Lib.string.format;q=BDBridge.Lib.Q;each=BDBridge.Lib.each;a=BDBridge.BD_BRIDGE_INVITE_CONFIG;h=BDBridge.BD_BRIDGE_INVITE;if(typeof a.special=="undefined"){a.special=0}BDBridge.Lib.loadCss(j+"asset/css/m-front-invite.css?v=20130705");f.createInvite();if(a.background.url!=""){a.background.url+="?_t="+(new Date()).getTime().toString()}if(a.head.url!=""){a.head.url+="?_t="+(new Date()).getTime().toString()}if(window.opera){window.scroll(0,0)}BDBridge.rcvbase.doAutoInvite(f.handleAutoShow);BDBridge.rcvbase.doInvite(f.handleShow)}}})();function bridgeInviteClose(){BDBridge.invite.__ignore()}function bridgeInviteStretch(b,a){BDBridge.Lib.swf.getMovie("BDBridgeInvite").setAttribute("width",b);BDBridge.Lib.swf.getMovie("BDBridgeInvite").setAttribute("height",a);BDBridge.Lib.G("BDBridgeInviteWrap").style.width=b+"px";BDBridge.Lib.G("BDBridgeInviteWrap").style.height=a+"px";BDBridge.Lib.G("BDBridgeInviteWrap").style.marginLeft=-Math.ceil(b/2)+"px";BDBridge.Lib.G("BDBridgeInviteWrap").style.marginTop=-Math.ceil(a/2)+"px";if(BDBridge.BD_BRIDGE_INVITE_CONFIG.head.show!=2&&BDBridge.BD_BRIDGE_INVITE_CONFIG.mode==2&&!BDBridge.invite.chatRender){BDBridge.invite.__createChatBox();BDBridge.invite.chatRender=true}if(BDBridge.BD_BRIDGE_INVITE_CONFIG.mode==2){BDBridge.Lib.G("BDBridgeChatBox").style.display="block"}}var Qiao=function(){var b=this,a=function(d,c){return(d&&d.hasOwnProperty&&(d instanceof c))};if(!(a(b,Qiao))){b=new Qiao()}else{b._init()}return b};(function(){var e,h=Array.prototype.slice,d=Object.prototype.toString,f=".",b={mods:{},_attached:{},_loaded:{},_events:{}};function c(j){return function(){throw new Error("need to implement "+j)}}function a(l,k,j){j.fire=j.fire||function(m){var n=Array.prototype.slice.call(arguments);n.unshift(k);l.fire.apply(l,n)};j.on=j.on||function(m,n){l.on(k,m,n)}}e={_init:function(){var m=this,j="Qiao_"+(+new Date()).toString(16),l=b._attached,k=b._events;m.id=j;l[j]={};k[j]={}},define:function(j,m,l){var k={name:j};if(!l){l=m;m=[]}m=m||[];k.fn=l;k.requires=m;b.mods[j]=k},use:function(){var k=h.call(arguments,0),s=k[k.length-1],p=b.mods,o=this,m,j,n=[];if(d.call(s)==="[object Function]"){k.pop()}else{s=null}if(d.call(k[0])==="[object Array]"){k=k[0]}for(m=0,j=k.length;m<j;m++){n.push(k[m])}if(o._attach(n)){s(o)}},_attach:function(y){var u=this,x=b.mods,k=b._attached,n=k[u.id],m,w,v,t,s,r,o=y.length,p;for(s=0;s<o;s++){m=y[s];if(n[m]){continue}p=u._namespace(m);w=x[m];if(!w){continue}n[m]=true;v=w&&w.requires;if(v){for(r=0;(t=v[r]);r++){if(!n[t]){if(!u._attach(v)){return false}break}}}if(w.fn){a(u,m,p);w.fn(u,p);if(p.interfaces&&d.call(p.interfaces)=="[object Array]"){for(r=0;t=p.interfaces[r];r++){p[t]=c(t)}}}}return true},_namespace:function(){var n=arguments,t,r=0,m,p,s,k;for(m=n.length;r<m;r++){t=this;k=n[r];if(k.indexOf(f)>-1){s=k.split(f);for(p=(s[0].toLowerCase()=="qiao")?1:0;p<s.length;p++){t[s[p]]=t[s[p]]||{};t=t[s[p]]}}else{t[k]=t[k]||{};t=t[k]}}return t},implement:function(n,m){var j=n.interfaces||[],k,l;for(k=0;l=j[k];k++){if(m[l]){n[l]=m[l]}}},fire:function(n,j){var p=this,m,o,k=Array.prototype.slice.call(arguments),l=b._events[p.id];l=l[n]||{};l=l[j]||[];k.splice(0,2);for(m=0;o=l[m];m++){o.apply(null,k)}},on:function(l,j,n){var m=this,k=b._events[m.id];k=k[l]?k[l]:(k[l]={});k=k[j]?k[j]:(k[j]=[]);k.push(n)}};Qiao.prototype=e;Qiao.define=e.define;Qiao.cb={}}());Qiao.define("base.loader",null,function(b,a){var e=document,h=(function(){var j=navigator.userAgent;return{async:e.createElement("script").async===true,firefox:/firefox\/(\d+\.\d+)/i.test(j)?+RegExp["\x241"]:undefined,ie:/msie (\d+\.\d+)/i.test(j)?(document.documentMode||+RegExp["\x241"]):undefined,isStrict:document.compatMode=="CSS1Compat",isGecko:/gecko/i.test(j)&&!/like gecko/i.test(j),isWebkit:/webkit/i.test(j),opera:/opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(j)?+(RegExp["\x246"]||RegExp["\x242"]):undefined}}()),d=h.ie?0:(h.opera?1:2);var c={createNode:function(k,l){var j,m=e.createElement(k);for(j in l){if(l.hasOwnProperty(j)){m.setAttribute(j,l[j])}}return m},load:function(k,l,j,m){if(typeof j=="function"){m=j;j={}}new f(k,l,j,m)},merge:function(l,k){for(var j in k){if(k.hasOwnProperty(j)){l[j]=k[j]}}return l}};function f(o,n,s,p){var r=this,k,j=o=="js"?e.getElementsByTagName("body")[0]:e.getElementsByTagName("head")[0],l,m;r.callback=p||function(){};r.queue=[];n=(typeof n=="string"?[n]:n);for(l=0,m=n.length;l<m;l++){this.queue[l]=1;if(o=="css"){if(!h.isGecko){k=c.createNode("link",c.merge({type:"text/css",rel:"stylesheet",href:n[l]},s))}else{k=c.createNode("style");k.innerHTML='@import "'+n[l]+'";'}}else{k=c.createNode("script",c.merge({type:"text/javascript",src:n[l],charset:"utf-8"},s))}if(d){if(o=="css"&&d==2){(function(){var t=0,u=setInterval(function(){try{k.sheet.cssRules;clearInterval(u);r._callback()}catch(v){t+=1;if(t>100){clearInterval(u);r._callback()}}},100)}())}else{k.onload=function(){r._callback()}}}else{k.onreadystatechange=function(){if(/^loaded|complete$/.test(this.readyState)){this.onreadystatechange=null;r._callback()}}}}j.appendChild(k)}f.prototype={_callback:function(){var j=this;if(j.queue.pop()&&(j.queue==0)){j.callback()}}};a.css=function(k,j,l){return c.load("css",k,j,l)};a.js=function(k,j,l){return c.load("js",k,j,l)}});var BDBridge=window.BDBridge||{};BDBridge.webimlite=BDBridge.webimlite||(function(){var b={},j=null,k=BDBridge.BD_BRIDGE_ROOT||"http://qiao.baidu.com/v3/";b.chatType={byInvite:0,bySelf:1,enforce:5};function d(){var n=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.prevInfo)||"{}";return BDBridge.Lib.json.parse(n)}function e(o){var n=d();for(var p in o){if(o.hasOwnProperty(p)){n[p]=o[p]}}BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.prevInfo,BDBridge.Lib.json.stringify(n))}function c(n){BDBridge.webimlite._qiao=n;j=n.business.webimlite;var o=BDBridge.BD_BRIDGE_WEBIM;j.on("revertsession",function(){BDBridge.BD_BRIDGE_WEBIM.webimopentype=1;setInterval(function(){BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.instance,new Date().getTime())},500)});j.on("unload",function(){});j.on("ready",function(){var p=d();p.lc=p.lc?parseInt(p.lc,10):0;e({lc:p.lc+1});BDBridge.BD_BRIDGE_WEBIM.webimopentype=1});j.on("changesubid",function(p){e({ls:p})});j.init({bid:b.bid,siteid:b.siteid,ucid:b.ucid,mainid:b.mainid||0,SITE_ID:b.SITE_ID||0,userName:b.userName,offsetTime:b.offsetTime,root:k,bgColor:o.webimbgcolor||"",position:o.floatposition||0,csNameType:(typeof o.floatChatName!="undefined"?o.floatChatName:-1),customName:o.floatCustomname||"",searchInfo:b.searchInfo})}function a(s,n){var p=["referrer","location","title","word","wordtype","wordid","from"],o,r;b.bid=s.bid;b.siteid=s.siteid;b.ucid=s.ucid;b.userName=s.userName;b.groups=n;b.mainid=s.mainid;b.SITE_ID=s.SITE_ID;b.offsetTime=0;b.searchInfo={};for(o=0;r=p[o];o++){b.searchInfo[r]=s[r]||""}Qiao().use(["base.loader"],function(t){t.base.loader.css(k+"asset/css/m-webim-lite.css?v=20150613");t.base.loader.js(k+"asset/js/m-webim-lite.js?v=20150613",{},function(){Qiao().use(["business.webimlite"],c)})})}function m(x){var w=b.groups;var p="";var v="";var y="";for(var u=0,r=w.length;u<r;u++){var t=w[u]["user"];var o=t.length;for(var s=0;s<o;s++){if(x==t[s]["subid"]){p=w[u]["groupid"];v=w[u]["groupname"];y=t[s]["subname"];break}}}p=(p==="")?w[0]["groupid"]:p;v=(v==="")?w[0]["groupname"]:v;return({groupid:p,groupname:v,subname:y})}function f(o){var p;if(o.status==4){p=m(o.subid);var n={type:0,chattype:b.chatType.enforce,tid:p.groupid,subid:o.subid,groupname:p.groupname};l(n)}}function h(o){if(o.status==0){var p=o.groupid;var n=o.groupname;if(j.accept({type:b.vis_type,chattype:b.chattype,bridgeTid:p,subid:b.vis_subid||"",userGroupName:n})){setInterval(function(){BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.instance,new Date().getTime())},500)}}}function l(A){var x=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.instance);var o=BDBridge.BD_BRIDGE_ROOT+"?module=default&controller=webim&action=visdistribute";var v=A.type;var s=A.tid;var y=A.subid;var u=A.groupname;var w=A.from;var n=A.lastsubid;var z=A.siteid;var p=A.ucid;var t=(new Date()).getTime();if(t-x<1000||!j){return}if(s===""){v=3;b.vis_type=v;b.vis_subid=y;b.vis_from=w;b.lastsubid=n;b.chattype=A.chattype;var r="&siteid="+z+"&ucid="+p+"&groupid="+s+"&groupname="+u+"&from="+w+"&lastsubid="+n+"&callback=BDBridge.webimlite.handleVisDistribute";BDBridge.Lib.loadScript("BDBridgeVisDistribute",o+r)}else{if(j.accept({type:v,chattype:A.chattype,bridgeTid:s,subid:y||"",userGroupName:u})){setInterval(function(){BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.instance,new Date().getTime())},500)}}}return{init:function(){BDBridge.rcvbase.addEnterHandler(a);BDBridge.rcvbase.addRefreshHandler(f)},chat:l,show:function(){j.show()},handleVisDistribute:h}})();var BDBridge=window.BDBridge||{};BDBridge.rcv=BDBridge.rcv||(function(){var c;var a={};var d={};var b={_bind:function(){BDBridge.Lib.bind(window,"unload",BDBridge.rcvbase.stopMonitor);BDBridge.Lib.bind(window,"load",BDBridge.rcvbase.startMonitor)}};return c={init:function(){b._bind()}}})();var BDBridge=window.BDBridge||{};BDBridge.Lib=BDBridge.Lib||{ls:baiduLS.localStorage,lsHTML:'<div id="BDBridgeLS"></div>',lsId:"bridge",lsKey:{bid:BDBridge.BD_BRIDGE_DATA.siteid+"bid24",data:BDBridge.BD_BRIDGE_DATA.siteid+"data",last:BDBridge.BD_BRIDGE_DATA.siteid+"last",show:BDBridge.BD_BRIDGE_DATA.siteid+"show",instance:BDBridge.BD_BRIDGE_DATA.siteid+"instance",chat:BDBridge.BD_BRIDGE_DATA.siteid+"chat",startload:BDBridge.BD_BRIDGE_DATA.siteid+"startload",prevInfo:BDBridge.BD_BRIDGE_DATA.siteid+"previousInfo",offsetTime:BDBridge.BD_BRIDGE_DATA.siteid+"offsetTime",firstInfo:BDBridge.BD_BRIDGE_DATA.siteid+"firstInfo"},startTime:new Date().getTime(),define:function(b,e){var a,c,d=window;b=b.split(".");for(a=0;c=b[a];a++){if(!d[c]){d[c]={}}d=d[c]}e.call(null,d);return d},iconInit:function(){BDBridge.Lib.ls_callback_list.push(BDBridge.Icon.init)},pigeonInit:function(){BDBridge.Lib.ls_callback_list.push(BDBridge.pigeon.init)},inviteInit:function(){BDBridge.Lib.ls_callback_list.push(BDBridge.invite.init)},rcvInit:function(){BDBridge.Lib.ls_callback_list.push(BDBridge.rcv.init)},webimliteInit:function(){BDBridge.Lib.ls_callback_list.push(BDBridge.webimlite.init)},openBD:[],getBridge:function(){BDBridge.Lib.openBD=[BDBridge.Lib.iconInit,BDBridge.Lib.pigeonInit,BDBridge.Lib.inviteInit,BDBridge.Lib.rcvInit,BDBridge.Lib.webimliteInit];var b=BDBridge.OPEN_MODULAR,d=parseInt(b,2),a=BDBridge.Lib.openBD;while(d){var c=d%2;if(c){a[0]();a.shift()}d=parseInt(d/2)}},ls_callback_list:[],getPageConfig:function(){var f=window.location.href,c=BDBridge.BD_BRIDGE_SPECIAL,b=c?c.length:0,e,d;var a=null;for(d=0;d<b;d++){e=c[d];if(f==e.url||f.indexOf(e.url)>=0){!a&&(a=e);a&&(a.url)&&(a.url.length<e.url.length)&&(a=e)}}return a},getBridgeStyleConfig:function(){var c=BDBridge.Lib.getPageConfig(),e=BDBridge.BD_BRIDGE_STYLE_ITEM,a=e.length,d,b;if(!c){for(b=0;b<a;b++){d=e[b];if(d.pageid=="0"){return d}}}else{for(b=0;b<a;b++){d=e[b];if(d.pageid==c.id){return d}}}},logBrowser:function(){var b=BDBrowser||{};var c=BDBridgeLog;if(BDBridge&&BDBridge.BD_BRIDGE_DATA){var d=BDBridge.BD_BRIDGE_DATA.siteid;var a=BDBridge.BD_BRIDGE_DATA.ucid}c&&c("GET_BROWSER",{browser:b.type},d,a)},init:function(){var a=BDBridge.Lib.getBridgeStyleConfig();BDBridge.BD_BRIDGE_ICON_CONFIG=a.BD_BRIDGE_ICON_CONFIG;BDBridge.BD_BRIDGE_INVITE_CONFIG=a.BD_BRIDGE_INVITE_CONFIG;BDBridge.BD_BRIDGE_INVITE=a.BD_BRIDGE_INVITE;BDBridge.BD_BRIDGE_PIGEON_SOUL=a.BD_BRIDGE_PIGEON_SOUL;BDBridge.BD_BRIDGE_GROUP=a.BD_BRIDGE_GROUP;BDBridge.BD_BRIDGE_WEBIM=a.BD_BRIDGE_WEBIM||{};BDBridge.pageid=a.pageid=="0"?"":a.pageid;BDBridge.Lib.cookie.setRaw("BRIDGE_INVITE_0",0);BDBridge.Lib.ie=/msie (\d+)/.exec(navigator.userAgent.toLowerCase());BDBridge.Lib.ie6plus=BDBridge.Lib.ie&&parseInt(BDBridge.Lib.ie[1])>6;BDBridge.Lib.onQuirkMode=document.compatMode=="CSS1Compat"?false:true;BDBridge.Lib.mobile=function(){var d=navigator.userAgent;return !!d.match(/.*Mobile.*/)||("ontouchstart" in window)}();if(BDBridge.Lib.ie&&!BDBridge.Lib.ie6plus){try{document.execCommand("BackgroundImageCache",false,true)}catch(b){}}var c=document.createElement("div");c.id=BDBridge.Lib.G("BDBridgeWrap")?"BDBridgeNewWrap":"BDBridgeWrap";BDBridge.Lib&&BDBridge.Lib.domReady(function(){c.innerHTML+=BDBridge.Lib.lsHTML;document.body.appendChild(c);BDBridge.Lib.getBridge();BDBridge.Lib.localstorage.createLs();function d(f){f=f||window.event;if(f.stopPropagation){f.stopPropagation()}else{f.cancelBubble=true}}BDBridge.Lib.bind(c,"mousedown",d);BDBridge.Lib.bind(c,"mouseup",d)});BDBridge.Lib.logBrowser()},cookie:{isValidKey:function(a){return(new RegExp('^[^\\x00-\\x20\\x7f\\(\\)<>@,;:\\\\\\"\\[\\]\\?=\\{\\}\\/\\u0080-\\uffff]+\x24')).test(a)},getRaw:function(c){if(!BDBridge.Lib.cookie.isValidKey(c)){return null}var b=new RegExp("(^| )"+c+"=([^;]*)(;|\x24)");var a=b.exec(document.cookie);if(a){return a[2]||null}return null},setRaw:function(c,b,d){if(!BDBridge.Lib.cookie.isValidKey(c)){return false}d=d||{};var a;switch(typeof(d.expires)){case"number":a=new Date();a.setTime(a.getTime()+d.expires);break;case"object":if(d.expires instanceof Date){a=d.expires}}document.cookie=c+"="+b+(d.path?"; path="+d.path:"")+(a?"; expires="+a.toGMTString():"")+(d.domain?"; domain="+d.domain:"")+(d.secure?"; secure":"");return true}},url:{parseQuery:function(k,e){if(e){var h=new RegExp("(^|&|\\?|#)"+BDBridge.Lib.string.escapeReg(e)+"=([^&]*)(&|\x24)","");var j=k.match(h);if(j){return j[2]}}else{if(k){k=k.substr(k.indexOf("?")+1,k.length);var m=k.split("&");var l={},b=[],c,d,f;for(var a=0;a<m.length;a++){c=m[a].split("=");d=c[0],f=c[1];if(d===""){continue}if(typeof l[d]=="undefined"){l[d]=f}else{if(BDBridge.Lib.isString(l[d])){continue}else{l[d].push(f)}}}return l}}return null}},isString:function(a){return(typeof a=="object"&&a&&a.constructor==String)||typeof a=="string"},string:{escapeReg:function(a){return String(a).replace(new RegExp("([.*+?^=!:\x24{}()|[\\]/\\\\])","g"),"\\\x241")},format:function(c,a){c=String(c);var b=Array.prototype.slice.call(arguments,1),d=Object.prototype.toString;if(b.length){b=b.length==1?(a!==null&&(/\[object Array\]|\[object Object\]/.test(d.call(a)))?a:b):b;return c.replace(/#\{(.+?)\}/g,function(e,h){var f=b[h];if("[object Function]"==d.call(f)){f=f(h)}return("undefined"==typeof f?"":f)})}return c}},parseUrlParam:function(a){var c,d=[],b;for(c in a){if(a[c]!==undefined&&a[c]!==""&&a[c]!="undefined"&&a.hasOwnProperty(c)){d[d.length]=c+"="+encodeURIComponent(a[c])}}b=d.join("&");return b},webim:(function(){var d;var b=[],f=BDBridge.BD_BRIDGE_DATA;var j=function(u){var z=b.length,r=u.groupid,p=u.groupname,B=u.chat,n=u.subid,C=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.bid),E={},t=u.subname,w=BDBridge.BD_BRIDGE_WEBIM.webimopentype;while(z--){b[0]();b.shift()}if(B){BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.chat,B)}var D=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.instance);var l=(new Date()).getTime();if(D==null||l-D>=1000){if(r==undefined){u.groupid="";u.groupname="";r=""}f.tid=r;f.subid="";if(n!==""&&n!==undefined){f.type=0;f.subid=n;f.subname=t}else{f.type=1;f.subid="";f.subname="";u.subid="";u.subname=""}u.groupid=""+u.groupid;u.subid=""+u.subid;BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.startload,(new Date()).getTime().toString());BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.data,f);var A=BDBridge.Lib.ls.read(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.prevInfo)||"{}";A=BDBridge.Lib.json.parse(A);var y=A.ls||"";if(BDBridge.Lib.mobile){u.type=f.type;if((u.type==1)&&(r===""||r===undefined)){u.type=3}c(u,C)}else{if(!w){u.ref=window.location.href;var s="siteid="+f.siteid+"&ucid="+f.ucid+"&lastsubid="+y+"&from="+encodeURIComponent(f.from)+"&bid="+C+"&"+BDBridge.Lib.parseUrlParam(u);var o=(window.screen.availWidth-796)/2;var x=(window.screen.availHeight-562)/2;var v="left="+o+",top="+x+",resizable=yes,width=795,height=561";var k=window.open("http://webim.qiao.baidu.com/im/index?"+s,"BrIdgeIMWinDow",v);k.focus()}else{var m={type:f.type,chattype:u.chattype,tid:u.groupid,subid:u.subid,groupname:u.groupname,from:f.from,lastsubid:y,siteid:f.siteid,ucid:f.ucid};BDBridge.webimlite.chat(m)}}}else{if(!w){BDBridge.Lib.ls.write(BDBridge.Lib.lsId,BDBridge.Lib.lsKey.show,1)}else{BDBridge.webimlite.show()}}};var a=function(m,l){var k="http://webim.qiao.baidu.com/im/gateway?siteid="+f.siteid+"&ucid="+f.ucid+"&siteidstr="+f.SITE_ID+"&mainid="+f.mainid+"&csNameType=2&csName="+encodeURIComponent("在线客服")+"&userName="+encodeURIComponent(f.userName)+"&groupName="+encodeURIComponent(m.groupname)+"&groupid="+m.groupid+"&sub="+m.subid+"&distributeType="+m.type+"&bid="+l;window.open(k,"BridgeImWindow")};function c(l,k){if(l.groupid===""){l.groupid=h.option.tid;l.groupname=h.option.groupname}a(l,k)}var h=function(k){if(k.status==0){h.option={tid:k.groupid,groupname:k.groupname}}};var e=function(l,k){if(k){b.push(k)}j(l)};return d={accept:e,handleVisDistribute:h}})(),localstorage:(function(){var c;var d={swf:function(){return b()},html:function(){}};var a="swf";var b=function(){BDBridge.Lib.ls.onLoadInit=function(){var f=BDBridge.Lib.ls_callback_list.length;while(f--){BDBridge.Lib.ls_callback_list[0]();BDBridge.Lib.ls_callback_list.shift()}};var e=BDBridge.Lib.G("BDBridgeLS");e.style.width="1px";e.style.height="1px";e.style.fontSize="0px";e.style.lineHeight="0px";BDBridge.Lib.ls.load({id:"BDBridgeSwf",width:2,height:2,url:"http://webim.qiao.baidu.com/f/pool/swf/local_storage.swf",wmode:"transparent",allowscriptaccess:"always"},"BDBridgeLS");BDBridge.Lib.G("BDBridgeLS").style.background="#fff"};return c={createLs:function(){return d[a]()}}})(),swf:{version:"11.1.102.0",createHTML:function(e){e=e||{};var o=BDBridge.Lib.swf.version,f=1;var r=e.ver||"6.0.0",s,b;if(o){o=o.split(".");r=r.split(".");for(var a=0;a<3;a++){s=parseInt(o[a],10);b=parseInt(r[a],10);if(b<s){break}else{if(b>s){f=0;break}}}}else{f=0}if(!f){return""}var m=e.vars;var a,c,p,h;var n=["classid","codebase","id","width","height","align"];e.align=e.align||"middle";e.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";e.codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0";e.movie=e.url||"";delete e.vars;delete e.url;if(BDBridge.Lib.isString(m)){e.flashvars=m}else{var k=[];for(c in m){h=m[c];if(h){k.push(c+"="+encodeURIComponent(h))}}e.flashvars=k.join("&")}var l=["<object "];for(a=0,p=n.length;a<p;a++){h=n[a];l.push(" "+h+'="'+e[h]+'"')}l.push(">");var d={wmode:1,scale:1,quality:1,play:1,loop:1,menu:1,salign:1,bgcolor:1,base:1,allowscriptaccess:1,allownetworking:1,allowfullscreen:1,seamlesstabbing:1,devicefont:1,swliveconnect:1,flashvars:1,movie:1};for(c in e){h=e[c];if(d[c]&&h){l.push('<param name="'+c+'" value="'+h+'" />')}}e.src=e.movie;e.name=e.id;delete e.id;delete e.movie;delete e.classid;delete e.codebase;e.type="application/x-shockwave-flash";e.pluginspage="http://www.macromedia.com/go/getflashplayer";l.push("<embed");var j;for(c in e){h=e[c];if(h){if((new RegExp("^salign\x24","i")).test(c)){j=h;continue}l.push(" "+c+'="'+h+'"')}}if(j){l.push(' salign="'+j+'"')}l.push("></embed></object>");return l.join("")},create:function(a,b){a=a||{};var d=BDBridge.Lib.swf.createHTML(a);var c=true;if(b&&BDBridge.Lib.isString(b)){b=document.getElementById(b)}if(d.length<=0){d=a.errorMessage||"";c=false}if(b){b.innerHTML=d}else{document.write(d)}return c},getMovie:function(a){return document[a]||window[a]}},each:function(e,c){var b,a,d;if("function"==typeof c){for(a in e){if(e.hasOwnProperty(a)){d=e[a];b=c.call(e,d,a);if(b===false){break}}}}return e},trim:function(b){var a=new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)","g");return b.replace(a,"")},G:function(a){if(!a){return null}if("string"==typeof a||a instanceof String){return document.getElementById(a)}else{if(a.nodeName&&(a.nodeType==1||a.nodeType==9)){return a}}return null},Q:function(j,e,b){var k=[],d=BDBridge.Lib.trim,h,f,a,c;if(!(j=d(j))){return k}if("undefined"==typeof e){e=document}else{e=BDBridge.Lib.G(e);if(!e){return k}}b&&(b=d(b).toUpperCase());if(e.getElementsByClassName){a=e.getElementsByClassName(j);h=a.length;for(f=0;f<h;f++){c=a[f];if(b&&c.tagName!=b){continue}k[k.length]=c}}else{j=new RegExp("(^|\\s)"+BDBridge.Lib.string.escapeReg(j)+"(\\s|\x24)");a=b?e.getElementsByTagName(b):(e.all||e.getElementsByTagName("*"));h=a.length;for(f=0;f<h;f++){c=a[f];j.test(c.className)&&(k[k.length]=c)}}return k},addClass:function(f,h){f=BDBridge.Lib.G(f);if(!f){return}var b=h.split(/\s+/),a=f.className,e=" "+a+" ",d=0,c=b.length;for(;d<c;d++){if(e.indexOf(" "+b[d]+" ")<0){a+=(a?" ":"")+b[d]}}f.className=a;return f},removeClass:function(f,h){f=BDBridge.Lib.G(f);if(!f){return}var d=f.className.split(/\s+/),k=h.split(/\s+/),b,a=k.length,c,e=0;for(;e<a;++e){for(c=0,b=d.length;c<b;++c){if(d[c]==k[e]){d.splice(c,1);break}}}f.className=d.join(" ");return f},loadScript:function(d,b){var c=document.getElementsByTagName("head")[0];if(BDBridge.Lib.G(d)){BDBridge.Lib.G(d).parentNode.removeChild(BDBridge.Lib.G(d))}var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("language","javascript");a.setAttribute("id",d);a.setAttribute("src",b);a.setAttribute("charset","UTF-8");c.appendChild(a)},imgRequest:function(c,d){var b=new Image();var a="_LOG_WEB_"+(new Date().getTime())+"_";window[a]=b;b.onload=b.onerror=function(){window[a]=null};b.src=c+d;b=null},createIframe:function(d,a,c){var b=document.createElement(BDBridge.Lib.ie&&BDBridge.Lib.ie[1]<9?'<iframe name="'+a+'">':"iframe");b.setAttribute("id",d);b.setAttribute("name",a);b.style.cssText=c;b.setAttribute("src","#");b.setAttribute("style",c);document.body.appendChild(b);return b},createForm:function(h,f,b,c,d,e){var a=document.createElement("form");a.setAttribute("id",h);a.setAttribute("method",f);a.setAttribute("action",b);a.setAttribute("target",c);if(e){a.setAttribute("accept-charset",e)}if(d==false||d=="hidden"){a.style.display="none"}document.body.appendChild(a);return a},loadCss:function(a){var b=document.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("type","text/css");b.setAttribute("href",a);document.getElementsByTagName("head")[0].appendChild(b)},getRandom:function(b,a){return Math.floor(Math.random()*(a-b)+b)},bind:function(b,a,c){if(window.addEventListener){b.addEventListener(a,c,false)}else{b.attachEvent("on"+a,c)}},stopDefault:function(a){var a=a||window.event;if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}},domReady:(function(){var f=false,e=[],b;if(document.addEventListener){b=function(){document.removeEventListener("DOMContentLoaded",b,false);c()}}else{if(document.attachEvent){b=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",b);c()}}}}var c=function(){if(!c.isReady){c.isReady=true;for(var k=0,h=e.length;k<h;k++){e[k]()}}};var a=function(){try{document.documentElement.doScroll("left")}catch(h){setTimeout(a,1);return}c()};function d(){if(f){return}f=true;if(document.readyState==="complete"){c.isReady=true}else{if(document.addEventListener){document.addEventListener("DOMContentLoaded",b,false);window.addEventListener("load",c,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",c);var h=false;try{h=window.frameElement==null}catch(j){}if(document.documentElement.doScroll&&h){a()}}}}}d();return function(h){c.isReady?h():e.push(h)}})()};BDBridge.Lib.define("BDBridge.Lib.json",function(b){var c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(h){if(/["\\\x00-\x1f]/.test(h)){h=h.replace(/["\\\x00-\x1f]/g,function(j){var k=c[j];if(k){return k}k=j.charCodeAt();return"\\u00"+Math.floor(k/16).toString(16)+(k%16).toString(16)})}return'"'+h+'"'}function e(o){var j=["["],k=o.length,h,m,n;for(m=0;m<k;m++){n=o[m];switch(typeof n){case"undefined":case"function":case"unknown":break;default:if(h){j.push(",")}j.push(b.stringify(n));h=1}}j.push("]");return j.join("")}function d(h){return h<10?"0"+h:h}function f(h){return'"'+h.getFullYear()+"-"+d(h.getMonth()+1)+"-"+d(h.getDate())+"T"+d(h.getHours())+":"+d(h.getMinutes())+":"+d(h.getSeconds())+'"'}b.parse=function(h){return(new Function("return ("+h+")"))()};b.stringify=function(n){switch(typeof n){case"undefined":return"undefined";case"number":return isFinite(n)?String(n):"null";case"string":return a(n);case"boolean":return String(n);default:if(n===null){return"null"}else{if(n instanceof Array){return e(n)}else{if(n instanceof Date){return f(n)}else{var j=["{"],m=BDBridge.Lib.json.stringify,h,l;for(var k in n){if(Object.prototype.hasOwnProperty.call(n,k)){l=n[k];switch(typeof l){case"undefined":case"unknown":case"function":break;default:if(h){j.push(",")}h=1;j.push(m(k)+":"+m(l))}}}j.push("}");return j.join("")}}}}}});if(window.bd_bridge_show_hidden!=="hidden"){BDBridge.Lib.init()};