function QUWebRequest(){this.m_id="";this.m_scriptObj=null;this.m_fullUrl="";this.m_timeExpire=0;this.m_pfOnTimeOut=null}QUWebRequest.ReqestNextID=0;QUWebRequest.PendingReqestArray=new Array();QUWebRequest.prototype.Send=function(){var a=document.createElement("script");this.m_scriptObj=a;QUWebRequest.PendingReqestArray[QUWebRequest.PendingReqestArray.length]=this;a.setAttribute("type","text/javascript");a.setAttribute("charset","utf-8");a.setAttribute("src",this.m_fullUrl);document.getElementsByTagName("head").item(0).appendChild(a)};QUWebRequest.prototype.Dispose=function(){if(this.m_scriptObj!=null){document.getElementsByTagName("head").item(0).removeChild(this.m_scriptObj);this.m_scriptObj=null;for(i=0;i<QUWebRequest.PendingReqestArray.length;i++){if(this==QUWebRequest.PendingReqestArray[i]){QUWebRequest.PendingReqestArray[i]=QUWebRequest.PendingReqestArray[QUWebRequest.PendingReqestArray.length-1];QUWebRequest.PendingReqestArray.length-=1;break}}}};QUWebRequest.CreateRequest=function(){var a=new QUWebRequest();a.m_id=""+QUWebRequest.ReqestNextID;QUWebRequest.ReqestNextID++;return a};QUWebRequest.TimeCheck=function(c){var a;for(a=0;a<QUWebRequest.PendingReqestArray.length;a++){var b=QUWebRequest.PendingReqestArray[a];if((b.m_timeExpire!=0)&&(c>b.m_timeExpire)&&(b.m_pfOnTimeOut!=null)){b.m_pfOnTimeOut(b)}}};QUWebRequest.FindRequestById=function(c){var a;for(a=0;a<QUWebRequest.PendingReqestArray.length;a++){var b=QUWebRequest.PendingReqestArray[a];if(b.m_id==c){return b}}return null};function QUSZTickId(c,b,a){this.m_tickIdType=c;this.m_tickId1=b.toUpperCase();if(a!=null){this.m_tickId2=a.toUpperCase()}else{this.m_tickId2=null}}QUSZTickId.isEqual=function(c,b){var a=false;do{if(c.m_tickIdType!=b.m_tickIdType){break}if(c.m_tickId1!=b.m_tickId1){break}if(c.m_tickId2==b.m_tickId2){a=true;break}}while(0);return a};function QUSZSecurityRecord(){this.m_tick="";this.m_exchange="";this.m_region="";this.m_Pid="";this.m_lastPrice=0;this.m_volume=0;this.m_open=0;this.m_yestClose=0;this.m_dayHigh=0;this.m_dayLow=0;this.m_52WeekHigh=0;this.m_52WeekLow=0;this.m_Currency="";this.m_MarketPhase="U";this.m_TradeTime="";this.m_ExtHourPrice=0;this.m_MidPrice=0;this.m_MidHigh=0;this.m_MidLow=0;this.m_BuyVol=0;this.m_SellVol=0;this.m_ActivityTime="";this.m_Timezone="";this.m_Bid="";this.m_Ask="";this.m_securityType="";this.m_state=0;this.m_lastRefreshTime=0;this.m_queryStr="";this.m_queryArray=new Array()}QUSZSecurityRecord.prototype.UpdatePriceInfo=function(a,c){this.m_lastPrice=a.m_lastPrice;this.m_lastPrice=a.m_lastPrice;this.m_volume=a.m_volume;this.m_open=a.m_open;this.m_yestClose=a.m_yestClose;this.m_dayHigh=a.m_dayHigh;this.m_dayLow=a.m_dayLow;this.m_52WeekHigh=a.m_52WeekHigh;this.m_52WeekLow=a.m_52WeekLow;this.m_Currency=a.m_Currency;this.m_MarketPhase=a.m_MarketPhase;this.m_TradeTime=a.m_TradeTime;this.m_ExtHourPrice=a.m_ExtHourPrice;this.m_MidPrice=a.m_MidPrice;this.m_MidHigh=a.m_MidHigh;this.m_MidLow=a.m_MidLow;this.m_BuyVol=a.m_BuyVol;this.m_SellVol=a.m_SellVol;this.m_ActivityTime=a.m_ActivityTime;this.m_Timezone=a.m_Timezone;this.m_Bid=a.m_Bid;this.m_Ask=a.m_Ask;this.m_securityType=a.m_securityType;this.m_lastRefreshTime=c;for(var b=0;b<this.m_queryArray.length;b++){this.m_queryArray[b].m_pCbObj.m_lastSecurityRefreshTime=c}};QUSZSecurityRecord.prototype.isMatchTickId=function(b){var a=false;if(b.m_tickIdType==QU.TICKIDTYPE_PID){if(this.m_Pid==b.m_tickId1){a=true}}else{if(b.m_tickIdType==QU.TICKIDTYPE_TICKANDEXCHANGE){if((this.m_tick==b.m_tickId1)&&(this.m_exchange==b.m_tickId2)){a=true}}else{if((this.m_tick==b.m_tickId1)&&(this.m_region==b.m_tickId2)){a=true}}}return a};function QUSZCBObj(b,a){this.m_pfCallBack=b;this.m_pvContext=a;this.m_tickQueryArray=new Array();this.m_havePendingTickQuery=0;this.m_needRefreshCb=0;this.m_lastSecurityRefreshTime=0}function QUSZTickPendingReq(a){this.m_queryId=new QUSZTickId(a.m_tickIdType,a.m_tickId1,a.m_tickId2);this.m_state=0;this.m_failReqCount=0;this.m_TickQueryArray=new Array();this.m_queryStr=""}function QUSZTickQuery(b,a){this.m_queryId=new QUSZTickId(b.m_tickIdType,b.m_tickId1,b.m_tickId2);this.m_pCbObj=a;this.m_state=1;this.m_errorNum=0;this.m_puSecurity=null}QUSZTickQuery.prototype.getErrorNum=function(){if((this.m_state==0)||(this.m_state==1)){return -1}return this.m_errorNum};QUSZTickQuery.prototype.getTickId=function(){return this.m_queryId};QUSZTickQuery.prototype.getSecurityRecord=function(){if(this.m_state==1){return null}return this.m_puSecurity};QUSZTickQuery.prototype.isPriceInfoReady=function(b){if(this.m_state==1){return false}if(this.m_state==2){var a=this.m_puSecurity;if(a.m_state==1){return false}}return true};function QU(){this.m_running=0;this.m_cbObjArray=new Array();this.m_TickPendingReqArray=new Array();this.m_securityArray=new Array();this.m_lastRefreshTime=0;this.m_securityRefreshIntervalBase=5*1000;this.m_IntervalStockOpen=this.m_securityRefreshIntervalBase*1;this.m_IntervalStockClose=this.m_securityRefreshIntervalBase*12;this.m_IntervalFundOpen=this.m_securityRefreshIntervalBase*12;this.m_IntervalFundClose=this.m_securityRefreshIntervalBase*60;this.m_isStatusPAUClose=0;this.m_webServiceSecurityMaxLimit=50;this.m_webServerUrl="http://quote.morningstar.com/quoteservice/sq.ashx?"}QU.TICKIDTYPE_TICKANDEXCHANGE=1;QU.TICKIDTYPE_PID=2;QU.TICKIDTYPE_TICKANDREGION=3;QU.prototype.ProcessHttpResponseForTick=function(m,f,l){var h,g,a,b,c,k;var d=new Date().getTime();for(h=0;h<f.length;h++){c=f[h];if(c.m_state!=1){continue}if(0==m){var o=0;var n=c.m_queryId;for(g=0;g<l.length;g++){b=l[g];var e;if(c.m_queryStr.toUpperCase()==b.m_queryStr.toUpperCase()){o=1;break}}if(0==o){c.m_state=-2;for(g=0;g<c.m_TickQueryArray.length;g++){k=c.m_TickQueryArray[g];k.m_state=-1;k.m_errorNum=-3;k.m_puSecurity=null}}else{c.m_state=2;for(g=0;g<this.m_securityArray.length;g++){if((this.m_securityArray[g].m_tick==b.m_tick)&&(this.m_securityArray[g].m_exchange==b.m_exchange)){a=this.m_securityArray[g];break}}if(g==this.m_securityArray.length){a=new QUSZSecurityRecord();a.m_tick=b.m_tick;a.m_exchange=b.m_exchange;a.m_region=b.m_region;a.m_Pid=b.m_Pid;a.m_state=2;this.m_securityArray[this.m_securityArray.length]=a}for(g=0;g<c.m_TickQueryArray.length;g++){k=c.m_TickQueryArray[g];k.m_state=2;k.m_puSecurity=a;a.m_queryArray[a.m_queryArray.length]=k}a.UpdatePriceInfo(b,d)}}else{if(-1==m){c.m_failReqCount++;if(c.m_failReqCount>=3){c.m_state=-1;for(g=0;g<c.m_TickQueryArray.length;g++){k=c.m_TickQueryArray[g];k.m_state=-1;k.m_errorNum=-2;k.m_puSecurity=null}}else{c.m_state=0}}else{c.m_state=-2;for(g=0;g<c.m_TickQueryArray.length;g++){k=c.m_TickQueryArray[g];k.m_state=-1;k.m_errorNum=-1;k.m_puSecurity=null}}}if(c.m_state!=0){for(g=0;g<this.m_TickPendingReqArray.length;g++){if(c==this.m_TickPendingReqArray[g]){this.m_TickPendingReqArray[g]=this.m_TickPendingReqArray[this.m_TickPendingReqArray.length-1];this.m_TickPendingReqArray.length-=1;break}}}}};QU.prototype.ProcessHttpResponseForSecuritys=function(g,k,f){var e,d,h;var a,b,c;if(0==g){c=new Date().getTime();for(e=k.length-1;e>=0;e--){a=k[e];if(a.m_state!=1){continue}h=0;for(d=f.length-1;d>=0;d--){b=f[d];if((a.m_tick.toUpperCase()==b.m_tick.toUpperCase())&&(a.m_exchange.toUpperCase()==b.m_exchange.toUpperCase())){h=1;break}}if(0==h){a.m_state=-1}else{a.m_state=2;a.UpdatePriceInfo(b,c);if(d!=f.length-1){f[d]=f[f.length-1]}f.length-=1}}}else{for(e=0;e<k.length;e++){a=k[e];if(a.m_state!=1){continue}a.m_state=-2}}};QU.prototype.ProcessRequestCbEvent=function(d,e){var c=0;var a=null;if(e==0){try{a=QU.ParseSimpleQuoteResult(d.e_jsonObject.Results)}catch(b){c=-2}}else{c=-1}if(d.e_type==1){this.ProcessHttpResponseForTick(c,d.e_pvContext,a)}else{this.ProcessHttpResponseForSecuritys(c,d.e_pvContext,a)}};QU.ParseSimpleQuoteResult=function(e){var d=0;var c=new Array();var f,b,a,g;for(d=0;d<e.length;d++){f=e[d];b=f.split("|");a=new QUSZSecurityRecord();a.m_tick=b[0];a.m_exchange=b[1];a.m_region=b[2];a.m_lastPrice=parseFloat(b[4]);a.m_volume=parseFloat(b[5]);a.m_open=parseFloat(b[6]);a.m_yestClose=parseFloat(b[7]);a.m_dayHigh=parseFloat(b[8]);a.m_dayLow=parseFloat(b[9]);a.m_52WeekHigh=parseFloat(b[10]);a.m_52WeekLow=parseFloat(b[11]);a.m_Currency=b[12];a.m_MarketPhase=b[13];a.m_queryStr=b[14];a.m_TradeTime=b[15];a.m_ExtHourPrice=parseFloat(b[16]);g=b[17].split(",");a.m_MidPrice=parseFloat(g[0]);a.m_MidHigh=parseFloat(g[1]);a.m_MidLow=parseFloat(g[2]);g=b[18].split(",");a.m_BuyVol=parseInt(g[0]);a.m_SellVol=parseInt(g[1]);a.m_ActivityTime=b[19];a.m_Timezone=b[20];g=b[21].split(",");a.m_Bid=g[0];a.m_Ask=g[1];a.m_securityType=b[22];c[c.length]=a}return c};QU.ProcessTimeOut=function(a){a.Dispose();a.e_pqu.ProcessRequestCbEvent(a,-1)};QU.ProcessResponse=function(b){try{var d=b.JsonID;var c=QUWebRequest.FindRequestById(d);c.e_jsonObject=b;c.Dispose();c.e_pqu.ProcessRequestCbEvent(c,0)}catch(a){}};QU.prototype.SendRequest=function(c,b,a){var d=QUWebRequest.CreateRequest();d.e_pqu=this;d.e_type=c;d.e_pvContext=a;d.e_jsonObject=null;d.m_fullUrl=b+"&jid="+d.m_id+"&cb=QU.ProcessResponse";d.m_timeExpire=new Date().getTime()+4*1000;d.m_pfOnTimeOut=QU.ProcessTimeOut;d.Send()};QU.prototype.TimeCheckSendTickPendingReqs=function(){var h,f;var q=new Array();var o=new Array();var p=new Array();var k;if(this.m_TickPendingReqArray.length==0){return}for(h=0;h<this.m_TickPendingReqArray.length;h++){pTickPendingReq=this.m_TickPendingReqArray[h];if(0==pTickPendingReq.m_state){szTickId=pTickPendingReq.m_queryId;if(szTickId.m_tickIdType==QU.TICKIDTYPE_TICKANDREGION){q[q.length]=pTickPendingReq}else{if(szTickId.m_tickIdType==QU.TICKIDTYPE_TICKANDEXCHANGE){o[o.length]=pTickPendingReq}else{p[p.length]=pTickPendingReq}}}}if(0!=o.length){h=0;for(;;){var l=0;var d="ticker=";var b=new Array();for(;h<o.length;h++){b[b.length]=o[h];szTickId=o[h].m_queryId;l++;if(l!=1){d+=","}o[h].m_queryStr=szTickId.m_tickId2+":"+szTickId.m_tickId1;d+=szTickId.m_tickId2+":"+szTickId.m_tickId1;if(l==this.m_webServiceSecurityMaxLimit){break}}if(0==l){break}var n=this.m_webServerUrl;n+=d;for(var a=0;a<b.length;a++){b[a].m_state=1}this.SendRequest(1,n,b)}}if(0!=p.length){h=0;for(;;){var l=0;var d="id=";var b=new Array();for(;h<p.length;h++){b[b.length]=p[h];szTickId=p[h].m_queryId;l++;if(l!=1){d+=","}p[h].m_queryStr=szTickId.m_tickId1;d+=szTickId.m_tickId1;if(l==this.m_webServiceSecurityMaxLimit){break}}if(0==l){break}var n=this.m_webServerUrl;n+=d;for(var a=0;a<b.length;a++){b[a].m_state=1}this.SendRequest(1,n,b)}}if(0!=q.length){var c=new Array(),g;var m;for(h=0;h<q.length;h++){szTickId=q[h].m_queryId;m=szTickId.m_tickId2;for(f=0;f<c.length;f++){if(c[f][0]==m){g=c[f][1];g[g.length]=q[h];break}}if(f==c.length){c[c.length]=[m,[q[h]]]}}for(f=0;f<c.length;f++){h=0;for(;;){var l=0;var d="reg="+c[f][0]+"&ticker=";var b=new Array();var e=c[f][1];for(;h<e.length;h++){b[b.length]=e[h];szTickId=e[h].m_queryId;l++;if(l!=1){d+=","}e[h].m_queryStr=szTickId.m_tickId1;d+=szTickId.m_tickId1;if(l==this.m_webServiceSecurityMaxLimit){break}}if(0==l){break}var n=this.m_webServerUrl;n+=d;for(var a=0;a<b.length;a++){b[a].m_state=1}this.SendRequest(1,n,b)}}}};QU.prototype.TimeCheckRefreshSecurity=function(){var f=0,k;var l=this.m_securityArray,b;var e=new Date().getTime();for(;;){var g=0;var d="ticker=";var c=new Array();for(;f<l.length;f++){b=l[f];if(b.m_state==1){continue}if(0!=b.m_lastRefreshTime){if((b.m_securityType=="E0")||(b.m_securityType=="ST")||(b.m_securityType=="FC")||(b.m_securityType=="FE")){k=0;if(this.m_isStatusPAUClose==0){if(b.m_MarketPhase=="C"){k=1}}else{if((b.m_MarketPhase=="C")||(b.m_MarketPhase=="P")||(b.m_MarketPhase=="A")||(b.m_MarketPhase=="U")){k=1}}if(k==1){if((e+this.m_securityRefreshIntervalBase)<(b.m_lastRefreshTime+this.m_IntervalStockClose)){continue}}else{if((e+this.m_securityRefreshIntervalBase)<(b.m_lastRefreshTime+this.m_IntervalStockOpen)){continue}}}else{k=0;if(this.m_isStatusPAUClose==0){if(b.m_MarketPhase=="C"){k=1}}else{if((b.m_MarketPhase=="C")||(b.m_MarketPhase=="P")||(b.m_MarketPhase=="A")||(b.m_MarketPhase=="U")){k=1}}if(k==1){if((e+this.m_securityRefreshIntervalBase)<(b.m_lastRefreshTime+this.m_IntervalFundClose)){continue}}else{if((e+this.m_securityRefreshIntervalBase)<(b.m_lastRefreshTime+this.m_IntervalFundOpen)){continue}}}}c[c.length]=b;g++;if(g!=1){d+=","}d+=b.m_exchange+":"+b.m_tick;if(g==this.m_webServiceSecurityMaxLimit){break}}if(0==g){break}var h=this.m_webServerUrl;h+=d;for(var a=0;a<c.length;a++){c[a].m_state=1}this.SendRequest(2,h,c)}};QU.prototype.TimeCheckCbObj=function(){var d,c,b,e,a=1,f;do{if(1!=this.m_running){break}a=0;for(d=0;d<this.m_cbObjArray.length;d++){b=this.m_cbObjArray[d];if((b.m_havePendingTickQuery==1)||(b.m_needRefreshCb==1)){f=1;for(c=0;c<b.m_tickQueryArray.length;c++){e=b.m_tickQueryArray[c];if(false==e.isPriceInfoReady()){f=0;break}}if(f==1){b.m_havePendingTickQuery=0;b.m_needRefreshCb=0;b.m_pfCallBack(b.m_pvContext,b.m_tickQueryArray,b.m_lastSecurityRefreshTime);a=1;break}}}}while(a)};QU.prototype.TimeCheck=function(){var a,c,b=0;if(1!=this.m_running){return}c=new Date().getTime();QUWebRequest.TimeCheck(c);this.TimeCheckSendTickPendingReqs();if((this.m_lastRefreshTime==0)||((c-this.m_lastRefreshTime)>=this.m_securityRefreshIntervalBase)){this.m_lastRefreshTime=c;this.TimeCheckRefreshSecurity();for(a=0;a<this.m_cbObjArray.length;a++){this.m_cbObjArray[a].m_needRefreshCb=1}}this.TimeCheckCbObj()};QU.prototype.GetTickQuery=function(b,e,a){var c=null,d=null;for(i=0;i<this.m_cbObjArray.length;i++){c=this.m_cbObjArray[i];if((c.m_pfCallBack==e)&&(c.m_pvContext==a)){for(j=0;j<c.m_tickQueryArray.length;j++){d=c.m_tickQueryArray[j];if(QUSZTickId.isEqual(d.m_queryId,b)){break}}if(j==c.m_tickQueryArray.length){d=null}break}}return d};QU.prototype.AddSymbol=function(g,k,l){var c,e,d,f=null,h;for(e=0;e<this.m_cbObjArray.length;e++){f=this.m_cbObjArray[e];if((f.m_pfCallBack==k)&&(f.m_pvContext==l)){for(d=0;d<f.m_tickQueryArray.length;d++){h=f.m_tickQueryArray[d];if(QUSZTickId.isEqual(h.m_queryId,g)){return[-1,null]}}break}}if(e==this.m_cbObjArray.length){f=new QUSZCBObj(k,l);this.m_cbObjArray[this.m_cbObjArray.length]=f}h=new QUSZTickQuery(g,f);f.m_tickQueryArray[f.m_tickQueryArray.length]=h;f.m_havePendingTickQuery=1;for(e=0;e<this.m_securityArray.length;e++){var a=this.m_securityArray[e];if(a.isMatchTickId(szTickId)){h.m_state=2;h.m_puSecurity=a;a.m_queryArray[a.m_queryArray.length]=h}}if(e==this.m_securityArray.length){var b;for(e=0;e<this.m_TickPendingReqArray.length;e++){b=this.m_TickPendingReqArray[e];if(QUSZTickId.isEqual(b.m_queryId,h.m_queryId)){break}}if(e==this.m_TickPendingReqArray.length){b=new QUSZTickPendingReq(g);this.m_TickPendingReqArray[this.m_TickPendingReqArray.length]=b}h.m_state=1;h.m_puSecurity=b;b.m_TickQueryArray[b.m_TickQueryArray.length]=h}return[0,h]};QU.prototype.RemoveSymbol=function(d){var c,d,b;if(d.m_state!=0){if(d.m_puSecurity!=null){if(d.m_state==1){var e=d.m_puSecurity;for(c=0;c<e.m_TickQueryArray.length;c++){if(e.m_TickQueryArray[c]==d){e.m_TickQueryArray[c]=e.m_TickQueryArray[e.m_TickQueryArray.length-1];e.m_TickQueryArray.length-=1;break}}if(e.m_TickQueryArray.length==0){e.m_state=0;for(c=0;c<this.m_TickPendingReqArray.length;c++){if(e==this.m_TickPendingReqArray[c]){this.m_TickPendingReqArray[c]=this.m_TickPendingReqArray[this.m_TickPendingReqArray.length-1];this.m_TickPendingReqArray.length-=1;break}}}}else{var a=d.m_puSecurity;for(c=0;c<a.m_queryArray.length;c++){if(a.m_queryArray[c]==d){a.m_queryArray[c]=a.m_queryArray[a.m_queryArray.length-1];a.m_queryArray.length-=1;break}}if(a.m_queryArray.length==0){for(c=0;c<this.m_securityArray.length;c++){if(a==this.m_securityArray[c]){this.m_securityArray[c]=this.m_securityArray[this.m_securityArray.length-1];this.m_securityArray.length-=1;a.m_state=0;break}}}}d.m_puSecurity=null}b=d.m_pCbObj;for(c=0;c<b.m_tickQueryArray.length;c++){if(d==b.m_tickQueryArray[c]){b.m_tickQueryArray[c]=b.m_tickQueryArray[b.m_tickQueryArray.length-1];b.m_tickQueryArray.length-=1;break}}if(0==b.m_tickQueryArray.length){for(c=0;c<this.m_cbObjArray.length;c++){if(b==this.m_cbObjArray[c]){this.m_cbObjArray[c]=this.m_cbObjArray[this.m_cbObjArray.length-1];this.m_cbObjArray.length-=1;break}}}d.m_pCbObj=null;d.m_state=0}return};QU.prototype.SetOption=function(b,a){var c=0;switch(b){case 1:this.m_webServerUrl=a;break;case 2:this.m_securityRefreshIntervalBase=a[0]*1000;this.m_IntervalStockOpen=this.m_securityRefreshIntervalBase*a[1];this.m_IntervalStockClose=this.m_securityRefreshIntervalBase*a[2];this.m_IntervalFundOpen=this.m_securityRefreshIntervalBase*a[3];this.m_IntervalFundClose=this.m_securityRefreshIntervalBase*a[4];break;case 3:this.m_isStatusPAUClose=a;break;default:c=-1}return c};QU.prototype.Reset=function(){this.m_running=0;this.m_cbObjArray.length=0;this.m_TickPendingReqArray.length=0;this.m_securityArray.length=0;this.m_lastRefreshTime=0};QU.prototype.Start=function(){this.m_running=1};QU.prototype.Stop=function(){this.m_running=0};QU.SingleInstance=new QU();QU.TimerId=null;QU.Instance=function(){return QU.SingleInstance};QU.TimeCheck=function(){QU.Instance().TimeCheck()};QU.GetTickQuery=function(b,c,a){return QU.Instance().GetTickQuery(b,c,a)};QU.AddSymbol=function(b,c,a){return QU.Instance().AddSymbol(b,c,a)};QU.AddSymbolArray=function(d,e,a){var b=QU.Instance();for(var c=0;c<d.length;c++){b.AddSymbol(d[c],e,a)}};QU.RemoveSymbol=function(a){QU.Instance().RemoveSymbol(a)};QU.SetOption=function(b,a){return QU.Instance().SetOption(b,a)};QU.Start=function(){if(QU.TimerId==null){QU.Instance().Start();QU.TimerId=window.setInterval(QU.TimeCheck,1000)}};QU.Stop=function(){if(QU.TimerId!=null){window.clearInterval(QU.TimerId);QU.Instance().Stop();QU.TimerId=null}};QU.Reset=function(){QU.Stop();QU.Instance().Reset()};