function SpringStreams(N){this.version="20101006";var Y=".wemfbox.ch/j0=";var B=200;var K=2000;var U="default";var G=new Array();this.syncrate=20;this.pausesync=6;this.maxstates=50;if(N){U=N}F();function S(f,d,c){if(!f){return }var e=new E(this,f,d,c);G.push(e);return e}this.track=S;function F(){setInterval(O,B);setInterval(I,K)}function T(){for(var c=0;c<G.length;++c){try{G[c].stop()}catch(d){X(d)}}}this.unload=T;function O(f){for(var c=0;c<G.length;++c){try{G[c].update(f)}catch(d){X(d)}}}this.doUpdate=O;function I(f){for(var c=0;c<G.length;++c){try{G[c].sync(f)}catch(d){X(d)}}}this.doSync=I;function X(c){H("",c)}this.error=X;function J(d,c){return a([[d,c]])}function D(c){if(c&&c.site!=undefined){return c.site}return U}function P(c){}this.debug=P;function W(){if("https"==document.location.href.slice(0,5)){return"https://ssl-"}return"http://"}function H(e,d){var c=W()+D(d)+Y+J(e,d);(new Image()).src=c;this.debug(c)}this.send=H;function a(h){var f;var j;var g;var e;var n=/[+&,;=~]/g;var o;var c;switch(typeof h){case"string":return n.test(h)?escape(h).replace(n,function(d){var i=c[d];if(i){return i}return d}):escape(h);case"number":return isFinite(h)?h.toString():"null";case"boolean":case"null":return h.toString();case"object":if(!h){return"null"}f=[];if(typeof h.length=="number"&&!(h.propertyIsEnumerable("length"))){e=h.length;for(j=0;j<e;j+=1){f.push(a(h[j])||"null")}return","+f.join("+")+";"}for(g in h){if(typeof g=="string"){if(g!="site"){o=a(h[g]);if(o){f.push(a(g)+"="+o)}}}}return","+f.join("+")+";"}return""}function E(w,t,x,s){var q=Math.round((Math.random()*10000000000)).toString(36);var f=Math.round(new Date().getTime()/1000);var m;var y;var o;var k;var g=[0,0,f.toString(36)];var h=0;var z=0;var i=true;var d=false;var p;m=w;y=t;if(s){p=s}else{p=m.WMStreamAdapter}k=r(x);o=new Array();o.push(g);function r(AA){var c=new Object();for(var n in AA){c[n]=AA[n]}return c}function v(c){if(o.length<m.maxstates){o.push(c)}}function e(c){g=[c,c,Math.round(new Date().getTime()/1000).toString(36)];v(g);i=true;h=0}function j(AB){if(d){return }var c=g[1];var n=c;try{n=Math.round(p.getPosition(y));if(!n){n=c}}catch(AC){}try{if(c==n){if(h>=0){h++;if(h==m.pausesync){i=true}}return }if(h>=m.pausesync){e(n)}else{if(c<n-1){e(n)}else{if(c>n){e(n)}else{g[1]=n;if(g[1]-g[0]>=m.syncrate){if(n-z>=m.syncrate){i=true}}h=0}}}}catch(AA){X=true;m.error(AA)}}this.update=j;function u(){if(d){return }i=true;d=true;l(null)}this.stop=u;function l(AA){if(i){try{if(y.width){k.sx=y.width}if(y.height){k.sy=y.height}}catch(n){}k.uid=q;k.pst=o;var c;try{if(!k.dur||k.dur==0){k.dur=p.getDuration(y)}}catch(n){}try{c=p.getMeta(y)}catch(n){}k.vt=(Math.round(new Date().getTime()/1000))-f;m.send(c,k);z=g[1]}i=false}this.sync=l}this.DefaultAdapter={getMeta:b,getPosition:Z,getDuration:V};this.WMStreamAdapter={getMeta:M,getPosition:A,getDuration:L};this.RVStreamAdapter={getMeta:R,getPosition:C,getDuration:Q};function b(c){return{pl:"DEF",pv:version,sx:screen.width,sy:screen.height}}function Z(c){return new Date().getTime()/1000}function V(c){return 0}function M(c){return{pl:"MSWM",plv:c.versionInfo,sx:screen.width,sy:screen.height}}function A(c){if(c.CurrentPosition){return c.CurrentPosition}if(c.currentPosition){return c.currentPosition}if(c.controls){if(c.controls.currentPosition){return c.controls.currentPosition}}if(c.Controls){if(c.Controls.currentPosition){return c.Controls.currentPosition}}return 0}function L(c){if(c.currentMedia){if(c.currentMedia.Duration){return c.currentMedia.Duration}if(c.currentMedia.duration){return c.currentMedia.duration}}else{if(c.CurrentMedia){if(c.CurrentMedia.duration){return c.CurrentMedia.duration}if(c.CurrentMedia.Duration){return c.CurrentMedia.Duration}}}}function R(c){return{pl:"RV",plv:c.GetVersionInfo(),sx:screen.width,sy:screen.height}}function C(c){return(c.GetPosition()/1000)}function Q(c){return(c.GetLength()/1000)}};
