Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadTicker=function(a){Telerik.Web.UI.RadTicker.initializeBase(this,[a]);
this._autoStart=false;
this._autoAdvance=true;
this._loop=false;
this._tickSpeed=20;
this._lineDuration=2000;
this._currentLine=0;
this._length=0;
this._itemsContainer=null;
this._controlElement=null;
this._numberOfItems=0;
this._postBackReference=null;
};
Telerik.Web.UI.RadTicker.prototype={initialize:function(){Telerik.Web.UI.RadTicker.callBaseMethod(this,"initialize");
this._itemsContainer=this._getChildElement("itemsContainer");
this._controlElement=document.createElement("span");
this.get_element().appendChild(this._controlElement);
this.set_numberOfItems($telerik.getChildrenByTagName(this._itemsContainer,"span").length);
if(this.get_autoStart()&&this.get_numberOfItems()>0){this.startTicker();
}},dispose:function(){this.clearTimeouts();
this._itemsContainer=null;
this._controlElement=null;
Telerik.Web.UI.RadTicker.callBaseMethod(this,"dispose");
},startTicker:function(){this.tickLine(0);
},stopTicker:function(){this.clearTimeouts();
},tickNextLine:function(){this.tickLine(this._currentLine);
},tickLine:function(a,b){if(b&&this._lineTimeOut==null){return;
}this._length=0;
this._controlElement.innerHTML="";
this._currentLine=a;
this.tickOne(a);
},resetTicker:function(){this._length=0;
this._isReset=true;
this.clearTimeouts();
this._lineTimeOut=null;
this._tickTimeOut=null;
this._controlElement.innerHTML="";
},_trimString:function(a){return a.replace(/^\s{1,}/ig,"").replace(/\s{1,}$/ig,"");
},tickOne:function(b,c){if(c&&this._tickTimeOut==null){return;
}var e=this._trimString(this._getChildElement("i"+b).innerHTML);
var g=e.length;
var d=this._length;
if(d<g){var a=this._controlElement.innerHTML;
if(e.charAt(d)=="&"){a=a+"&amp;";
}else{if(e.charAt(d)==" "&&d+1<g&&e.charAt(d+1)==" "){a=a+" &nbsp;";
this._length++;
}else{a=a+e.charAt(d);
}}this._controlElement.innerHTML=a;
this._length++;
var f=this;
this._tickTimeOut=window.setTimeout(function(){f.tickOne(b,true);
},this.get_tickSpeed());
}else{this.lineEnd();
}},clearTimeouts:function(){window.clearTimeout(this._tickTimeOut);
window.clearTimeout(this._lineTimeOut);
},lineEnd:function(a){this._length=0;
var b=(this._currentLine+1)%this.get_numberOfItems();
if(isNaN(b)){b=0;
}if(b<=this._currentLine&&!this.get_loop()){this.tickerEnd();
return;
}else{this._currentLine=b;
}if(this.get_autoAdvance()){var c=this;
this._lineTimeOut=window.setTimeout(function(){c.tickLine(b,true);
},this.get_lineDuration());
}},tickerEnd:function(){if(this.tickerEndCode){eval(this.tickerEndCode);
}},_postback:function(){if(!this._postBackReference){return;
}var a=this._postBackReference.replace("arguments",this._currentLine);
eval(a);
},get_numberOfItems:function(){return this._numberOfItems;
},set_numberOfItems:function(a){this._numberOfItems=a;
},get_autoStart:function(){return this._autoStart;
},set_autoStart:function(a){this._autoStart=a;
},get_loop:function(){return this._loop;
},set_loop:function(a){this._loop=a;
},get_tickSpeed:function(){return this._tickSpeed;
},set_tickSpeed:function(a){this._tickSpeed=a;
},get_lineDuration:function(){return this._lineDuration;
},set_lineDuration:function(a){this._lineDuration=a;
},get_autoAdvance:function(){return this._autoAdvance;
},set_autoAdvance:function(a){this._autoAdvance=a;
},get_skin:function(){return this._skin;
},set_skin:function(a){this._skin=a;
}};
Telerik.Web.UI.RadTicker.registerClass("Telerik.Web.UI.RadTicker",Telerik.Web.UI.RadWebControl);

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();