var _mws={srcs:[],page_id:"",id:"-.-AD-.-"};var _mwstmp="";send_url="http://xtrack.tomonline-inc.com/";var _script_ver="0008";_mwsmain.getc=function(D){var B=document.cookie.split("; ");for(var A=0;A<B.length;A++){var C=B[A].split("=");if(C[0]==D){return C[1]}}return""};function _mwsmain(S,O){var N=O;var X="!";var Y=1800;var F=0;var D={};var Q="";var K=0;var R=function(){if(F){return false}if(K==1){return }K=1;var d;try{d=M()}catch(f){d=send_url+"?&error="+escape(f)}var c=document.createElement("img");c.style.display="none";c.src=d;c.onload=function(){};_mwstmp=_mws.srcs;_mws.srcs=[]};function M(){var c=url=P="";for(P in D){if(D[P]==""){continue}c+=(P+"="+encodeURIComponent(D[P])+"&")}if(send_url.indexOf("?")!=-1){url=send_url+"&"+c+"group_id=mind_works"}else{url=send_url+"?"+c+"group_id=mind_works"}return url}function A(i){var c="!";var o=["client_key","all_pv","users","start_time","user_stay_time","last_time","current_pv","user_fouse_time","user_fouse_count","last_close_page","ad","adt","src","srct"];var h={};var j=[];for(W=0;W<o.length;W++){h[o[W]]=W;j[W]=""}function p(r){var q=r.lastIndexOf(c);var k=r.substr(0,q);j=k.split(c);return 1}function e(){var k="";for(W=0;W<o.length;W++){if(undefined==j[W]||"undefined"==j[W]){j[W]=""}k=k+j[W]+c}return k}function d(k,q){if(isNaN(h[k])){return }j[h[k]]=q;n();return q}function l(k){d(k,0)}function g(k){if(isNaN(h[k])){return""}return j[h[k]]}function n(){document.cookie=i+"="+e()+";expires="+(new Date((new Date()).valueOf()+86400000000)).toGMTString()+";path=/;domain="+function(){var k=document.domain.split(".");if(k.length>=2){return k[k.length-2]+"."+k[k.length-1]}else{return document.domain}}()}if(i&&i.length>0){p(_mwsmain.getc(i))}function m(){return o.length}function f(k){return o[k]}this.len=m;this.k=f;this.clear=l;this.getValue=g;this.setValue=d;this.getStr=e}function Z(){return parseInt((new Date()).getTime()/1000)}function E(c){c=parseInt(c);if(isNaN(c)){return 0}return c}function L(){var c=W="",d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(;W<9;W++){c+=d.charAt(parseInt(Math.random()*62))}return c}function b(h){var e=document.cookie;var d=e.split(";");var c=new Array();for(var g=0;g<d.length;g++){var f=d[g].split("=");c[f[0]]=f[1]}return(h!="")?c[" "+h]:c}if(S==""){F=1;return false}else{D["id"]=S}var a=_mwsmain.c=new A("ad_"+D["id"]);if(!a.getValue("client_key")){a.setValue("client_key",L())}if(N["send"]){send_url=N["send"];delete N["send"]}var I="";D["v"]=_script_ver;D["url"]="http://null.html";D["z"]=0-(new Date()).getTimezoneOffset()/60;D["rf"]="http://null.html";var T="!";D["sc"]=(window.screenLeft!==undefined?window.screenLeft:window.screenX)+T+(window.screenTop!==undefined?window.screenTop:window.screenY)+T+screen.width+T+screen.height+T+screen.colorDepth+T+screen.availWidth+T+screen.availHeight;D["ct"]=Z();all_pv=E(a.getValue("all_pv"));if(isNaN(all_pv)){all_pv=0}a.setValue("all_pv",1+all_pv);if(Z()-E(a.getValue("last_time"))-E(a.getValue("start_time"))>Y){a.setValue("users",E(a.getValue("users"))+1);N["exit_page"]="null";var U=["user_stay_time","last_time","current_pv","user_fouse_time","user_fouse_count","last_close_page"];for(var P in U){a.setValue(U[P],"")}}function J(d){var c=d;if(window.navigator.userAgent.indexOf("MSIE")>-1&&c.indexOf("%")==-1){c=encodeURIComponent(c)}return c}function V(c){N["isenter"]=1;if(a.getValue("ad")!=c){a.setValue("srct",Z());a.setValue("ad",c)}}if(E(a.getValue("start_time"))==0){a.setValue("start_time",Z())}if(location.toString().match(new RegExp("srcid=([^!:|&]+)","img"))){N["lastsrc"]=J(RegExp.$1);a.setValue("src",N["lastsrc"])}var C=location.toString(),B=document.referrer;if(C.match(new RegExp("mws_adid=([^!:|&]+)","img"))){ad=J(RegExp.$1);N["lastad"]=ad;V(ad)}if(undefined!=N["srcs"]&&""!=N["srcs"]){N["srcs"]=N["srcs"].join(".")}else{if(undefined!=_mwstmp&&""!=_mwstmp){N["srcs"]=_mwstmp}else{N["srcs"]=""}}a.setValue("last_time",Z()-E(a.getValue("start_time")));a.setValue("current_pv",1+E(a.getValue("current_pv")));var H=Z()-a.getValue("srct");a.setValue("adt",H);D["c"]=a.getStr();if(document.cookie==""){D["c"]=""}var P=this.constructor.toString();for(var W in N){if("id"!=W&&W!="send"){I=I+W+":"+N[W]+X}}D["ext"]=I;D["log"]=Q;D["uid"]=N.uid?N.uid:"";D["counter"]=N.counter?N.counter:"";var G={lock:0,lock2:0,t:0,h:0,start:0,time:0};G.onblur=function(){if(G.lock2){return }G.lock2=1;G.t++;(window.clearInterval(G.h));G.h=0;G.lock2=0};G.ti=function(){G.time=G.time+Z()-G.start;G.start=Z()};G.focus=function(){if(G.h>0){return }if(G.lock==1){return }G.lock=1;G.start=Z();G.h=window.setInterval(G.ti,1000);G.lock=0};G.unload=function(){_mwsmain.c.setValue("last_close_page","null");_mwsmain.c.setValue("user_fouse_time",G.time);_mwsmain.c.setValue("user_fouse_count",G.t);_mwsmain.c.setValue("user_stay_time",Z()-_mwsmain.c.getValue("start_time")-_mwsmain.c.getValue("last_time"))};if(window.addEventListener){window.addEventListener("focus",G.focus,false);window.addEventListener("blur",G.onblur,false);window.addEventListener("unload",G.unload,false)}else{window.attachEvent("onfocus",G.focus,false);window.attachEvent("onblur",G.onblur,false);window.attachEvent("onunload",G.unload,false)}this.newid=L;this.run=R}function _mwsInit(B){try{var A=new _mwsmain(B.id,B);A.run()}catch(C){}}