Telerik.Web.UI.RadComboBoxEventArgs=function(e){
Telerik.Web.UI.RadComboBoxEventArgs.initializeBase(this);
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxEventArgs.prototype={get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxEventArgs.registerClass("Telerik.Web.UI.RadComboBoxEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxCancelEventArgs=function(e){
Telerik.Web.UI.RadComboBoxCancelEventArgs.initializeBase(this);
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxCancelEventArgs.prototype={get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxItemEventArgs=function(_3,e){
Telerik.Web.UI.RadComboBoxItemEventArgs.initializeBase(this);
this._item=_3;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxItemEventArgs.prototype={get_item:function(){
return this._item;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxItemEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxItemCancelEventArgs=function(_5,e){
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.initializeBase(this);
this._item=_5;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.prototype={get_item:function(){
return this._item;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxRequestEventArgs=function(_7,e){
Telerik.Web.UI.RadComboBoxRequestEventArgs.initializeBase(this);
this._text=_7;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxRequestEventArgs.prototype={get_text:function(){
return this._text;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxRequestEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs=function(_9,_a,e){
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.initializeBase(this);
this._text=_9;
this._context=_a;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.prototype={get_text:function(){
return this._text;
},get_context:function(){
return this._context;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs=function(_c,_d,e){
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.initializeBase(this);
this._text=_c;
this._errorMessage=_d;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.prototype={get_text:function(){
return this._text;
},get_errorMessage:function(){
return this._errorMessage;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs",Telerik.Web.UI.RadComboBoxCancelEventArgs);
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs=function(_f,_10){
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs.initializeBase(this,[_f]);
this._dataItem=_10;
};
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs.prototype={get_dataItem:function(){
return this._dataItem;
}};
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs",Telerik.Web.UI.RadComboBoxItemEventArgs);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.Keys=function(){
};
Telerik.Web.UI.Keys.prototype={Shift:16,Escape:27,Up:38,Down:40,Left:37,Right:39,Enter:13,Tab:9,Space:32,PageUp:33,Del:46,F1:112,F12:123};
Telerik.Web.UI.Keys.registerEnum("Telerik.Web.UI.Keys");
Telerik.Web.UI.RadComboBoxFilter=function(){
};
Telerik.Web.UI.RadComboBoxFilter.prototype={None:0,Contains:1,StartsWith:2};
Telerik.Web.UI.RadComboBoxFilter.registerEnum("Telerik.Web.UI.RadComboBoxFilter");
Telerik.Web.UI.RadComboBox=function(_11){
Telerik.Web.UI.RadComboBox.initializeBase(this,[_11]);
this._callbacktext="";
this._changeText=true;
this._children=null;
this._virtualScroll=true;
this._itemData=null;
this._selectedItem=null;
this._selectedIndex=null;
this._highlightedItem=null;
this._dropDownVisible=false;
this._enableLoadOnDemand=false;
this._enableTextSelection=true;
this._setSelectedItem=false;
this._enableItemCaching=false;
this._openDropDownOnLoad=false;
this._appendItems=false;
this._allowCustomText=false;
this._markFirstMatch=false;
this._filter=0;
this._originalText=this.get_inputDomElement().value;
this._cachedText=this._originalText;
this._cachedOffsetHeight="";
this._text="";
this._value=null;
this._isCaseSensitive=false;
this._autoCompleteSeparator=null;
this._postBackReference=null;
this._dropDownElement=null;
this._inputDomElement=null;
this._imageDomElement=null;
this._tableElement=null;
this._itemRequestTimeout=300;
this._isTemplated=false;
this._requestTimeoutID=0;
this._highlightTemplatedItems=false;
this._clientState={value:"",text:"",enabled:true,logEntries:[]};
this._uniqueId=null;
this._rightToLeft=false;
this._isDetached=false;
this._offsetX=0;
this._offsetY=0;
this._overlay=null;
this._enableScreenBoundaryDetection=true;
this._suppressChange=false;
this._lastKeyCode=null;
this._loadingDiv=null;
this._loadingMessage="Loading...";
this._showMoreResultsBox=false;
this._closeDropDownOnBlur=true;
this._focused=false;
this._causesValidation=true;
this.get_inputDomElement().setAttribute("autocomplete","off");
this._errorMessage="CallBack Error!";
this._showMoreMessage="";
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings({});
this._webServiceLoader=null;
this._clientDataString=null;
this._scrollbarWidth=16;
this._enabled=true;
this._fireEvents=this._enabled;
this._slide=null;
this._expandAnimation=new Telerik.Web.UI.AnimationSettings({});
this._expandDelay=100;
this._collapseAnimation=new Telerik.Web.UI.AnimationSettings({});
this._collapseDelay=500;
this._slideDirection=Telerik.Web.UI.SlideDirection.Down;
this._expandAnimationEndedDelegate=null;
this._expandAnimationStartedDelegate=null;
this._showDropDownOnTextboxClick=true;
this._dropDownWidth="";
this._height="";
this._maxHeight="";
this._childListElementWrapper=null;
this._skin="";
this._skipLoadingItems=false;
this._ajaxRequest=false;
this._endOfItems=false;
this._emptyMessage=null;
this._disposed=false;
this._disposeChildElements=true;
this._firstOpeningOfDropDown=true;
this.lodHashTable={};
};
Telerik.Web.UI.RadComboBox._getScrollBarWidth=function(){
if(Telerik.Web.UI.RadComboBox._scrollbarWidth){
return Telerik.Web.UI.RadComboBox._scrollbarWidth;
}
var _12,_13=0;
var _14=document.createElement("div");
_14.style.position="absolute";
_14.style.top="-1000px";
_14.style.left="-1000px";
_14.style.width="100px";
_14.style.height="50px";
_14.style.overflow="hidden";
var _15=document.createElement("div");
_15.style.width="100%";
_15.style.height="200px";
_14.appendChild(_15);
document.body.appendChild(_14);
var _16=_15.offsetWidth;
_14.style.overflow="auto";
var _17=_15.offsetWidth;
Telerik.Web.UI.RadComboBox._scrollbarWidth=_16-_17;
if(Telerik.Web.UI.RadComboBox._scrollbarWidth<=0){
_15.style.width="300px";
_12=_14.offsetWidth;
_13=_14.clientWidth;
Telerik.Web.UI.RadComboBox._scrollbarWidth=_12-_13;
}
if(Telerik.Web.UI.RadComboBox._scrollbarWidth<=0){
Telerik.Web.UI.RadComboBox._scrollbarWidth=16;
}
document.body.removeChild(document.body.lastChild);
return Telerik.Web.UI.RadComboBox._scrollbarWidth;
};
Telerik.Web.UI.RadComboBox.ComboBoxes=[];
Telerik.Web.UI.RadComboBox._createChildControls=function(_18,_19){
var _1a=_18.get_itemData();
if(!_1a){
return;
}
var _1b=_18.get_childListElement();
if(!_1b){
return;
}
var _1c=$telerik.getChildrenByTagName(_18.get_childListElement(),"li");
var _1d=_1c.length;
var _1e=0;
if(_1c.length>0&&_1c[0].className=="rcbLoading"){
_1d=_1d-1;
_1e=1;
}
for(var i=_1e,_20=_1c.length;i<_20;i++){
var _21=new Telerik.Web.UI.RadComboBoxItem();
_19.add(_21);
_21._initialize(_1a[i-_1e],_1c[i]);
}
};
Telerik.Web.UI.RadComboBox.prototype={initialize:function(){
Telerik.Web.UI.ControlItemContainer.callBaseMethod(this,"initialize");
this._log.initialize();
this._initializeEventMap();
this._clientState.value=this._value;
this._clientState.text=this._text;
this.updateClientState();
if(this._requiresRightToLeft()){
this._initRightToLeft();
}
if(this.get_childListElement()){
this._onDropDownClickDelegate=Function.createDelegate(this,this._onDropDownClick);
$addHandler(this.get_childListElement(),"click",this._onDropDownClickDelegate);
this._onDropDownHoverDelegate=Function.createDelegate(this,this._onDropDownHover);
$addHandler(this.get_childListElement(),"mouseover",this._onDropDownHoverDelegate);
this._cancelDelegate=Function.createDelegate(this,this._cancelEvent);
$addHandler(this.get_childListElement(),"selectstart",this._cancelDelegate);
$addHandler(this.get_childListElement(),"dragstart",this._cancelDelegate);
this._onDropDownOutDelegate=Function.createDelegate(this,this._onDropDownOut);
$addHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate);
}
this._onTableHoverDelegate=Function.createDelegate(this,this._onTableHover);
$addHandler(this.get_tableElement(),"mouseover",this._onTableHoverDelegate);
this._onTableOutDelegate=Function.createDelegate(this,this._onTableOut);
$telerik.addExternalHandler(this.get_tableElement(),"mouseout",this._onTableOutDelegate);
this._onPropertyChangeDelegate=Function.createDelegate(this,this._onInputPropertyChange);
$addHandler(this.get_inputDomElement(),"propertychange",this._onPropertyChangeDelegate);
this._onFocusDelegate=Function.createDelegate(this,this._onFocus);
$addHandler(this.get_inputDomElement(),"focus",this._onFocusDelegate);
this._onDocumentClickDelegate=Function.createDelegate(this,this._onDocumentClick);
if($telerik.isIE){
document.attachEvent("onmousedown",this._onDocumentClickDelegate);
document.attachEvent("oncontextmenu",this._onDocumentClickDelegate);
}else{
$addHandler(document,"mousedown",this._onDocumentClickDelegate);
$addHandler(document,"contextmenu",this._onDocumentClickDelegate);
}
this._onDropDownScrollDelegate=Function.createDelegate(this,this._onDropDownScroll);
$addHandler(this.get_childListElementWrapper(),"scroll",this._onDropDownScrollDelegate);
this._eventMap.addHandlerForClassName("click","rcbInput",this._onInputClick);
this._eventMap.addHandlerForClassName("keydown","rcbInput",this._onKeyDown);
if(!$telerik.isIE){
this._eventMap.addHandlerForClassName("input","rcbInput",this._onInputChange);
}
if(this.get_imageDomElement()){
this._onImageClickDelegate=Function.createDelegate(this,this._onImageClick);
$addHandler(this.get_imageDomElement(),"click",this._onImageClickDelegate);
}
this._onWindowResizeDelegate=Function.createDelegate(this,this._onWindowResize);
$addHandler(window,"resize",this._onWindowResizeDelegate);
this._onWindowUnloadDelegate=Function.createDelegate(this,this._onWindowUnload);
$addHandler(window,"unload",this._onWindowUnloadDelegate);
if(this._openDropDownOnLoad){
this._onOpenOnLoad=Function.createDelegate(this,this.showDropDown);
$addHandler(window,"load",this._onOpenOnLoad);
}
if(this.get_moreResultsBoxElement()){
this._onMoreResultsBoxClickDelegate=Function.createDelegate(this,this._onMoreResultsBoxClick);
$addHandler(this.get_moreResultsBoxElement(),"click",this._onMoreResultsBoxClickDelegate);
this._onMoreResultsBoxOverDelegate=Function.createDelegate(this,this._onMoreResultsBoxOver);
$addHandler(this.get_moreResultsBoxElement(),"mouseover",this._onMoreResultsBoxOverDelegate);
this._onMoreResultsBoxOutDelegate=Function.createDelegate(this,this._onMoreResultsBoxOut);
$addHandler(this.get_moreResultsBoxElement(),"mouseout",this._onMoreResultsBoxOutDelegate);
}
if(this._openDropDownOnLoad&&!this.get_dropDownVisible()){
this.showDropDown();
}
var me=this;
Array.add(Telerik.Web.UI.RadComboBox.ComboBoxes,this);
if(this._fireEvents){
this.raiseEvent("load",null);
}
this.get_element().value=this._text;
},_applyZIndex:function(){
var _23=this.get_element().style.zIndex;
var _24=this.get_dropDownElement().parentNode.style.zIndex;
if(_23==0){
_23=_24;
}
this.get_dropDownElement().parentNode.style.zIndex=_23;
},_initializeAnimation:function(){
var _25=this._getAnimatedElement();
if(_25){
this._slide=new Telerik.Web.UI.Slide(_25,this.get_expandAnimation(),this.get_collapseAnimation());
this._slide.initialize();
this._slide.set_direction(this.get_slideDirection());
}
this._expandAnimationEndedDelegate=Function.createDelegate(this,this._onExpandAnimationEnded);
this._slide.add_expandAnimationEnded(this._expandAnimationEndedDelegate);
this._expandAnimationStartedDelegate=Function.createDelegate(this,this._onExpandAnimationStarted);
this._slide.add_expandAnimationStarted(this._expandAnimationStartedDelegate);
},_onExpandAnimationEnded:function(_26,e){
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().style.overflow="auto";
if(this.get_selectedItem()){
this.get_selectedItem().scrollOnTop();
}
}
},_onExpandAnimationStarted:function(_28,e){
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().style.overflow="hidden";
}
},_requiresRightToLeft:function(){
var _2a=this.get_element();
while(_2a.nodeType!==9){
if(_2a.dir=="rtl"){
return true;
}
_2a=_2a.parentNode;
}
return false;
},_initRightToLeft:function(){
this._rightToLeft=true;
if(this._skin){
this.get_element().className=String.format("{0} RadComboBox_{1}_rtl",this.get_element().className,this._skin);
this.get_dropDownElement().className=String.format("{0} RadComboBoxDropDown_{1}_rtl",this.get_dropDownElement().className,this._skin);
}
if(this.get_imageDomElement()){
if(Sys.UI.DomElement.containsCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellRight")){
this._replaceCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellRight","rcbArrowCellLeft");
this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellRight";
}else{
this._replaceCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellLeft","rcbArrowCellRight");
this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellLeft";
}
}
},_replaceCssClass:function(_2b,_2c,_2d){
_2b.className=_2b.className.replace(_2c,_2d);
},dispose:function(){
Array.remove(Telerik.Web.UI.RadComboBox.ComboBoxes,this);
if(this._expandAnimationEndedDelegate){
if(this._slide){
this._slide.remove_expandAnimationEnded(this._expandAnimationEndedDelegate);
}
this._expandAnimationEndedDelegate=null;
}
if(this._expandAnimationStartedDelegate){
if(this._slide){
this._slide.remove_expandAnimationStarted(this._expandAnimationStartedDelegate);
}
this._expandAnimationStartedDelegate=null;
}
$removeHandler(window,"unload",this._onWindowUnloadDelegate);
$removeHandler(window,"resize",this._onWindowResizeDelegate);
$removeHandler(this.get_inputDomElement(),"propertychange",this._onPropertyChangeDelegate);
$removeHandler(this.get_inputDomElement(),"focus",this._onFocusDelegate);
if($telerik.isIE){
document.detachEvent("onmousedown",this._onDocumentClickDelegate);
document.detachEvent("oncontextmenu",this._onDocumentClickDelegate);
}else{
$removeHandler(document,"mousedown",this._onDocumentClickDelegate);
$removeHandler(document,"contextmenu",this._onDocumentClickDelegate);
}
if(this.get_childListElement()){
$removeHandler(this.get_childListElement(),"click",this._onDropDownClickDelegate);
$removeHandler(this.get_childListElement(),"mouseover",this._onDropDownHoverDelegate);
$removeHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate);
$removeHandler(this.get_childListElement(),"selectstart",this._cancelDelegate);
$removeHandler(this.get_childListElement(),"dragstart",this._cancelDelegate);
}
if(this.get_tableElement()){
$removeHandler(this.get_tableElement(),"mouseover",this._onTableHoverDelegate);
$telerik.removeExternalHandler(this.get_tableElement(),"mouseout",this._onTableOutDelegate);
}
if(this.get_imageDomElement()){
$removeHandler(this.get_imageDomElement(),"click",this._onImageClickDelegate);
}
if(this._openDropDownOnLoad){
$removeHandler(window,"load",this._onOpenOnLoad);
}
if(this.get_moreResultsBoxElement()){
$removeHandler(this.get_moreResultsBoxElement(),"click",this._onMoreResultsBoxClickDelegate);
$removeHandler(this.get_moreResultsBoxElement(),"mouseover",this._onMoreResultsBoxOverDelegate);
$removeHandler(this.get_moreResultsBoxElement(),"mouseout",this._onMoreResultsBoxOutDelegate);
}
$removeHandler(this.get_childListElementWrapper(),"scroll",this._onDropDownScrollDelegate);
if(this._slide){
this._slide.dispose();
this._slide=null;
}
this._removeDropDown();
this._disposed=true;
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"dispose");
this._tableElement._events=null;
this._inputDomElement._events=null;
this._imageDomElement._events=null;
this._childListElementWrapper._events=null;
},_cancelEvent:function(e){
e.preventDefault();
return false;
},_onDropDownScroll:function(e){
if(!this._virtualScroll||this._ajaxRequest||this._endOfItems){
return;
}
var _30=this.get_items().get_count();
var _31=22;
var _32=0;
if(_30>0){
_31=this.get_items().getItem(0).get_element().offsetHeight;
_32=this.get_items().getItem(_30-1).get_element().offsetTop;
}
var _33=$telerik.getFirstChildByTagName(this.get_childListElement(),"div",0);
if(_33){
var _34=_33.offsetHeight;
if(this.get_childListElementWrapper().scrollTop+_34>=this.get_childListElement().offsetHeight-_34){
this.requestItems(this.get_text(),true);
}
}
},_detachDropDown:function(){
if((!document.readyState||document.readyState=="complete")&&(!this._isDetached)){
var _35=this._findParentForm()||document.body;
var _36=this.get_dropDownElement();
var _37=this.get_dropDownElement().parentNode;
_37.parentNode.removeChild(_37);
_37.style.marginLeft="0";
_35.insertBefore(_37,_35.firstChild);
this._isDetached=true;
}
},_removeDropDown:function(){
var _38=this.get_dropDownElement().parentNode;
_38.parentNode.removeChild(_38);
if(this._disposeChildElements){
Sys.WebForms.PageRequestManager.getInstance()._destroyTree(_38);
}
if(!$telerik.isSafari){
_38.outerHTML=null;
}
this._dropDownElement=null;
},attachDropDown:function(){
var _39=this.get_dropDownElement().parentNode;
_39.parentNode.removeChild(_39);
this.get_tableElement().parentNode.appendChild(_39);
},_findParentForm:function(){
var _3a=this.get_element();
while(_3a&&_3a.tagName&&_3a.tagName.toLowerCase()!="form"){
_3a=_3a.parentNode;
}
if(!_3a.tagName){
_3a=null;
}
return _3a;
},_findNearestItem:function(_3b){
while(_3b.nodeType!==9){
if(_3b._item&&Telerik.Web.UI.RadComboBoxItem.isInstanceOfType(_3b._item)){
return _3b._item;
}
_3b=_3b.parentNode;
}
return null;
},_positionDropDown:function(){
this._detachDropDown();
var _3c=this.get_element();
var _3d=this._getAnimationContainer();
_3d.style.position="absolute";
var _3e=$telerik.getLocation(_3c);
var _3f=this.get_dropDownElement();
var _40=this.get_element().offsetWidth;
if(this._dropDownWidth){
_40=this._dropDownWidth;
}
var _41=this.get_childListElement();
var _42=this.get_childListElementWrapper();
var _43=_3e.y+this.get_offsetY()+this.get_element().offsetHeight;
_3d.style.top=_43+"px";
_3d.style.left=_3e.x+this.get_offsetX()+"px";
if(this._rightToLeft&&document.body.dir=="rtl"){
_3d.style.left="";
_3d.style.left=_3e.x+this.get_offsetX()-this._getScrollBarWidth()+"px";
}
_3f.style.display="block";
_3f.style.width=_40+"px";
var _44=0;
if(!this._dropDownWidth){
_44=_3f.offsetWidth-_40;
}
if(_44>0&&_44<_40){
_3f.style.width=_40-_44+"px";
}
if(this._rightToLeft){
_3f.dir="rtl";
}
this._determineScreenBoundaryDetection();
},_calculateItemsHeight:function(){
var _45=0;
var _46=this.get_items().get_count();
for(var i=0;i<_46;i++){
_45+=this.get_items().getItem(i).get_element().offsetHeight;
}
return _45;
},_calculateDropDownAutoHeight:function(){
var _48=this.get_dropDownElement();
var _49=this._getAnimationContainer();
var _4a=$telerik.getLocation(this.get_element());
var _49=this._getAnimationContainer();
var _4b=$telerik.getLocation(_49);
var _4c=$telerik.getViewPortSize();
var y=_4a.y-_48.offsetHeight;
var _4e=_4c.height-_4b.y;
var _4f=_4b.y-this.get_element().offsetHeight;
var _50=_4e;
var _51=false;
var _52=0;
if(this._getHeaderElement()){
_52=_52+this._getHeaderElement().offsetHeight;
_51=true;
}
if(this._getFooterElement()){
_52=_52+this._getFooterElement().offsetHeight;
_51=true;
}
if(this.get_moreResultsBoxElement()){
_52=_52+this.get_moreResultsBoxElement().offsetHeight;
_51=true;
}
if(this._enableScreenBoundaryDetection&&_4e<_4f){
_50=_4f;
}
if(!(_50>=0&&(this.get_childListElement().offsetHeight+_52)>=_50)){
_50=this.get_childListElement().offsetHeight+_52;
}
if(_51&&_52<_50){
this.get_childListElementWrapper().style.height=_50-_52+"px";
}else{
this.get_childListElementWrapper().style.height=_50+"px";
}
return _50;
},_determineScreenBoundaryDetection:function(){
var _53=this.get_dropDownElement();
var _54=this._getAnimationContainer();
var _55=$telerik.getLocation(this.get_element());
var _54=this._getAnimationContainer();
var _56=$telerik.getLocation(_54);
var _57=$telerik.getViewPortSize();
var _58=_53.offsetHeight;
if(this._height==""&&this.get_childListElement()){
if(this._maxHeight==""||this._calculateItemsHeight()<this._maxHeight){
this._cachedOffsetHeight=_58;
_58=this._calculateDropDownAutoHeight();
}else{
if(this._maxHeight!=""){
if(this._cachedOffsetHeight!=""){
_58=this._cachedOffsetHeight;
}
this.get_dropDownElement().style.height="";
this.get_childListElementWrapper().style.height=this._maxHeight;
}
}
}
if(this._enableScreenBoundaryDetection){
if(this._elementOverflowsBottom(_57,_53,this.get_inputDomElement())){
var y=_55.y-_58;
if(y>=0){
this.set_slideDirection(Telerik.Web.UI.SlideDirection.Up);
this._getAnimationContainer().style.height=this.get_dropDownElement().offsetHeight;
this._getAnimationContainer().style.top=_55.y-this.get_offsetY()-_53.offsetHeight+"px";
if(window.netscape&&!window.opera){
this._getAnimationContainer().style.top=_55.y-this.get_offsetY()-_53.offsetHeight+2+"px";
}
if(this._height==""&&(this._maxHeight==""||this._calculateItemsHeight()<this._maxHeight)&&_58==_56.y-this.get_element().offsetHeight){
this._getAnimationContainer().style.top="0px";
}
}else{
this.set_slideDirection(Telerik.Web.UI.SlideDirection.Down);
}
}else{
this.set_slideDirection(Telerik.Web.UI.SlideDirection.Down);
}
}
this.set_dropDownVisible(true);
},_getScrollBarWidth:function(){
var _5a,_5b=0;
var _5c=document.createElement("div");
_5c.style.position="absolute";
_5c.style.top="-1000px";
_5c.style.left="-1000px";
_5c.style.width="100px";
_5c.style.height="50px";
_5c.style.overflow="hidden";
var _5d=document.createElement("div");
_5d.style.width="100%";
_5d.style.height="200px";
_5c.appendChild(_5d);
document.body.appendChild(_5c);
var _5e=_5d.offsetWidth;
_5c.style.overflow="auto";
var _5f=_5d.offsetWidth;
this._scrollbarWidth=_5e-_5f;
if(this._scrollbarWidth<=0){
_5d.style.width="300px";
_5a=_5c.offsetWidth;
_5b=_5c.clientWidth;
this._scrollbarWidth=_5a-_5b;
}
if(this._scrollbarWidth<=0){
this._scrollbarWidth=16;
}
document.body.removeChild(document.body.lastChild);
return this._scrollbarWidth;
},_elementOverflowsBottom:function(_60,_61,_62){
var _63=$telerik.getLocation(_62).y+_61.offsetHeight;
return _63>_60.height;
},_selectFirstMatch:function(){
var _64=this._findItemToSelect();
if(_64&&_64.get_enabled()&&!_64.get_isSeparator()){
_64.highlight();
_64.scrollOnTop();
this.set_selectedItem(_64);
}
},_findItemToSelect:function(){
var _65=this.findItemByValue(this.get_value());
if(!_65){
_65=this.findItemByText(this.get_text());
}
return _65;
},clearItems:function(){
this.get_items().clear();
this._itemData=null;
},clearSelection:function(){
this.set_text("");
this.set_value("");
this.set_selectedItem(null);
this.set_highlightedItem(null);
},decodeText:function(_66){
var _67=_66;
var _68={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":"\""};
for(var _69 in _68){
_67=_67.replace(new RegExp(_69,"g"),_68[_69]);
}
return _67;
},_findNextAvailableIndex:function(_6a,_6b){
var _6c=this.get_visibleItems();
for(var i=_6a,_6e=_6c.length;i<_6e;i++){
if(_6c[i].get_enabled()&&!_6c[i].get_isSeparator()){
if(_6b==null){
return i;
}
if(_6b&&_6c[i].get_text().indexOf(_6b)==0){
return i;
}
}
}
return _6c.length;
},_findPrevAvailableIndex:function(_6f){
var _70=this.get_visibleItems();
if(_70.length<1){
return -1;
}
for(var i=_6f;i>=0;i--){
if(_70[i].get_enabled()&&!_70[i].get_isSeparator()){
return i;
}
}
return -1;
},_onDropDownClick:function(e){
if(this._eventMap.skipElement(e,null)){
return;
}
if(!this._enabled){
return;
}
var _73=this._findNearestItem(e.target);
if(!_73||!_73.get_enabled()||_73.get_isSeparator()){
return;
}
try{
this.get_inputDomElement().focus();
}
catch(e){
}
this._performSelect(_73,e);
this._hideDropDown(e);
if(!this.get_isTemplated()&&this.get_filter()!=Telerik.Web.UI.RadComboBoxFilter.None&&e.stopPropagation){
e.stopPropagation();
}
},_onDropDownHover:function(e){
if(!this._enabled||this._ajaxRequest){
return;
}
var _75=this._findNearestItem(e.target);
if(!_75||!_75.get_enabled()||_75.get_isSeparator()){
return;
}
_75.highlight();
},_onDropDownOut:function(e){
if(!this._enabled){
return;
}
if(!e){
e=event;
}
var _77=this._getRelatedTarget(e);
if(!_77){
return;
}
while(_77&&_77.nodeType!==9){
if(_77.parentNode==this.get_dropDownElement()){
return;
}
_77=_77.parentNode;
}
var _78=this.get_highlightedItem();
if(_78){
_78.unHighlight();
}
},_onTableHover:function(e){
if(!this._enabled){
return;
}
var _7a=this.get_tableElement();
if(_7a!=null&&_7a.className!="rcbFocused"){
_7a.className="rcbHovered";
}
},_onTableOut:function(e){
if(!this._enabled){
return;
}
if(!e){
e=event;
}
var _7c=this.get_tableElement();
var _7d=e.target||e.srcElement;
var _7e=this._getRelatedTarget(e);
if(!_7e){
return;
}
while(_7e&&_7e.nodeType!==9){
if(_7e.parentNode&&_7e.parentNode==_7c){
return;
}
_7e=_7e.parentNode;
}
if(_7c!=null&&_7c.className=="rcbHovered"){
_7c.className="";
}
},_getRelatedTarget:function(e){
var _80=e.toElement||e.relatedTarget||e.fromElement;
if(!_80){
return null;
}
try{
var _81=_80.tagName;
}
catch(ex){
_80=null;
}
return _80;
},_onDocumentClick:function(e){
if(!e){
e=event;
}
var _83=e.target||e.srcElement;
while(_83.nodeType!==9){
if(_83.parentNode==null||_83==this.get_element()||_83==this.get_dropDownElement()){
return;
}
_83=_83.parentNode;
}
if(this._focused){
this._raiseClientBlur(e);
this._selectItemOnBlur(e);
this._focused=false;
}
if(this.get_dropDownVisible()&&this.get_closeDropDownOnBlur()){
this._hideDropDown(e);
}
},_selectItemOnBlur:function(e){
var _85=this._findItemToSelect();
if(!_85&&!this.get_allowCustomText()&&this.get_items().get_count()>0){
if(this.get_markFirstMatch()){
if(this.get_text()==""){
this.set_text(this._originalText);
}
this.highlightMatches();
this.selectText(0,0);
_85=this.get_highlightedItem();
}
}
if(!this.get_allowCustomText()&&!this.get_enableLoadOnDemand()&&this.get_filter()!=Telerik.Web.UI.RadComboBoxFilter.None){
_85=this.get_highlightedItem();
if(this.get_highlightedItem()==null&&this.get_selectedItem()){
_85=this.get_selectedItem();
}else{
if(!this.get_highlightedItem()&&this.get_visibleItems().length>0){
_85=this.get_visibleItems()[0];
}
}
}
if(this.get_filter()!=Telerik.Web.UI.RadComboBoxFilter.None){
this.setAllItemsVisible(true);
}
this._performSelect(_85,e);
},_onWindowResize:function(){
if(this.get_dropDownVisible()){
this._positionDropDown();
}
},_onWindowUnload:function(){
this._disposeChildElements=false;
},_onKeyDown:function(e){
if(!this._fireEvents||this._ajaxRequest){
return;
}
if(!e){
e=event;
}
this.raise_onClientKeyPressing(e);
var _87=e.keyCode||e.which;
this._lastKeyCode=_87;
var _88=String.fromCharCode(_87);
if(_87==Telerik.Web.UI.Keys.Escape&&this.get_dropDownVisible()){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}
return;
}else{
if(_87===Telerik.Web.UI.Keys.Enter){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}
this._performSelect(this.get_highlightedItem(),e);
e.returnValue=false;
if(e.preventDefault){
e.preventDefault();
}
return;
}else{
if(_87===Telerik.Web.UI.Keys.Down){
e.returnValue=false;
if(e.altKey){
this._toggleDropDown(e);
return;
}
this.highlightNextItem(null);
if(e.preventDefault){
e.preventDefault();
}
return;
}else{
if(_87===Telerik.Web.UI.Keys.Up){
e.returnValue=false;
if(e.altKey){
this._toggleDropDown(e);
return;
}
this.highlightPreviousItem();
if(e.preventDefault){
e.preventDefault();
}
return;
}else{
if(_87===Telerik.Web.UI.Keys.Tab){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}
this._raiseClientBlur(e);
this._selectItemOnBlur(e);
this._focused=false;
return;
}
}
}
}
}
if(_87==Telerik.Web.UI.Keys.Left||_87==Telerik.Web.UI.Keys.Right){
return;
}
if(_88&&!(this.get_enableLoadOnDemand()||!this.get_readOnly())){
this.highlightNextItem(_88);
return;
}
},_onImageClick:function(e){
if(this._enabled){
if(!this.get_dropDownVisible()){
this._selectFirstMatch();
}
this._toggleDropDown(e);
}
},_onInputClick:function(e){
if(this._enabled){
this._selectFirstMatch();
this.selectText(0,this.get_text().length);
if(!this.get_dropDownVisible()&&this._showDropDownOnTextboxClick){
this._showDropDown(e);
}
return true;
}
},_onMoreResultsBoxClick:function(e){
this.requestItems(this.get_text(),true);
},_onMoreResultsBoxOver:function(e){
this.get_moreResultsBoxElement().style.cursor="pointer";
},_onMoreResultsBoxOut:function(e){
this.get_moreResultsBoxElement().style.cursor="default";
},_onFocus:function(e){
if(this._focused){
return;
}
if(this.get_emptyMessage()&&this.get_emptyMessage()==this.get_text()){
this._suppressChange=true;
this.get_inputDomElement().value=this._text;
(function(_8f){
setTimeout(function(){
_8f.get_inputDomElement().className="rcbInput";
},0);
})(this);
this._suppressChange=false;
}
var _90=this.get_tableElement();
if(_90!=null){
(function(){
setTimeout(function(){
_90.className="rcbFocused";
},0);
})();
}
if(!e&&typeof (event)!="undefined"){
e=event;
}
this._focused=true;
this.raise_onClientFocus(e);
return true;
},_raiseClientBlur:function(e){
if(this._focused){
var _92=this.get_tableElement();
if(_92!=null){
_92.className="";
}
this._applyEmptyMessage();
this.raise_onClientBlur(e);
}
},_applyEmptyMessage:function(){
if(this.get_emptyMessage()&&this.get_text()==""){
this._suppressChange=true;
this.get_inputDomElement().value=this.get_emptyMessage();
this.get_inputDomElement().className+=" rcbEmptyMessage";
this._suppressChange=false;
}
},_onInputChange:function(){
this.set_value("");
var _93=this.get_text();
if(this.get_emptyMessage()!=""&&_93!=this.get_emptyMessage()){
this._text=_93;
}
this.get_element().value=this._text;
this.updateClientState();
if(this.get_enableLoadOnDemand()&&!this._suppressChange){
var me=this;
if(this._requestTimeoutID>0){
window.clearTimeout(this._requestTimeoutID);
this._requestTimeoutID=0;
}
if(!this._showDropDownOnTextboxClick){
this._skipLoadingItems=true;
}
if(!this.get_dropDownVisible()){
this.showDropDown();
}
this._requestTimeoutID=window.setTimeout(function(){
if(me._disposed){
return;
}
me.requestItems(me.get_text(),false);
},me.get_itemRequestTimeout());
return;
}
if(!this._suppressChange){
if(this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
if(this._shouldHighlight()){
this.highlightMatches();
}
}else{
this.highlightAllMatches(this.get_text());
}
}
},_onInputPropertyChange:function(){
if(!event.propertyName){
event=event.rawEvent;
}
if(event.propertyName=="value"){
var _95=this.get_text();
if(this._cachedText!=_95){
this._cachedText=_95;
this._onInputChange(event);
}
}
},_shouldHighlight:function(){
if(this._lastKeyCode<Telerik.Web.UI.Keys.Space){
return false;
}
if(this._lastKeyCode>=Telerik.Web.UI.Keys.PageUp&&this._lastKeyCode<=Telerik.Web.UI.Keys.Del){
return false;
}
if(this._lastKeyCode>=Telerik.Web.UI.Keys.F1&&this._lastKeyCode<=Telerik.Web.UI.Keys.F12){
return false;
}
return true;
},_showDropDown:function(e){
if(this._firstOpeningOfDropDown){
this._initializeAnimation();
this._applyZIndex();
this._firstOpeningOfDropDown=false;
}
if(this.raise_dropDownOpening(e)==true){
return;
}
var _97=this._getAnimationContainer();
if(!_97){
return;
}
var _98=this.get_text();
if(this.get_emptyMessage()==this.get_text()){
_98="";
}
if(this.get_enableLoadOnDemand()&&this.get_items().get_count()==0&&!this._skipLoadingItems){
this.requestItems(_98,false);
}
_97.style.visibility="hidden";
this.get_dropDownElement().style.visibility="hidden";
this._slide.show();
this._resetAnimatedElementPosition();
this._slide.set_direction(this.get_slideDirection());
try{
this.get_inputDomElement().focus();
}
catch(e){
}
this._onFocus(e);
this.set_dropDownVisible(true);
this._positionDropDown();
var _99=this.get_dropDownElement();
_99.style.top=-_99.offsetHeight+"px";
this._slide.updateSize();
_97.style.visibility="visible";
this._slide.expand();
this.raise_dropDownOpened(e);
},_toggleDropDown:function(e){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}else{
this._showDropDown(e);
if(this.get_highlightedItem()){
this.get_highlightedItem().scrollIntoView();
}
}
},_hideDropDown:function(e){
if(!this.get_dropDownVisible()){
return;
}
if(this.raise_dropDownClosing(e)==true){
return;
}
this.get_dropDownElement().style.display="none";
if(!this._getAnimationContainer()){
return;
}
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().scrollTop=0;
}
this._slide.collapse();
this.set_dropDownVisible(false);
if(this.get_filter()!=Telerik.Web.UI.RadComboBoxFilter.None){
this._removeEmTagsFromAllItems();
}
this.raise_dropDownClosed(e);
},get_dropDownElement:function(){
if(!this._dropDownElement){
this._dropDownElement=this._getChildElement("DropDown");
}
return this._dropDownElement;
},get_inputDomElement:function(){
if(!this._inputDomElement){
this._inputDomElement=this._getChildElement("Input");
}
return this._inputDomElement;
},get_moreResultsBoxMessageElement:function(){
var box=this.get_moreResultsBoxElement();
var _9d=$telerik.getFirstChildByTagName(box,"span",0);
return _9d;
},get_moreResultsBoxElement:function(){
var box=this._getChildElement("MoreResultsBox");
return box;
},get_emptyMessage:function(){
return this._emptyMessage;
},set_emptyMessage:function(_9f){
if(this._emptyMessage!==_9f){
this._emptyMessage=_9f;
}
this._applyEmptyMessage();
},get_imageDomElement:function(){
if(!this._imageDomElement){
this._imageDomElement=this._getChildElement("Arrow");
}
return this._imageDomElement;
},get_slideDirection:function(){
return this._slideDirection;
},set_slideDirection:function(_a0){
this._slideDirection=_a0;
this._slide.set_direction(_a0);
},hideDropDown:function(){
this._hideDropDown(null);
},showDropDown:function(){
this._showDropDown(null);
},toggleDropDown:function(){
this._toggleDropDown(null);
},_resetAnimatedElementPosition:function(){
var _a1=this._getAnimatedElement();
_a1.style.top="0px";
_a1.style.left="0px";
},get_readOnly:function(){
return !(this.get_allowCustomText()||this.get_markFirstMatch())&&this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None;
},_performSelect:function(_a2,e){
if(_a2&&_a2!=this.get_selectedItem()&&!this.get_enableLoadOnDemand()){
_a2._select(e);
return;
}
if(_a2&&_a2==this.get_selectedItem()&&this.getLastWord(this.get_text())!=_a2.get_text()&&!this.get_readOnly()){
this.set_text(_a2.get_text());
return;
}
if(_a2&&_a2==this.get_selectedItem()){
return;
}
if(_a2&&this.get_originalText()!=_a2.get_text()){
_a2._select(e);
return;
}
if(_a2&&(!this.get_selectedItem()||this.get_selectedItem().get_value()!=_a2.get_value())){
_a2._select(e);
return;
}
if(this.get_originalText()!=this.get_text()){
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
if(this.raise_textChange(this,e)==true){
return;
}
var _a4={Command:"TextChanged"};
this.postback(_a4);
}
},set_value:function(_a5){
this._value=_a5;
this.updateClientState();
},get_value:function(){
return this._value;
},set_text:function(_a6){
_a6=this.decodeText(_a6);
this.get_element().value=_a6;
this._suppressChange=true;
var _a7=this.get_inputDomElement();
_a7.value=_a6;
this.set_value("");
if(_a7.fireEvent&&document.createEventObject){
var _a8=document.createEventObject();
_a7.fireEvent("onchange",_a8);
}else{
if(_a7.dispatchEvent){
var _a9=true;
var _a8=document.createEvent("HTMLEvents");
_a8.initEvent("change",_a9,true);
_a7.dispatchEvent(_a8);
}
}
this._suppressChange=false;
this._text=_a6;
this.updateClientState();
},get_webServiceSettings:function(){
return this._webServiceSettings;
},set_webServiceSettings:function(_aa){
var _ab=Sys.Serialization.JavaScriptSerializer.deserialize(_aa);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(_ab);
},get_text:function(){
return this.get_inputDomElement().value;
},enable:function(){
this.get_inputDomElement().disabled=false;
var _ac=this.get_tableElement();
if(_ac!=null){
_ac.className="";
}
this.set_enabled(true);
this.enableEvents();
var _ad=this.get_items().get_count();
for(var i=0;i<_ad;i++){
this._children.getItem(i).enable();
}
},disable:function(){
var _af=this.get_tableElement();
if(_af!=null){
_af.className="rcbDisabled";
}
this.set_enabled(false);
this.get_inputDomElement().disabled="disabled";
this.disableEvents();
var _b0=this.get_items().get_count();
for(var i=0;i<_b0;i++){
this._children.getItem(i).disable();
}
},set_enabled:function(_b2){
this._enabled=_b2;
this.updateClientState();
},get_enabled:function(){
return this._enabled;
},disableEvents:function(){
this._fireEvents=false;
},enableEvents:function(){
this._fireEvents=true;
},findItemByText:function(_b3){
var _b4=this.get_items();
var _b5=_b4.get_count();
for(var i=0;i<_b5;i++){
if(_b4.getItem(i).get_text()==_b3){
return _b4.getItem(i);
}
}
return null;
},findItemByValue:function(_b7){
if(!_b7){
return null;
}
var _b8=this.get_items();
var _b9=_b8.get_count();
for(var i=0;i<_b9;i++){
if(_b8.getItem(i).get_value()==_b7){
return _b8.getItem(i);
}
}
return null;
},_getAnimationContainer:function(){
if(!this._animationContainer){
if(this.get_dropDownElement()){
this._animationContainer=this.get_dropDownElement().parentNode;
}
}
return this._animationContainer;
},highlightPreviousItem:function(){
var _bb=this.get_visibleItems();
var _bc=this.get_highlightedItem();
var _bd=0;
if(_bc){
var _be=_bb.length;
for(var i=0;i<_be;i++){
if(_bb[i]==_bc){
_bd=i-1;
}
}
}
_bd=this._findPrevAvailableIndex(_bd);
if(_bd>=0){
_bb[_bd].highlight();
_bb[_bd].scrollIntoView();
var _c0=this._getLastSeparatorIndex(this.get_text());
var _c1=this.get_text().substring(0,_c0+1)+_bb[_bd].get_text();
if(this.get_changeText()){
this.set_text(_c1);
this.set_value(_bb[_bd].get_value());
}
}
},highlightNextItem:function(_c2){
var _c3=this.get_visibleItems();
var _c4=this.get_highlightedItem();
var _c5=0;
if(_c4){
var _c6=_c3.length;
for(var i=0;i<_c6;i++){
if(_c3[i]==_c4){
_c5=i+1;
}
}
}
_c5=this._findNextAvailableIndex(_c5,_c2);
if(_c2&&_c5==_c3.length){
_c5=this._findNextAvailableIndex(0,_c2);
}
if(_c5<_c3.length){
_c3[_c5].highlight();
_c3[_c5].scrollIntoView();
var _c8=this._getLastSeparatorIndex(this.get_text());
var _c9=this.get_text().substring(0,_c8+1)+_c3[_c5].get_text();
if(this.get_changeText()){
this.set_text(_c9);
this.set_value(_c3[_c5].get_value());
}
}
},findFirstMatch:function(_ca){
if(!_ca){
return null;
}
var _cb=this.get_items();
var _cc=_cb.get_count();
for(var i=0;i<_cc;i++){
if(_cb.getItem(i).get_text().length<_ca.length){
continue;
}
if(_cb.getItem(i).get_enabled()==false||_cb.getItem(i).get_isSeparator()){
continue;
}
var _ce=_cb.getItem(i).get_text().substring(0,_ca.length);
if(!this.get_isCaseSensitive()){
if(_ce.toLowerCase()==_ca.toLowerCase()){
return _cb.getItem(i);
}
}else{
if(_ce==_ca){
return _cb.getItem(i);
}
}
}
return null;
},highlightAllMatches:function(_cf){
if(this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
return;
}
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
var _d0=this.getLastWord(_cf);
if(this._getLastSeparator(_cf)==_cf.charAt(_cf.length-1)){
this._removeEmTagsFromAllItems();
this.setAllItemsVisible(true);
return;
}
this.get_items().forEach(function(_d1,_d2){
_d1._markText(_d0);
});
if(this.get_markFirstMatch()){
this.highlightFirstValidMatch();
}
},highlightFirstValidMatch:function(){
if(this.get_text().length>0){
var _d3=this.get_visibleItems();
var _d4=_d3.length;
for(var _d5=0;_d5<_d4;_d5++){
var _d6=_d3[_d5];
if(_d6.get_enabled()==true){
_d6.highlight();
return;
}
}
}
},setAllItemsVisible:function(_d7){
var _d7=_d7;
this.get_items().forEach(function(_d8){
_d8.set_visible(_d7);
});
},_removeEmTagsFromAllItems:function(){
if(this.get_isTemplated()||this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
return;
}
this.get_items().forEach(function(_d9){
_d9.set_text(_d9.get_text());
});
},highlightMatches:function(){
if(!this.get_markFirstMatch()){
return;
}
var _da=this.get_text();
var _db=this.getLastWord(_da);
if(this._getLastSeparator(_da)==_da.charAt(_da.length-1)){
return;
}
var _dc=this.findFirstMatch(_db);
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
if(!_dc){
if(!this.get_allowCustomText()&&!this.get_enableLoadOnDemand()){
if(_da){
var _dd=this._getLastSeparatorIndex(_da);
if(_dd<_da.length-1){
var _de=_da.substring(0,_da.length-1);
if(_de==""&&$telerik.isSafari){
var me=this;
window.setTimeout(function(){
me.set_text(_de);
},0);
}else{
this.set_text(_de);
this.highlightMatches();
}
}
}
}
return;
}
_dc.highlight();
_dc.scrollOnTop();
var _dd=this._getLastSeparatorIndex(_da);
var _e0=_da.substring(0,_dd+1)+_dc.get_text();
if(_da!=_e0){
this.set_text(_e0);
}
this.set_value(_dc.get_value());
var _e1=_dd+_db.length+1;
var _e2=_e0.length-_e1;
this.selectText(_e1,_e2);
},postback:function(_e3){
if(!this._postBackReference){
return;
}
var _e4=this._postBackReference.replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(_e3));
eval(_e4);
},_getLastSeparator:function(_e5){
if(!this.get_autoCompleteSeparator()){
return null;
}
var _e6=this._getLastSeparatorIndex(_e5);
return _e5.charAt(_e6);
},getLastWord:function(_e7){
var _e8=-1;
if(this.get_autoCompleteSeparator()!=null){
_e8=this._getLastSeparatorIndex(_e7);
}
var _e9=_e7.substring(_e8+1,_e7.length);
return _e9;
},get_lastWord:function(){
var _ea=this.getLastWord(this.get_text());
return _ea;
},_getLastSeparatorIndex:function(_eb){
var _ec=-1;
if(!this.get_autoCompleteSeparator()){
return _ec;
}
for(var i=0,_ee=this.get_autoCompleteSeparator().length;i<_ee;i++){
var _ef=this.get_autoCompleteSeparator().charAt(i);
var _f0=_eb.lastIndexOf(_ef);
if(_f0>_ec&&!this._checkIsThisPartOfWord(_f0,_ef)){
_ec=_f0;
}
}
return _ec;
},_checkIsThisPartOfWord:function(_f1,_f2){
var _f3="";
if(this.get_selectedItem()){
_f3=this.get_selectedItem().get_text();
}
var _f4=_f3.lastIndexOf(_f2);
if(_f4>-1&&_f4==_f1){
return true;
}
return false;
},selectText:function(_f5,_f6){
if(!this.get_enableTextSelection()){
return;
}
if(this.get_inputDomElement().createTextRange){
var _f7=this.get_inputDomElement().createTextRange();
if(_f5==0&&_f6==0){
_f7.collapse(true);
return;
}
_f7.moveStart("character",_f5);
_f7.moveEnd("character",_f6);
_f7.select();
}else{
this.get_inputDomElement().setSelectionRange(_f5,_f5+_f6);
}
},_childRemoving:function(_f8){
var _f9=_f8.get_index();
if(this._itemData){
Array.remove(this._itemData,this._itemData[_f9]);
}
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"_childRemoving",[_f8]);
},_childRemoved:function(_fa,_fb){
var _fc=_fa.get_element();
if(_fa==this.get_selectedItem()){
this.set_selectedItem(null);
this.set_highlightedItem(null);
this.set_text("");
}
if(_fb.get_items().get_count()==0&&!this._getHeaderElement()&&!this._getFooterElement()){
_fc=_fb._childListElement;
_fb._childListElement=null;
}
if(_fc){
_fc.innerHTML="";
if(_fc.parentNode){
_fc.parentNode.removeChild(_fc);
}
_fc=null;
}
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"_childRemoved",[_fa,_fb]);
},_childrenCleared:function(_fd){
this.set_selectedItem(null);
this.set_highlightedItem(null);
var _fe=_fd.get_childListElement();
var _ff=_fd.get_items().get_count();
if(_fe&&!this._getHeaderElement()&&!this._getFooterElement()){
for(var i=0;i<_ff;i++){
_fd.get_items().getItem(i)._dispose();
}
_fe.innerHTML="";
_fe=null;
}else{
if(_fe){
for(var i=0;i<_ff;i++){
this._childRemoved(_fd.get_items().getItem(i),_fd);
}
}
}
},_createChildControls:function(){
this._children=new Telerik.Web.UI.RadComboBoxItemCollection(this);
Telerik.Web.UI.RadComboBox._createChildControls(this,this._children);
},_ensureChildControls:function(){
if(!this._childControlsCreated){
this._createChildControls();
this._childControlsCreated=true;
if(!this._setSelectedItem){
this._setSelectedItem=true;
this._setFirstSelectedItem();
}
}
},_createChildListElement:function(){
var _101=document.createElement("ul");
_101.className="rcbList";
this.get_childListElementWrapper().appendChild(_101);
this._onDropDownClickDelegate=Function.createDelegate(this,this._onDropDownClick);
$addHandler(this.get_childListElement(),"click",this._onDropDownClickDelegate);
this._onDropDownHoverDelegate=Function.createDelegate(this,this._onDropDownHover);
$addHandler(this.get_childListElement(),"mouseover",this._onDropDownHoverDelegate);
this._cancelDelegate=Function.createDelegate(this,this._cancelEvent);
$addHandler(this.get_childListElement(),"selectstart",this._cancelDelegate);
$addHandler(this.get_childListElement(),"dragstart",this._cancelDelegate);
this._onDropDownOutDelegate=Function.createDelegate(this,this._onDropDownOut);
$addHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate);
},_setFirstSelectedItem:function(){
var item=this.findItemByText(this._text);
if(item&&!item.get_isSeparator()){
this.set_selectedItem(item);
}
},get_childListElement:function(){
if(!this._childListElement){
var _103=this.get_childListElementWrapper();
this._childListElement=$telerik.getFirstChildByTagName(_103,"ul",0);
}
return this._childListElement;
},get_childListElementWrapper:function(){
if(!this._childListElementWrapper){
var _104=this.get_dropDownElement();
if(this._getHeaderElement()){
this._childListElementWrapper=$telerik.getFirstChildByTagName(_104,"div",1);
}else{
this._childListElementWrapper=$telerik.getFirstChildByTagName(_104,"div",0);
}
}
return this._childListElementWrapper;
},_getHeaderElement:function(){
if(this.get_dropDownElement()){
return $telerik.getChildByClassName(this.get_dropDownElement(),"rcbHeader",0);
}
return null;
},_getFooterElement:function(){
if(this.get_dropDownElement()){
return $telerik.getChildByClassName(this.get_dropDownElement(),"rcbFooter",0);
}
return null;
},get_tableElement:function(){
if(!this._tableElement){
this._tableElement=$telerik.getFirstChildByTagName(this.get_element(),"table",0);
}
return this._tableElement;
},get_expandAnimation:function(){
return this._expandAnimation;
},set_expandAnimation:function(_105){
var _106=Sys.Serialization.JavaScriptSerializer.deserialize(_105);
this._expandAnimation=new Telerik.Web.UI.AnimationSettings(_106);
},get_collapseAnimation:function(){
return this._collapseAnimation;
},set_collapseAnimation:function(_107){
var _108=Sys.Serialization.JavaScriptSerializer.deserialize(_107);
this._collapseAnimation=new Telerik.Web.UI.AnimationSettings(_108);
},_getAnimatedElement:function(){
if(!this._animatedElement){
this._animatedElement=this.get_dropDownElement();
}
return this._animatedElement;
},get_items:function(){
return this._getChildren();
},get_visibleItems:function(){
var _109=[];
var _10a=this._getChildren().get_count();
for(var i=0;i<_10a;i++){
var item=this._getChildren().getItem(i);
if(item.get_visible()){
Array.add(_109,item);
}
}
return _109;
},set_items:function(_10d){
this._children=_10d;
},get_itemData:function(){
return this._itemData;
},set_itemData:function(_10e){
this._itemData=_10e;
},get_itemRequestTimeout:function(){
return this._itemRequestTimeout;
},set_itemRequestTimeout:function(_10f){
this._itemRequestTimeout=_10f;
},get_appendItems:function(){
return this._appendItems;
},set_appendItems:function(_110){
this._appendItems=_110;
},get_selectedItem:function(){
if(!this._setSelectedItem){
this._setSelectedItem=true;
this._setFirstSelectedItem();
}
return this._selectedItem;
},set_selectedItem:function(_111){
this._selectedItem=_111;
},get_selectedIndex:function(){
var _112=this.get_selectedItem();
if(_112){
return _112.get_index();
}
return this._selectedIndex;
},set_selectedIndex:function(_113){
this._selectedIndex=_113;
},get_causesValidation:function(){
return this._causesValidation;
},set_causesValidation:function(_114){
this._causesValidation=_114;
},get_closeDropDownOnBlur:function(){
return this._closeDropDownOnBlur;
},set_closeDropDownOnBlur:function(_115){
this._closeDropDownOnBlur=_115;
},get_isTemplated:function(){
return this._isTemplated;
},set_isTemplated:function(_116){
this._isTemplated=_116;
},get_highlightTemplatedItems:function(){
return this._highlightTemplatedItems;
},set_highlightTemplatedItems:function(_117){
this._highlightTemplatedItems=_117;
},get_enableLoadOnDemand:function(){
return this._enableLoadOnDemand;
},set_enableLoadOnDemand:function(_118){
this._enableLoadOnDemand=_118;
},get_enableItemCaching:function(){
return this._enableItemCaching;
},set_enableItemCaching:function(_119){
this._enableItemCaching=_119;
},get_allowCustomText:function(){
return this._allowCustomText;
},set_allowCustomText:function(_11a){
this._allowCustomText=_11a;
},get_changeText:function(){
return this._changeText;
},set_changeText:function(_11b){
this._changeText=_11b;
},get_markFirstMatch:function(){
return this._markFirstMatch;
},set_markFirstMatch:function(_11c){
this._markFirstMatch=_11c;
},get_filter:function(){
return this._filter;
},set_filter:function(_11d){
this._filter=_11d;
},get_enableTextSelection:function(){
return this._enableTextSelection;
},set_enableTextSelection:function(_11e){
this._enableTextSelection=_11e;
},get_originalText:function(){
return this._originalText;
},set_originalText:function(_11f){
this._originalText=_11f;
},get_highlightedItem:function(){
return this._highlightedItem;
},set_highlightedItem:function(_120){
this._highlightedItem=_120;
},get_isCaseSensitive:function(){
return this._isCaseSensitive;
},set_isCaseSensitive:function(_121){
this._isCaseSensitive=_121;
},get_dropDownVisible:function(){
return this._dropDownVisible;
},set_dropDownVisible:function(_122){
this._dropDownVisible=_122;
},get_autoCompleteSeparator:function(){
return this._autoCompleteSeparator;
},set_autoCompleteSeparator:function(_123){
this._autoCompleteSeparator=_123;
},get_showMoreMessage:function(){
return this._showMoreMessage;
},set_showMoreMessage:function(_124){
this._showMoreMessage=_124;
},get_loadingMessage:function(){
return this._loadingMessage;
},set_loadingMessage:function(_125){
this._loadingMessage=_125;
},get_errorMessage:function(){
return this._errorMessage;
},set_errorMessage:function(_126){
this._errorMessage=_126;
},set_endOfItems:function(_127){
this._endOfItems=_127;
},get_endOfItems:function(){
return this._endOfItems;
},get_clientDataString:function(){
return this._clientDataString;
},set_clientDataString:function(_128){
this._clientDataString=_128;
},get_offsetX:function(){
return this._offsetX;
},set_offsetX:function(_129){
this._offsetX=_129;
},get_offsetY:function(){
return this._offsetY;
},set_offsetY:function(_12a){
this._offsetY=_12a;
},add_keyPressing:function(_12b){
this.get_events().addHandler("keyPressing",_12b);
},remove_keyPressing:function(_12c){
this.get_events().removeHandler("keyPressing",_12c);
},raise_keyPressing:function(_12d){
this.raiseEvent("keyPressing",_12d);
},add_textChange:function(_12e){
this.get_events().addHandler("textChange",_12e);
},remove_textChange:function(_12f){
this.get_events().removeHandler("textChange",_12f);
},raise_textChange:function(_130,e){
var _130=new Telerik.Web.UI.RadComboBoxCancelEventArgs(e);
this.raiseEvent("textChange",_130);
return _130.get_cancel();
},add_selectedIndexChanging:function(_132){
this.get_events().addHandler("selectedIndexChanging",_132);
},remove_selectedIndexChanging:function(_133){
this.get_events().removeHandler("selectedIndexChanging",_133);
},raise_selectedIndexChanging:function(item,e){
var _136=new Telerik.Web.UI.RadComboBoxItemCancelEventArgs(item,e);
this.raiseEvent("selectedIndexChanging",_136);
return _136.get_cancel();
},add_selectedIndexChanged:function(_137){
this.get_events().addHandler("selectedIndexChanged",_137);
},remove_selectedIndexChanged:function(_138){
this.get_events().removeHandler("selectedIndexChanged",_138);
},raise_selectedIndexChanged:function(item,e){
var _13b=new Telerik.Web.UI.RadComboBoxItemEventArgs(item,e);
this.raiseEvent("selectedIndexChanged",_13b);
},add_itemsRequesting:function(_13c){
this.get_events().addHandler("itemsRequesting",_13c);
},remove_itemsRequesting:function(_13d){
this.get_events().removeHandler("itemsRequesting",_13d);
},add_itemsRequested:function(_13e){
this.get_events().addHandler("itemsRequested",_13e);
},remove_itemsRequested:function(_13f){
this.get_events().removeHandler("itemsRequested",_13f);
},raise_itemsRequested:function(text,e){
var _142=new Telerik.Web.UI.RadComboBoxRequestEventArgs(text,e);
this.raiseEvent("itemsRequested",_142);
},add_itemDataBound:function(_143){
this.get_events().addHandler("itemDataBound",_143);
},remove_itemDataBound:function(_144){
this.get_events().removeHandler("itemDataBound",_144);
},add_dropDownOpening:function(_145){
this.get_events().addHandler("dropDownOpening",_145);
},remove_dropDownOpening:function(_146){
this.get_events().removeHandler("dropDownOpening",_146);
},raise_dropDownOpening:function(e){
var _148=new Telerik.Web.UI.RadComboBoxCancelEventArgs(e);
this.raiseEvent("dropDownOpening",_148);
return _148.get_cancel();
},add_dropDownClosing:function(_149){
this.get_events().addHandler("dropDownClosing",_149);
},remove_dropDownClosing:function(_14a){
this.get_events().removeHandler("dropDownClosing",_14a);
},add_dropDownOpened:function(_14b){
this.get_events().addHandler("dropDownOpened",_14b);
},remove_dropDownOpened:function(_14c){
this.get_events().removeHandler("dropDownOpened",_14c);
},raise_dropDownOpened:function(e){
var _14e=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("dropDownOpened",_14e);
},add_dropDownClosed:function(_14f){
this.get_events().addHandler("dropDownClosed",_14f);
},remove_dropDownClosed:function(_150){
this.get_events().removeHandler("dropDownClosed",_150);
},raise_dropDownClosed:function(e){
var _152=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("dropDownClosed",_152);
},add_itemsRequestFailed:function(_153){
this.get_events().addHandler("itemsRequestFailed",_153);
},remove_itemsRequestFailed:function(_154){
this.get_events().removeHandler("itemsRequestFailed",_154);
},raise_itemsRequestFailed:function(text,_156,e){
var _158=new Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs(text,_156,e);
this.raiseEvent("itemsRequestFailed",_158);
return _158.get_cancel();
},raise_dropDownClosing:function(e){
var _15a=new Telerik.Web.UI.RadComboBoxCancelEventArgs(e);
this.raiseEvent("dropDownClosing",_15a);
return _15a.get_cancel();
},add_onClientFocus:function(_15b){
this.get_events().addHandler("onClientFocus",_15b);
},remove_onClientFocus:function(_15c){
this.get_events().removeHandler("onClientFocus",_15c);
},raise_onClientFocus:function(e){
var _15e=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("onClientFocus",_15e);
},add_onClientBlur:function(_15f){
this.get_events().addHandler("onClientBlur",_15f);
},remove_onClientBlur:function(_160){
this.get_events().removeHandler("onClientBlur",_160);
},raise_onClientBlur:function(e){
var _162=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("onClientBlur",_162);
},add_onClientKeyPressing:function(_163){
this.get_events().addHandler("keyPressing",_163);
},remove_onClientKeyPressing:function(_164){
this.get_events().removeHandler("keyPressing",_164);
},raise_onClientKeyPressing:function(e){
var _166=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("keyPressing",_166);
},add_load:function(_167){
this.get_events().addHandler("load",_167);
},remove_load:function(_168){
this.get_events().removeHandler("load",_168);
},_logInserted:function(item){
if(!item.get_parent()._childControlsCreated||!this._enableClientStatePersistence){
return;
}
this._log.logInsert(item);
},saveClientState:function(){
var _16a=this._log._logEntries;
var _16b={logEntries:_16a,value:this._value,text:this._text,enabled:this._enabled};
return Sys.Serialization.JavaScriptSerializer.serialize(_16b);
},requestItems:function(text,_16d){
this._ensureChildControls();
if(this._disposed){
return;
}
text=text.replace(/'/g,"&squote");
text=encodeURIComponent(text);
this._ajaxRequest=true;
var _16e={};
this.set_appendItems(_16d);
_16e.NumberOfItems=0;
if(this.get_appendItems()){
_16e.NumberOfItems=this.get_items().get_count();
}
_16e.Text=decodeURIComponent(text);
var _16f=new Telerik.Web.UI.RadComboBoxRequestCancelEventArgs(text,_16e);
this.raiseEvent("itemsRequesting",_16f);
if(_16f.get_cancel()){
this._ajaxRequest=false;
return;
}
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
if(!this._loadingDiv){
this._loadingDiv=document.createElement("li");
this._loadingDiv.className="rcbLoading";
this._loadingDiv.id=this.get_id()+"_LoadingDiv";
this._loadingDiv.innerHTML=this.get_loadingMessage();
if(!this.get_childListElement()){
this._createChildListElement();
}
this.get_childListElement().insertBefore(this._loadingDiv,this.get_childListElement().firstChild);
}
this._callbacktext=text;
if(this.get_webServiceSettings().get_method()){
this._doLoadOnDemandFromWebService(text,_16e);
}else{
this._doLoadOnDemand(text,_16e);
}
},_doLoadOnDemand:function(text,_171){
var _172=0;
if(this.get_appendItems()){
_172=this.get_items().get_count();
}
var _173={Command:"LOD",Text:text,ClientState:this._clientState,Context:_171,NumberOfItems:_172};
var _174=Function.createDelegate(this,this._onCallbackResponse);
var _175=Function.createDelegate(this,this._onErrorReceived);
if(this.get_enableItemCaching()&&this.lodHashTable[text+"$"+_172]!=null){
this._onCallbackResponse(this.lodHashTable[text+"$"+_172]);
}else{
WebForm_DoCallback(this._uniqueId,Sys.Serialization.JavaScriptSerializer.serialize(_173),_174,text,_175,true);
}
},_onCallbackResponse:function(_176){
if(this._disposed){
return;
}
this.set_selectedItem(null);
this.set_highlightedItem(null);
var _177=this._children.get_count();
var text=this.get_text();
var _179=0;
var _17a=_176.split("_$$_")[4];
if(this._callbacktext!=_17a){
this.requestItems(this._callbacktext,this.get_appendItems());
return;
}
if(this.get_appendItems()){
_179=this.get_items().get_count();
}
if(this.get_enableItemCaching()&&this.lodHashTable[_17a+"$"+_179]==null){
this.lodHashTable[_17a+"$"+_179]=_176;
}
var _17b=_176.split("_$$_");
var _17c;
if(_17b[0]=="[]"){
_17c=null;
}else{
_17c=eval(_17b[0]);
}
if(_17b[3]=="True"){
this._endOfItems=true;
}else{
this._endOfItems=false;
}
if(this.get_appendItems()&&this._itemData&&_17c){
Array.addRange(this._itemData,_17c);
}else{
this._itemData=_17c;
}
if(this._loadingDiv){
if(this._loadingDiv.parentNode){
this._loadingDiv.parentNode.removeChild(this._loadingDiv);
}
this._loadingDiv=null;
}
var _17d=this.get_childListElement();
if(!_17d){
_17d=this._createChildListElement();
}
this._childControlsCreated=true;
var _17e=$telerik.getFirstChildByTagName(_17d,"div",0);
if(_17e){
_17e.parentNode.removeChild(_17e);
}
if(this.get_appendItems()){
var _17f=document.createElement("ul");
_17f.innerHTML=_17b[1];
var _180=$telerik.getChildrenByTagName(_17f,"li");
var _181=_180.length;
for(var i=0;i<_181;i++){
_17d.appendChild(_180[i]);
this._childControlsCreated=false;
var item=new Telerik.Web.UI.RadComboBoxItem();
this._children.add(item);
item._initialize(_17c[i],_180[i]);
}
}else{
this._children.clear();
_17d.innerHTML=_17b[1];
this._childControlsCreated=false;
this._createChildControls();
}
this.set_showMoreMessage(_17b[2]);
this._setUpDropDownAfterRequest(this.get_text(),_17d,_177);
},clearCache:function(){
this.lodHashTable={};
},_setUpScroll:function(_184,_185){
var _186=22;
var _187=this.get_items().get_count();
if(_187>0){
_186=this.get_items().getItem(0).get_element().offsetHeight;
}
if(_184){
var _188=$telerik.getFirstChildByTagName(_185,"div",0);
if(_188){
_188.parentNode.removeChild(_188);
}
}else{
var _188=document.createElement("div");
if(this._height==""&&this._maxHeight!=""){
_188.style.height=this._maxHeight;
}else{
_188.style.height=this.get_childListElementWrapper().offsetHeight+"px";
}
_185.appendChild(_188);
}
},_onErrorReceived:function(_189,text){
if(this._requestTimeoutID>0){
window.clearTimeout(this._requestTimeoutID);
this._requestTimeoutID=0;
}
var _18b=this._extractErrorMessage(_189);
if(this.raise_itemsRequestFailed(text,_18b,null)==true){
return;
}
alert(_18b);
},_initializeWebServiceLoader:function(){
this._webServiceLoader=new Telerik.Web.UI.WebServiceLoader(this.get_webServiceSettings());
this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onWebServiceResponse));
this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onWebServiceError));
},_doLoadOnDemandFromWebService:function(text,_18d){
if(!this._webServiceLoader){
this._initializeWebServiceLoader();
}
var _18e={context:_18d};
var _18f=_18d.NumberOfItems;
if(this.get_enableItemCaching()&&this.lodHashTable[text+"$"+_18f]!=null){
this._addNewItems(text,this.lodHashTable[text+"$"+_18f]);
}else{
this._webServiceLoader.loadData(_18e,text);
}
},_onWebServiceResponse:function(_190,_191){
var _192=_191.get_data();
var text=_191.get_context();
var _194=0;
if(this.get_appendItems()){
_194=this.get_items().get_count();
}
if(this._callbacktext!=text){
this.requestItems(this._callbacktext,this.get_appendItems());
return;
}
if(this.get_enableItemCaching()){
this.lodHashTable[text+"$"+_194]=_192;
}
this._addNewItems(text,_192);
},_addNewItems:function(text,_196){
this.set_selectedItem(null);
this.set_highlightedItem(null);
this._childControlsCreated=true;
var _197=this.get_items().get_count();
if(this._loadingDiv){
if(this._loadingDiv.parentNode){
this._loadingDiv.parentNode.removeChild(this._loadingDiv);
}
this._loadingDiv=null;
}
if(!this.get_appendItems()){
this.clearItems();
}
var _198=this.get_childListElement();
if(!_198){
_198=this._createChildListElement();
}
if(this._virtualScroll){
this._setUpScroll(true,_198);
}
var _199=null;
if(Array.prototype.isPrototypeOf(_196)){
_199=_196;
}else{
_199=_196.Items;
this._endOfItems=_196.EndOfItems;
this._showMoreMessage=_196.Message;
}
this._childControlsCreated=false;
var html=[];
for(var i=0,_19c=_199.length;i<_19c;i++){
var item=new Telerik.Web.UI.RadComboBoxItem();
var data=_199[i];
item._loadFromDictionary(data);
this._children.add(item);
item._render(html);
}
this._childControlsCreated=true;
if(this.get_appendItems()){
_198.innerHTML=_198.innerHTML+html.join("");
}else{
_198.innerHTML=html.join("");
}
var _19f=this.get_events().getHandler("itemDataBound");
var _1a0=$telerik.getChildrenByTagName(_198,"li");
for(var i=0,_19c=this._children.get_count();i<_19c;i++){
var item=this._children.getItem(i);
item.set_element(_1a0[i]);
if(_19f){
var _1a1=new Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs(item,_199[i]);
this.raiseEvent("itemDataBound",_1a1);
}
}
this._setUpDropDownAfterRequest(text,_198,_197);
},_setUpDropDownAfterRequest:function(text,_1a3,_1a4){
if(this._virtualScroll){
this._setUpScroll(this._endOfItems,_1a3);
}
if(this.get_appendItems()){
if(this.get_items().getItem(_1a4+1)!=null){
this.get_items().getItem(_1a4+1).scrollIntoView();
}
}
if(this._showMoreResultsBox&&this.get_moreResultsBoxMessageElement()){
this.get_moreResultsBoxMessageElement().innerHTML=this.get_showMoreMessage();
}
this.raise_itemsRequested(text,null);
if(this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
this.highlightMatches();
}else{
this.highlightAllMatches(this.get_text());
}
if(this.get_dropDownVisible()){
if(this._slide){
this._slide.updateSize();
}
this._positionDropDown();
}
this._ajaxRequest=false;
},_onWebServiceError:function(_1a5,_1a6){
var _1a7=_1a6.get_message();
var text=_1a6.get_context();
this._onErrorReceived(_1a7,text);
}};
Telerik.Web.UI.RadComboBox._preInitialize=function(_1a9){
var _1aa=$get(_1a9);
if($telerik.isIE){
_1aa.style.display="inline";
}
if($telerik.isSafari||$telerik.isOpera){
_1aa.style.display="inline-block";
}
if($telerik.isFirefox){
_1aa.style.display="-moz-inline-stack";
}
};
Telerik.Web.UI.RadComboBox.registerClass("Telerik.Web.UI.RadComboBox",Telerik.Web.UI.ControlItemContainer);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadComboBoxItem=function(){
Telerik.Web.UI.RadComboBoxItem.initializeBase(this);
};
Telerik.Web.UI.RadComboBoxItem.prototype={_shouldInitializeChild:function(_1ab){
return false;
},get_text:function(){
var text=Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"get_text");
return this._removeEmTags(text);
},get_baseText:function(){
return Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"get_text");
},_removeEmTags:function(text){
var _1ae=text.indexOf("<em>");
var _1af=text.indexOf("</em>");
if(_1ae>=0&&_1af>_1ae){
text=String.format("{0}{1}{2}",text.substr(0,_1ae),text.substr(_1ae+4,_1af-_1ae-4),text.substr(_1af+5));
}
return text;
},set_visible:function(_1b0){
var _1b1=this.get_visible()!=_1b0;
if(!_1b1){
return;
}
Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"set_visible",[_1b0]);
if(_1b0){
this.get_element().style.display="";
}else{
this.get_element().style.display="none";
}
},_markText:function(text){
var _1b3=this.get_comboBox();
var _1b4=this.get_baseText();
var _1b5=this.get_text();
if(!_1b3.get_isTemplated()){
this.set_text(_1b5);
}
_1b4=_1b5;
var _1b6=_1b4.toLowerCase().indexOf(text.toLowerCase());
var _1b7=_1b3.get_filter()==Telerik.Web.UI.RadComboBoxFilter.Contains&&_1b6>=0;
var _1b8=_1b3.get_filter()==Telerik.Web.UI.RadComboBoxFilter.StartsWith&&_1b6==0;
if(_1b7||_1b8){
if(text!=""&&!_1b3.get_isTemplated()){
var _1b5=String.format("{0}<em>{1}</em>{2}",_1b4.substr(0,_1b6),_1b4.substring(_1b6,_1b6+text.length),_1b4.substr(_1b6+text.length));
this.set_text(_1b5);
}
this.set_visible(true);
}else{
this.set_visible(false);
}
},_render:function(html){
html[html.length]="<li class='";
if(this.get_enabled()){
if(this.get_isSeparator()){
html[html.length]="rcbItem rcbSeparator'>";
}else{
html[html.length]="rcbItem'>";
}
}else{
html[html.length]="rcbDisabled'>";
}
if(this.get_imageUrl()){
this._renderImage(html);
}
html[html.length]=this.get_text();
html[html.length]="</li>";
},_renderImage:function(html){
html[html.length]="<img alt='' src='"+this.get_imageUrl()+"' class='rcbImage'";
if(!this.get_enabled()){
html[html.length]=" disabled='disabled'";
}
html[html.length]="/>";
return html;
},_updateImageSrc:function(){
var _1bb=this.get_imageUrl();
if(!this.get_enabled()&&this.get_disabledImageUrl()){
_1bb=this.get_disabledImageUrl();
}
if(_1bb&&this.get_element()){
var _1bc=this.get_imageElement();
if(!_1bc){
_1bc=this._createImageElement();
}
_1bb=_1bb.replace(/&amp;/ig,"&");
if(_1bb!=_1bc.src){
_1bc.src=_1bb;
}
}
},_createImageElement:function(){
this._imageElement=document.createElement("img");
this._imageElement.className="rcbImage";
if(!this.get_enabled()){
this._imageElement.disabled="disabled";
}
var _1bd=this.get_element();
if(_1bd.firstChild){
_1bd.insertBefore(this._imageElement,_1bd.firstChild);
}else{
_1bd.appendChild(this._imageElement);
}
return this._imageElement;
},get_imageElement:function(){
if(!this._imageElement){
var _1be=this.get_element();
this._imageElement=$telerik.getFirstChildByTagName(_1be,"img",0);
}
return this._imageElement;
},get_disabledImageUrl:function(){
return this._properties.getValue("disabledImageUrl",null);
},set_disabledImageUrl:function(_1bf){
this._properties.setValue("disabledImageUrl",_1bf,true);
this._updateImageSrc();
},get_imageUrl:function(){
if(this._imageUrl=this._properties.getValue("imageUrl",null)){
return this._imageUrl;
}
if(!this._imageUrl){
var _1c0=this.get_imageElement();
if(_1c0){
this._imageUrl=_1c0.src;
}
}
return this._imageUrl;
},set_imageUrl:function(_1c1){
this._imageUrl=_1c1;
this._properties.setValue("imageUrl",_1c1,true);
this._updateImageSrc();
},get_value:function(){
return this._properties.getValue("value","");
},select:function(){
this._select(null);
},hide:function(){
this.set_visible(false);
},show:function(){
this.set_visible(true);
},_select:function(e){
if(!this.get_isEnabled()||this.get_isSeparator()){
return;
}
var _1c3=this.get_comboBox();
if(_1c3.raise_selectedIndexChanging(this,e)==true){
return;
}
var text=_1c3.get_text();
var _1c5=_1c3._getLastSeparatorIndex(text);
var _1c6=text.substring(0,_1c5+1)+this.get_text();
_1c3.set_text(_1c6);
_1c3.set_originalText(_1c6);
_1c3.set_value(this.get_value());
_1c3.set_selectedItem(this);
_1c3.set_selectedIndex(this.get_index());
this.set_selected(true);
this.highlight();
_1c3.raise_selectedIndexChanged(this,e);
var _1c7={Command:"Select",Index:this.get_index()};
_1c3.postback(_1c7);
},_createChildControls:function(){
},unHighlight:function(){
var _1c8=this.get_comboBox();
if(!_1c8.get_isTemplated()||_1c8.get_highlightTemplatedItems()){
this._replaceCssClass(this.get_element(),"rcbHovered","rcbItem");
}
_1c8.set_highlightedItem(null);
},highlight:function(){
if(!this.get_isEnabled()||this.get_isSeparator()){
return;
}
var _1c9=this.get_comboBox();
if(!_1c9.get_isTemplated()||_1c9.get_highlightTemplatedItems()){
var _1ca=_1c9.get_highlightedItem();
if(_1ca){
_1ca.unHighlight();
}
var _1cb=this.get_element();
if(_1cb){
this._replaceCssClass(_1cb,"rcbItem","rcbHovered");
}
}
_1c9.set_highlightedItem(this);
},scrollOnTop:function(){
var _1cc=this.get_element().offsetTop;
var _1cd=this.get_comboBox();
var _1ce=_1cd._getHeaderElement();
if(_1ce){
_1cc=_1cc-_1ce.offsetHeight;
}
_1cd.get_childListElementWrapper().scrollTop=_1cc;
},scrollIntoView:function(){
var _1cf=this.get_element().offsetTop;
var _1d0=this.get_element().offsetHeight;
var _1d1=this.get_comboBox().get_childListElementWrapper();
var _1d2=_1d1.scrollTop;
var _1d3=_1d1.offsetHeight;
if(_1cf+_1d0>_1d2+_1d3){
_1d1.scrollTop=_1cf+_1d0-_1d3;
if(_1d1.clientWidth<_1d1.scrollWidth){
var _1d4=Telerik.Web.UI.RadComboBox._getScrollBarWidth();
_1d1.scrollTop+=_1d4;
}
}else{
if(_1cf+_1d0<=_1d2){
_1d1.scrollTop=_1cf;
}
}
},nextItem:function(){
return this.get_comboBox().get_items().getItem(this.get_index()+1);
},_replaceCssClass:function(_1d5,_1d6,_1d7){
_1d5.className=_1d5.className.replace(_1d6,_1d7);
},_createChildListElement:function(){
var _1d8=document.createElement("ul");
this.get_combobox().get_dropDownElement().appendChild(_1d8);
},set_selected:function(_1d9){
this._properties.setValue("selected",_1d9);
},get_selected:function(){
return this._properties.getValue("selected",false);
},get_highlighted:function(){
var _1da=this.get_comboBox();
if(!_1da){
return false;
}
return _1da.get_highlightedItem()==this;
},disable:function(){
this.set_enabled(false);
this.get_element().className="rcbDisabled";
},enable:function(){
this.set_enabled(true);
this.get_element().className="rcbItem";
},set_enabled:function(_1db){
this._properties.setValue("enabled",_1db,true);
this._updateImageSrc();
},get_textElement:function(){
return this.get_element();
},get_comboBox:function(){
return this._parent;
},_getHierarchicalIndex:function(){
return this.get_index();
},get_isSeparator:function(){
return this._properties.getValue("isSeparator",false);
},set_isSeparator:function(_1dc){
this._properties.setValue("isSeparator",_1dc,true);
if(this.get_element()){
Sys.UI.DomElement.toggleCssClass(this.get_element(),"rcbSeparator");
}
}};
Telerik.Web.UI.RadComboBoxItem.registerClass("Telerik.Web.UI.RadComboBoxItem",Telerik.Web.UI.ControlItem);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadComboBoxItemCollection=function(_1dd){
Telerik.Web.UI.RadComboBoxItemCollection.initializeBase(this,[_1dd]);
};
Telerik.Web.UI.RadComboBoxItemCollection.registerClass("Telerik.Web.UI.RadComboBoxItemCollection",Telerik.Web.UI.ControlItemCollection);

