var f={};onmessage=function(e){var d=e.data,i=d.i,t=d.hasOwnProperty('t')?d.t:0;switch(d.n){case'a':f[i]=setInterval(function(){postMessage({i:i});},t);break;case'b':clearInterval(f[i]);delete f[i];break;case'c':f[i]=setTimeout(function(){postMessage({i:i});},t);break;case'd':clearTimeout(f[i]);delete f[i];break;}}