String.prototype.Trim=function(){return this.replace(/^\s*|\s*$/g,"")};Array.prototype.contains=function(b){for(var a=0;a<this.length;a++){if(b.Trim().toUpperCase()==this[a].Trim().toUpperCase()){return true}}return false};Array.prototype.unique=function(){var a=[];for(var b=0;b<this.length;b++){if(!a.contains(this[b])){a.push(this[b])}}return a};function readWSCookie(f){var a=f+"=";var d=document.cookie.split(";");for(var b=0;b<d.length;b++){var e=d[b];while(e.charAt(0)==" "){e=e.substring(1,e.length)}if(e.indexOf(a)==0){return unescape(e.substring(a.length,e.length))}}return null}function setMSCookie(a,b){var c=new Date();c.setTime(c.getTime()+365*24*60*60*1000);document.cookie=a+"="+escape(b)+"; expires="+c.toGMTString()+"; path=/; domain=.morningstar.com"}function readWSCNameCookie(a){if(window.cName){a=a+escape(window.cName)}return readWSCookie(a)}function setMSCNameCookie(a,b){if(window.cName){a=a+escape(window.cName)}setMSCookie(a,b)}function FindCtrlPosition(d){var a=d;var b=0;var c=0;while(a){b+=a.offsetTop;c+=a.offsetLeft;a=a.offsetParent}return{top:b,left:c}}function AddJRequest(c){var b="JD"+JSONscriptRequest.scriptCounter;JSONscriptRequest.scriptCounter++;c=c+"&JID="+b;var a=new JSONscriptRequest(c,b);a.buildScriptTag();JRequests[JRequests.length]=a;a.addScriptTag()}function RemoveJRequestTag(c){var a=null;for(var b=0;b<JRequests.length;b++){if(JRequests[b]!=null){if(c.hasOwnProperty("jsid")){if(JRequests[b].scriptId==c.jsid){a=JRequests[b];break}}else{if(c.hasOwnProperty("JsonID")){if(JRequests[b].scriptId==c.JsonID){a=JRequests[b];break}}}}}if(a!=null){JRequests.splice(b,1);a.removeScriptTag()}}function EncodeQuote(a){return a.replace(/'/g,"\\'")}function TickerTape(c,a,b){this._varName=c;this._tickerCountForOnce=5;this._tickersArr=new Array();this._marketTickersArr=new Array("COMP","SPX","$INDU");this._marketTickerNames=new Array("Nasdaq","S&P 500","DJIA");this._portfolioWebserviceUrl="http://www.morningstar.com/GetPortfolio";this._loginStatus=true;this._portfolioTickersArr=new Array();this._commodityPricesArr=new Array();this._tickerPricesArr=new Array();this._mstarCookie=null;this.curTickerIndex=0;this._QUSZTickIdArr=new Array();this._QUSZcbList=new Array();this._isFirstCallBack=false;this._zeroOut=false;this._dtNow=new Date();this._dt6am=new Date(this._dtNow.getFullYear(),this._dtNow.getMonth(),this._dtNow.getDate(),6,0);this._mCommodityState=1;this._mCurrentTime=new Date().getTime();this._mScrollUI='<div class="TickerWrap" id="pricesPanel">            <div  class="TickerTableContain">            <div style="height:24px;width:921px;overflow:hidden;">                <div id="tpc">                    <div id="tcPrices1" style="height:24px;width:921px;"></div>                    <div id="tcPrices2" style="height:24px;width:921px;"></div>                </div>            </div>        </div>       <a class="TTButtEdit" onclick="javascript:'+c+".HideShowTickerTape('pricesPanel','settingsPanel');\"></a>    </div>";this._mEditUI='<div class="TickerWrap" style="display:none" id="settingsPanel">        <div  class="TickerTableContain2">            <div class="TTControl">                <div class="TTControlText">&nbsp;&nbsp;Display Settings:</div>            </div>            <div class="TTForm1">               <input name="markets" id="markets" type="checkbox" checked />            </div>            <div class="TTControlText">Markets</div>            <div class="TTForm"></div>            <div class="TTForm3">            <div class="menucont_h" style="margin-top:3px;">                    <ul id="nav">                        <li><a href="javascript:void(0);" onclick='+c+'.DropDownPortfolioList(event);return false; " class="headerlink3" id="pfSelect">Select a Portfolio</a><a href="javascript:void(0);" onclick='+c+'.DropDownPortfolioList(event);return false;" class="arrow_h"></a>                        </li>                     </ul>                </div>             </div>             <div class="TTForm" style="z-index:50">                <input name="newTickers" id="newTickers" type="checkbox" />             </div>             <div class="TTForm2"><input name="newTickerInput" id="newTickerInput" type="text" value="Enter Tickers" size="15" class="headerlink2" onclick="if(this.value==\'Enter Tickers\') this.value=\'\';" onkeyup="if(event.keyCode==13 && this.value!=\'\') {'+c+'.SelectNewTicker(this.value);this.value=\'\'}"/></div>              <div class="TTForm">               <input name="rtQuote" id="rtQuote" type="checkbox"/>             </div><div class="TTControlText">Recent Quotes</div>             <div class="TTForm">                <input name="hideTape" id="hideTape" type="checkbox" onclick="this.checked=false;'+c+".HideTickerButtonClick('pricesPanel','settingsPanel','expandBtnPanel');\"/>              </div><div class=\"TTControlText\">Hide Ticker Tape</div>            </div>            <a class=\"TTButtSave\" href=\"javascript:"+c+'.SaveOptions();"></a>          </div>          <div class="AutoCompleteDropDownQuote" style="position: absolute; float: left; left: 304px; background-color: rgb(255, 255, 255); top: 119px;z-index:1000" id="AutoCompleteDropDownQuote"></div>           <div class="menucont_h" style="margin-top:3px;float: left;font-size:10px; background-color:White; position:absolute;display:none" id="pfDropDownList" onmouseout="this.style.display=\'none\';" onmouseover="this.style.display=\'\';"></div>';this._mHiddenUI='<div id="expandBtnPanel" style="display:none;z-index:500"><a href="javascript:'+this._varName+".ShowTickerButtonClick('pricesPanel','settingsPanel','expandBtnPanel');\" class=\"TickerExpand\"></a></div>";if(typeof(QU)!="function"){document.write('<script type="text/javascript" src="/TickerTape/SimpleQuotScript.js"><\/script>')}if(typeof(Tween)!="function"){document.write('<script type="text/javascript" src="/TickerTape/tween.js"><\/script>')}if(b){window.cName=b}else{window.cName=""}if(document.getElementById(a)){document.getElementById(a).innerHTML=this._mScrollUI+this._mEditUI+this._mHiddenUI}else{document.write("<div id="+a+"></div>");document.getElementById(a).innerHTML=this._mScrollUI+this._mEditUI+this._mEditUI}this.Init()}TickerTape.prototype.Init=function(){var c=readWSCNameCookie("hiddenTickerTape");if(c){if(c=="1"){this.HideTickerButtonClick("pricesPanel","settingsPanel","expandBtnPanel");return}}this._tickersArr=this._GetTickers();this._mstarCookie=readWSCookie("mstar");this._IsWeekendHoliday();this._InitTaperOptions();this.GetCommodityPrices(true);this._InitPortfolios();this._GetPortfolioTickers();var a=this._varName+".GetCommodityPrices()";var b=this._varName+".TweenPrices()";setInterval(a,60000);setInterval(b,6000)};TickerTape.prototype._IsWeekendHoliday=function(){var a="http://www.morningstar.com/hpwebservice/GetMarketDay.aspx?cb="+this._varName+"._RenderZeroOut";AddJRequest(a)};TickerTape.prototype._RenderZeroOut=function(b){if(b==null){return}var a=b.Results;if(this._dtNow<this._dt6am){this._zeroOut=false}if(a=="False"&&this._dtNow>this._dt6am){this._zeroOut=true}RemoveJRequestTag(b)};TickerTape.prototype._InitPrices=function(){this.GetPrices(this.UpdateTickerAndLayers);this.GetPrices()};TickerTape.prototype._InitTaperOptions=function(){var d=document.getElementById("markets");var c=document.getElementById("newTickers");var e=document.getElementById("rtQuote");var b=readWSCNameCookie("TickerTapeOptions");if(b){var a=b.split(":");if(d&&a[0]=="1"){d.checked=true}else{d.checked=false}if(c&&a[1]=="1"){c.checked=true}else{c.checked=false}if(e&&a[2]=="1"){e.checked=true}else{e.checked=false}}};TickerTape.prototype.SelectNewTicker=function(j){if(j.Symbol){j=j.Exchange+":"+j.Symbol}j=j.replace(/\s/g,"");var c=j.split(",");var k=0;j="";var e=0;var g=readWSCNameCookie("NewQuotes");var h;if(!g||g==""){h="";e=1}else{h=g}for(var d=0;d<c.length;d++){if(c[d]!=""){reg=new RegExp("\\b"+c[d]+"\\b","gi");if(reg.test(h)){continue}h=h+","+c[d];k++;j=j+c[d]+","}}if(k==0){document.getElementById("newTickerInput").value="";return}j=j.substr(0,j.length-1);if(e>0){h=h.substr(e)}var a=h.split(",");var f=a.length;var b=0;while(f>20){b=h.indexOf(",",b+1);f--}if(b>0){h=h.substr(b+1)}g=h;setMSCNameCookie("NewQuotes",g);this._tickersArr=this._GetTickers();this.GetPrices()};TickerTape.prototype.SaveOptions=function(){var e=document.getElementById("markets");var d=document.getElementById("newTickers");var f=document.getElementById("rtQuote");var b="";if(e){if(e.checked){b="1"}else{b="0"}}if(d){if(d.checked){b=b+":1"}else{b=b+":0"}}if(f){if(f.checked){b=b+":1"}else{b=b+":0"}}setMSCNameCookie("TickerTapeOptions",b);var c=document.getElementById("newTickerInput");if(c!=null&&c.value!="Enter Tickers"&&c.value!=""){this.SelectNewTicker(c.value)}var a=this._varName+".AfterSaveOptions";this._tickersArr=this._GetTickers();this.HideTickerTapeSettingsPanel("pricesPanel","settingsPanel");this.GetPrices(this.AfterSaveOptions,true)};TickerTape.prototype._GetTickers=function(){var d=readWSCNameCookie("TickerTapeOptions");if(d){var g=new Array();var a=d.split(":");if(a[0]=="1"){g=g.concat(this._marketTickersArr)}if(this._mstarCookie!=null&&this._portfolioTickersArr.length>0){g=g.concat(this._portfolioTickersArr)}if(a[1]=="1"){var c=readWSCNameCookie("NewQuotes");if(c){var b=(c).split(",");g=g.concat(b)}}if(a[2]=="1"){var f=readWSCookie("RecentQuotes");if(f){var e=(f).split("+");g=g.concat(e)}}g=g.unique();return g}else{return this._marketTickersArr}};TickerTape.prototype.RenderPriceLayer=function(c){var a=this.RenderPrices();var b=document.getElementById(c);if(b){b.innerHTML=a}};TickerTape.prototype.GetCommodityPrices=function(b){var a;var c=new Date();c=c.getTime();if(b){a=this._portfolioWebserviceUrl+"/GetCommodityQuotes.ashx?cb="+this._varName+".InitCommodityPrices";AddJRequest(a)}else{if(this._mCommodityState==1||(this._mCurrentTime+120000)<c){this._mCommodityState=0;a=this._portfolioWebserviceUrl+"/GetCommodityQuotes.ashx?cb="+this._varName+".RenderCommodityPrices";AddJRequest(a)}this._mCurrentTime=c}};TickerTape.prototype.InitCommodityPrices=function(a){this._commodityPricesArr=a.Results.split(",");this._InitPrices();RemoveJRequestTag(a)};TickerTape.prototype.RenderCommodityPrices=function(a){this._commodityPricesArr=a.Results.split(",");this._mCommodityState=1;RemoveJRequestTag(a)};TickerTape.prototype._InitPortfolios=function(){if(this._mstarCookie!=null){var a=this._portfolioWebserviceUrl+"/GetPortfolio.ashx?op=1&cb="+this._varName+"._RenderPortfolioDropDownList";AddJRequest(a)}else{this._loginStatus=false}};TickerTape.prototype._RenderPortfolioDropDownList=function(c){if(c==null){return}if(c.Results=="Unlogined"){this._loginStatus=false;return}var a=document.getElementById("pfDropDownList");var b="";if(a){b='<ul class="drop_shad_h"><li><a class="rowlist_h" href="javascript:'+this._varName+'.ClearPortfolioCookie()">Clear portfolio tickers</a></li><br />';for(i=0;i<c.Results.length;i++){b+='<li><a class="rowlist_h" href="javascript:void(0)" onclick="'+this._varName+".SelectPortfolio("+c.Results[i][1]+',this.innerHTML)">'+c.Results[i][0]+"</a></li><br />"}b+="</ul>";a.innerHTML=b;RemoveJRequestTag(c)}};TickerTape.prototype.ClearPortfolioCookie=function(){var b=document.getElementById("pfDropDownList");if(b){b.style.display="none"}this._portfolioTickersArr=new Array();setMSCNameCookie("NewPortfolios","");var a=document.getElementById("pfSelect");if(a){a.innerHTML="Select a Portfolio"}};TickerTape.prototype.SelectPortfolio=function(e,d){var a=document.getElementById("pfDropDownList");if(a){a.style.display="none"}var f=readWSCNameCookie("NewPortfolios");var c=new RegExp("\\b"+e+"\\b","gi");if(c.test(f)){return}else{f=e.toString()+"|"+d}setMSCNameCookie("NewPortfolios",f);this._GetPortfolioTickers();this._tickersArr=this._GetTickers();this.GetPrices();var b=document.getElementById("pfSelect");if(b){b.innerHTML=d}};TickerTape.prototype._GetPortfolioTickers=function(){var d=readWSCNameCookie("NewPortfolios");var b=document.getElementById("pfSelect");if(d==null||d==""||this._mstarCookie==null){if(b){b.innerHTML="Select a Portfolio"}return}var c=d.split("|");if(b){b.innerHTML=c[1]}var a=this._portfolioWebserviceUrl+"/GetPortfolio.ashx/GetPortfolio.ashx?op=2&&pfIds="+c[0]+"&cb="+this._varName+"._RenderPortfolioTickers";AddJRequest(a)};TickerTape.prototype._RenderPortfolioTickers=function(b){try{if(b.Results=="Unlogined"){this._loginStatus=false;return}else{this._portfolioTickersArr=b.Results;this._tickersArr=this._GetTickers();this.GetPrices();RemoveJRequestTag(b)}}catch(a){}};TickerTape.prototype.RenderPrices=function(){if(this._tickerPricesArr.length<1){return""}var c="";if(this._tickerPricesArr.length<=this._tickerCountForOnce){for(var b=0;b<this._tickerPricesArr.length;b++){if(c.length>0){c=c+this._RendSingleTickerPrice(this._tickerPricesArr[b])}else{c=this._RendSingleTickerPrice(this._tickerPricesArr[b])}}}else{var a;var d=0;if(this.curTickerIndex+this._tickerCountForOnce>=this._tickerPricesArr.length){a=this._tickerPricesArr.length;d=this.curTickerIndex+this._tickerCountForOnce-this._tickerPricesArr.length}else{a=this.curTickerIndex+this._tickerCountForOnce}for(var b=this.curTickerIndex;b<a;b++){if(c.length>0){c=c+this._RendSingleTickerPrice(this._tickerPricesArr[b])}else{c=this._RendSingleTickerPrice(this._tickerPricesArr[b])}}if(a==this._tickerPricesArr.length){this.curTickerIndex=0}else{this.curTickerIndex=a}if(d>0){for(var b=0;b<d;b++){if(c.length>0){c=c+this._RendSingleTickerPrice(this._tickerPricesArr[b])}else{c=this._RendSingleTickerPrice(this._tickerPricesArr[b])}}this.curTickerIndex=d}}return c};TickerTape.prototype._RendSingleTickerPrice=function(b){var c="";if(b==null||b==""){return c}var a=b.split("|");if(a[4]=="1"){c='<div class="TTTWrap"><div class="TTtickers"><a href="'+a[5]+'">'+a[0]+'</a></div><div class="TTQuote">'+a[1]+'&nbsp;<font color="green">'+a[2]+"("+a[3]+")</font></div></div>"}else{if(a[4]=="-1"){c='<div class="TTTWrap"><div class="TTtickers"><a href="'+a[5]+'">'+a[0]+'</a></div><div class="TTQuote">'+a[1]+'&nbsp;<font color="red">'+a[2]+"("+a[3]+")</font></div></div>"}else{c='<div class="TTTWrap"><div class="TTtickers"><a href="'+a[5]+'">'+a[0]+'</a></div><div class="TTQuote">'+a[1]+"&nbsp;"+a[2]+"("+a[3]+")</div></div>"}}return c};TickerTape.prototype.TweenPrices=function(){var a;var b=document.getElementById("tpc");if(b){var c=document.getElementById("tcPrices1");if(c){c.innerHTML=""}this.RenderPriceLayer("tcPrices2");a=new Tween(b.style,"top",Tween.strongEaseOut,0,-24,0.7,"px")}a.start()};TickerTape.prototype._htmlbak="";TickerTape.prototype.HideShowTickerTape=function(b,a){var g=document.getElementById(b);var c=document.getElementById(a);if(g!=null&&c!=null){if(g.style.display==""){g.style.display="none"}else{g.style.display=""}if(c.style.display==""){this._htmlbak=c.innerHTML;c.innerHTML="";var f=document.getElementById("pfDropDownList");if(f){f.style.display="none"}c.style.display="none"}else{if(this._htmlbak){c.innerHTML=this._htmlbak}this._InitTaperOptions();c.style.display="";var d=document.getElementById("newTickerInput");if(d){d.value="Enter Tickers"}var e=initBoxQuote("newTickerInput","AutoCompleteDropDownQuote");e.IdleDisplayMsg="Enter Tickers";e.SetPreference("USA","EN",32);e.SubmitCallback=this._varName+".SelectNewTicker";e.EntryChosenCallback=this._varName+".SelectNewTicker"}}};TickerTape.prototype.HideTickerTapeSettingsPanel=function(b,a){var e=document.getElementById(b);var c=document.getElementById(a);if(e!=null&&c!=null){if(c.style.display==""){this._htmlbak=c.innerHTML;c.innerHTML="";var d=document.getElementById("pfDropDownList");if(d){d.style.display="none"}c.style.display="none";e.style.display=""}}};TickerTape.prototype.HideTickerButtonClick=function(c,b,a){var g=document.getElementById(c);var d=document.getElementById(b);var f=document.getElementById(a);if(g!=null&&d!=null&&f!=null){g.style.display="none";this._htmlbak=d.innerHTML;d.innerHTML="";var e=document.getElementById("pfDropDownList");if(e){e.style.display="none"}d.style.display="none";f.style.display=""}setMSCNameCookie("hiddenTickerTape","1")};TickerTape.prototype.ShowTickerButtonClick=function(c,b,a){var f=document.getElementById(c);var d=document.getElementById(b);var e=document.getElementById(a);if(f!=null&&d!=null&&e!=null){f.style.display="";d.style.display="none";e.style.display="none"}setMSCNameCookie("hiddenTickerTape","0")};TickerTape.prototype.DropDownPortfolioList=function(f){if(!this._loginStatus){var d="http://member.morningstar.com/forbidden/loginrawp.html?vurl="+document.URL;window.location.href=d;return}var c=document.getElementById("pfDropDownList");if(c){if(c.style.display=="none"){if(c.innerHTML!=null&&c.innerHTML.length>0){var a=document.getElementById("pfSelect");if(a){c.style.display="";var g=FindCtrlPosition(a);var b=FindCtrlPosition(c.offsetParent);c.style.left=g.left-b.left+"px";c.style.top=g.top+a.clientHeight-b.top+"px"}}}else{c.style.display="none"}}f=window.event||f;if(window.event){f.cancelBubble=true}else{f.stopPropagation()}};TickerTape.prototype.GetPrices=function(a,d){var c=null;for(var b=0;b<this._QUSZTickIdArr.length;b++){c=QU.GetTickQuery(this._QUSZTickIdArr[b],this._QUSZcbList[b],this);if(c!=null){QU.RemoveSymbol(c)}}this._QUSZTickIdArr.length=0;this._QUSZcbList.length=0;this._isFirstCallBack=true;if(this._tickersArr.length<1){this._tickerPricesArr.length=0;this.RenderPriceLayer("tcPrices1");this.RenderPriceLayer("tcPrices2");if(d){this.TweenPrices();this.HideTickerTapeSettingsPanel("pricesPanel","settingsPanel")}return}if(a==undefined){a=this.UpdateTickerPrices}for(var b=0;b<this._tickersArr.length;b++){this._QUSZTickIdArr[this._QUSZTickIdArr.length]=new QUSZTickId(QU.TICKIDTYPE_TICKANDREGION,this._tickersArr[b],"");this._QUSZcbList[this._QUSZcbList.length]=a;QU.AddSymbol(this._QUSZTickIdArr[this._QUSZTickIdArr.length-1],a,this)}QU.Start()};TickerTape.prototype.UpdateTickerAndLayers=function(a,e){a.UpdateTickerPrices(a,e);var d="";for(var c=0;c<e.length;c++){d=e[c];var b=d.getTickId();d=QU.GetTickQuery(b,arguments.callee,a);if(d!=null){QU.RemoveSymbol(d)}}a.RenderPriceLayer("tcPrices1")};TickerTape.prototype.AfterSaveOptions=function(a,b){a.UpdateTickerPrices(a,b);if(a._isFirstCallBack){a.TweenPrices();a._isFirstCallBack=false}};TickerTape.prototype.UpdateTickerPrices=function(s,c){try{var g;var m;s._tickerPricesArr.length=0;for(g=0;g<c.length;g++){var h=c[g];var n=h.getTickId();var l=h.getSecurityRecord();var o="";for(var b=0;b<s._marketTickersArr.length;b++){if(n.m_tickId1==s._marketTickersArr[b]){m="http://quote.morningstar.com/switch.html?ticker="+encodeURIComponent(s._marketTickersArr[b]);o=s._marketTickerNames[b];break}}if(o==""){o=n.m_tickId1;m="http://quote.morningstar.com/switch.html?ticker="+encodeURIComponent(o)}var a="0.00";var p="0.00";var f="1";try{var d=l.m_TradeTime.replace(/-/g,"/");var r=new Date(d);if(s._marketTickerNames.contains(o)&&(s._zeroOut==true)&&(r<s._dt6am)){f="0";a="0.00";p="0.00"}else{if(l.m_lastPrice>l.m_yestClose){f="1"}else{if(l.m_lastPrice==l.m_yestClose){f="0"}else{f="-1"}}a=l.m_lastPrice-l.m_yestClose;p=(l.m_lastPrice-l.m_yestClose)*100/l.m_yestClose;a=a.toFixed(2);p=p.toFixed(2)}}catch(k){}if(o=="DJIA"){s._tickerPricesArr.push(o+"|"+l.m_lastPrice+"|"+a+"|"+p+"%|"+f+"|"+m);for(var q=0;q<s._commodityPricesArr.length;q++){if(s._commodityPricesArr[q].length>0){s._tickerPricesArr.push(s._commodityPricesArr[q])}}}else{if(l!=null&&l.m_state>0){s._tickerPricesArr.push(o+"|"+l.m_lastPrice+"|"+a+"|"+p+"%|"+f+"|"+m)}}}}catch(k){}};document.onclick=function(){var a=document.getElementById("pfDropDownList");if(a){a.style.display="none"}};function Delegate(){}Delegate.create=function(g,e){var c=new Array();var b=arguments.length;for(var d=2;d<b;d++){c[d-2]=arguments[d]}return function(){var a=[].concat(arguments,c);e.apply(g,a)}};Tween=function(f,g,d,c,b,e,a){this.init(f,g,d,c,b,e,a)};var t=Tween.prototype;t.obj=new Object();t.prop="";t.func=function(e,a,g,f){return g*e/f+a};t.begin=0;t.change=0;t.prevTime=0;t.prevPos=0;t.looping=false;t._duration=0;t._time=0;t._pos=0;t._position=0;t._startTime=0;t._finish=0;t.name="";t.suffixe="";t._listeners=new Array();t.setTime=function(a){this.prevTime=this._time;if(a>this.getDuration()){if(this.looping){this.rewind(a-this._duration);this.update();this.broadcastMessage("onMotionLooped",{target:this,type:"onMotionLooped"})}else{this._time=this._duration;this.update();this.stop();this.broadcastMessage("onMotionFinished",{target:this,type:"onMotionFinished"})}}else{if(a<0){this.rewind();this.update()}else{this._time=a;this.update()}}};t.getTime=function(){return this._time};t.setDuration=function(a){this._duration=(a==null||a<=0)?100000:a};t.getDuration=function(){return this._duration};t.setPosition=function(c){this.prevPos=this._pos;var b=this.suffixe!=""?this.suffixe:"";this.obj[this.prop]=Math.round(c)+b;this._pos=c;this.broadcastMessage("onMotionChanged",{target:this,type:"onMotionChanged"})};t.getPosition=function(a){if(a==undefined){a=this._time}return this.func(a,this.begin,this.change,this._duration)};t.setFinish=function(a){this.change=a-this.begin};t.geFinish=function(){return this.begin+this.change};t.init=function(f,g,d,c,b,e,a){if(!arguments.length){return}this._listeners=new Array();this.addListener(this);if(a){this.suffixe=a}this.obj=f;this.prop=g;this.begin=c;this._pos=c;this.setDuration(e);if(d!=null&&d!=""){this.func=d}this.setFinish(b)};t.start=function(){this.rewind();this.startEnterFrame();this.broadcastMessage("onMotionStarted",{target:this,type:"onMotionStarted"})};t.rewind=function(a){this.stop();this._time=(a==undefined)?0:a;this.fixTime();this.update()};t.fforward=function(){this._time=this._duration;this.fixTime();this.update()};t.update=function(){this.setPosition(this.getPosition(this._time))};t.startEnterFrame=function(){this.stopEnterFrame();this.isPlaying=true;this.onEnterFrame()};t.onEnterFrame=function(){if(this.isPlaying){this.nextFrame();setTimeout(Delegate.create(this,this.onEnterFrame),0)}};t.nextFrame=function(){this.setTime((this.getTimer()-this._startTime)/1000)};t.stop=function(){this.stopEnterFrame();this.broadcastMessage("onMotionStopped",{target:this,type:"onMotionStopped"})};t.stopEnterFrame=function(){this.isPlaying=false};t.continueTo=function(a,b){this.begin=this._pos;this.setFinish(a);if(this._duration!=undefined){this.setDuration(b)}this.start()};t.resume=function(){this.fixTime();this.startEnterFrame();this.broadcastMessage("onMotionResumed",{target:this,type:"onMotionResumed"})};t.yoyo=function(){this.continueTo(this.begin,this._time)};t.addListener=function(a){this.removeListener(a);return this._listeners.push(a)};t.removeListener=function(d){var b=this._listeners;var c=b.length;while(c--){if(b[c]==d){b.splice(c,1);return true}}return false};t.broadcastMessage=function(){var b=new Array();for(var f=0;f<arguments.length;f++){b.push(arguments[f])}var g=b.shift();var d=this._listeners;var c=d.length;for(var f=0;f<c;f++){if(d[f][g]){d[f][g].apply(d[f],b)}}};t.fixTime=function(){this._startTime=this.getTimer()-this._time*1000};t.getTimer=function(){return new Date().getTime()-this._time};Tween.strongEaseOut=function(e,a,g,f){return g*((e=e/f-1)*e*e*e*e+1)+a};
