var domWrite=(function(){var dw=document.write,myCalls=[],t="";function startnext(){if(myCalls.length>0){myCalls[0].startCall()}}function evals(pCall){var scripts=[],script,regexp=/<script[^>]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(pCall.buf))){scripts.push(script[1])}scripts=scripts.join("\n");if(scripts){eval(scripts)}}function finishCall(pCall){pCall.e.innerHTML=pCall.buf;evals(pCall);document.write=dw;myCalls.shift();window.setTimeout(startnext,5)}function testDone(pCall){var myCall=pCall;return function(){if(myCall.buf!==myCall.oldbuf){myCall.oldbuf=myCall.buf;t=window.setTimeout(testDone(myCall),myCall.ms)}else{finishCall(myCall)}}}function MyCall(pDiv,pSrc,pFunc){this.e=(typeof pDiv=="string"?document.getElementById(pDiv):pDiv),this.f=pFunc||function(){},this.stat=0,this.src=pSrc,this.buf="",this.oldbuf="",this.ms=10,this.scripttag}MyCall.prototype={startCall:function(){this.f.apply(window);this.stat=1;var that=this;document.write=(function(){var o=that,cb=testDone(o),t;return function(pString){window.clearTimeout(t);o.stat=2;window.clearTimeout(t);o.oldbuf=o.buf;o.buf+=pString;t=window.setTimeout(cb,o.ms)}})();var s=document.createElement("script");s.setAttribute("language","javascript");s.setAttribute("type","text/javascript");s.setAttribute("src",this.src);document.getElementsByTagName("head")[0].appendChild(s)}};return function(pDiv,pSrc,pFunc){var c=new MyCall(pDiv,pSrc,pFunc);myCalls.push(c);if(myCalls.length===1){startnext()}}})();
