﻿Telerik.Web.UI.RadComboBoxEventArgs=function(){
Telerik.Web.UI.RadComboBoxEventArgs.initializeBase(this);
};
Telerik.Web.UI.RadComboBoxEventArgs.prototype={};
Telerik.Web.UI.RadComboBoxEventArgs.registerClass("Telerik.Web.UI.RadComboBoxEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxCancelEventArgs=function(){
Telerik.Web.UI.RadComboBoxCancelEventArgs.initializeBase(this);
};
Telerik.Web.UI.RadComboBoxCancelEventArgs.prototype={};
Telerik.Web.UI.RadComboBoxCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxItemEventArgs=function(_1){
Telerik.Web.UI.RadComboBoxItemEventArgs.initializeBase(this);
this._item=_1;
};
Telerik.Web.UI.RadComboBoxItemEventArgs.prototype={get_item:function(){
return this._item;
}};
Telerik.Web.UI.RadComboBoxItemEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxItemCancelEventArgs=function(_2){
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.initializeBase(this);
this._item=_2;
};
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.prototype={get_item:function(){
return this._item;
}};
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxRequestEventArgs=function(_3){
Telerik.Web.UI.RadComboBoxRequestEventArgs.initializeBase(this);
this._text=_3;
};
Telerik.Web.UI.RadComboBoxRequestEventArgs.prototype={get_text:function(){
return this._text;
}};
Telerik.Web.UI.RadComboBoxRequestEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs=function(_4,_5){
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.initializeBase(this);
this._text=_4;
this._context=_5;
};
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.prototype={get_text:function(){
return this._text;
},get_context:function(){
return this._context;
}};
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs=function(_6,_7){
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.initializeBase(this);
this._text=_6;
this._errorMessage=_7;
};
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.prototype={get_text:function(){
return this._text;
},get_errorMessage:function(){
return this._errorMessage;
}};
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs",Telerik.Web.UI.RadComboBoxCancelEventArgs);;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.RadComboBox=function(_1){
Telerik.Web.UI.RadComboBox.initializeBase(this,[_1]);
this._items=null;
this._itemData=null;
this._selectedItem=null;
this._selectedIndex=null;
this._highlightedItem=null;
this._dropDownVisible=false;
this._enableLoadOnDemand=false;
this._openDropDownOnLoad=false;
this._appendItems=false;
this._allowCustomText=false;
this._markFirstMatch=false;
this._originalText=this.get_inputDomElement().value;
this._cachedText=this._originalText;
this._text="";
this._value=null;
this._isCaseSensitive=false;
this._autoCompleteSeparator=null;
this._postBackReference=null;
this._dropDownElement=null;
this._inputDomElement=null;
this._imageDomElement=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._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._childListElementWrapper=null;
this._skin="";
if(window.tlrkComboBoxes==null){
window.tlrkComboBoxes=new Array();
}
tlrkComboBoxes[tlrkComboBoxes.length]=this;
};
Telerik.Web.UI.RadComboBox._createItemsFromJson=function(_2,_3){
var _4=_2.get_itemData();
if(!_4){
return;
}
var _5=Telerik.Web.UI.ControlItemContainer._getChildrenByTagName(_2.get_childListElement(),"li");
var _6=_5.length;
var _7=0;
if(_5.length>0&&((_5[0].className=="rcbHeader")||(_5[0].className=="rcbLoading"))){
_6=_6-1;
_7=1;
}
if(_5.length>1&&((_5[1].className=="rcbHeader")||(_5[1].className=="rcbLoading"))){
_6=_6-1;
_7=2;
}
Sys.Debug.assert(_4.length==_6,"Length of elements and json must be the same!");
for(var i=_7;i<_5.length;i++){
var _9=new Telerik.Web.UI.RadComboBoxItem();
_3.add(_9);
_9.initialize(_4[i-_7],_5[i]);
}
};
Telerik.Web.UI.RadComboBox.prototype={initialize:function(){
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"initialize");
if(this._requiresRightToLeft()){
this._initRightToLeft();
}
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._onDropDownOutDelegate=Function.createDelegate(this,this._onDropDownOut);
$addHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate);
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);
$addHandler(document,"click",this._onDocumentClickDelegate);
this._eventMap.addHandlerForClassName("click","rcbInput",this._onInputClick);
this._eventMap.addHandlerForClassName("keydown","rcbInput",this._onKeyDown);
this._eventMap.addHandlerForClassName("focus","rcbInput",this._onFocus);
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);
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);
}
var _a=this.findItemByText(this._text);
if(_a){
this.set_selectedItem(_a);
}
this._initializeAnimation();
if(this._openDropDownOnLoad&&!this.get_dropDownVisible()){
this.showDropDown();
}
var me=this;
},_initializeAnimation:function(){
var _c=this._getAnimatedElement();
if(_c){
this._slide=new Telerik.Web.UI.Slide(_c,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(_d,e){
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().style.overflow="auto";
if(this.get_selectedItem()){
me=this;
me.get_selectedItem().scrollOnTop();
}
}
},_onExpandAnimationStarted:function(_f,e){
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().style.overflow="hidden";
}
},_requiresRightToLeft:function(){
var _11=this.get_element();
while(_11.nodeType!==9){
if(_11.dir=="rtl"){
return true;
}
_11=_11.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(Telerik.Web.DomElement.containsCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellRight")){
this.get_imageDomElement().parentNode.className="rcbArrowCell rcbArrowCellLeft";
this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellRight";
}else{
this.get_imageDomElement().parentNode.className="rcbArrowCell rcbArrowCellRight";
this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellLeft";
}
},dispose:function(){
this._attachDropDown();
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"dispose");
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,"resize",this._onWindowResizeDelegate);
$removeHandler(this.get_inputDomElement(),"propertychange",this._onPropertyChangeDelegate);
$removeHandler(this.get_inputDomElement(),"focus",this._onFocusDelegate);
$removeHandler(document,"click",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);
}
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);
}
if(this._slide){
this._slide.dispose();
this._slide=null;
}
tlrkComboBoxes[this.get_id()]=null;
},_detachDropDown:function(){
if((!document.readyState||document.readyState=="complete")&&(!this._isDetached)){
var _12=this._findParentForm();
var _13=this.get_dropDownElement();
var _14=this.get_dropDownElement().parentNode;
_14.parentNode.removeChild(_14);
_14.style.marginLeft="0";
_12.insertBefore(_14,_12.firstChild);
this._isDetached=true;
}
},_attachDropDown:function(){
if(this._isDetached){
var _15=this._findParentForm();
var _16=this.get_dropDownElement();
var _17=this.get_dropDownElement().parentNode;
_15.removeChild(_17);
_17.style.marginLeft="0";
var _18=this.get_element();
_18.insertBefore(_17,_18.firstChild);
this._isDetached=false;
}
},_findParentForm:function(){
var _19=this.get_element();
while(_19.tagName.toLowerCase()!="form"){
_19=_19.parentNode;
}
return _19;
},_findNearestItem:function(_1a){
while(_1a.nodeType!==9){
if(_1a._item&&Telerik.Web.UI.RadComboBoxItem.isInstanceOfType(_1a._item)){
return _1a._item;
}
_1a=_1a.parentNode;
}
return null;
},_positionDropDown:function(){
this._detachDropDown();
var _1b=this.get_element();
var _1c=this._getAnimationContainer();
_1c.style.position="absolute";
var _1d=Telerik.Web.UI.Screen.getElementPosition(_1b);
var _1e=this.get_dropDownElement();
var _1f=this.get_element().offsetWidth;
if(this._dropDownWidth){
_1f=this._dropDownWidth;
}
var _20=this.get_childListElement();
var _21=this.get_childListElementWrapper();
var _22=_1d.y+this.get_offsetY()+this.get_element().offsetHeight;
_1c.style.top=_22+"px";
if(window.netscape&&!window.opera){
_1c.style.top=_22+2+"px";
}
_1c.style.left=_1d.x+this.get_offsetX()+"px";
if(this._rightToLeft&&document.body.dir=="rtl"){
_1c.style.left="";
_1c.style.left=_1d.x+this.get_offsetX()-this._getScrollBarWidth()+"px";
}
_1e.style.display="block";
_1e.style.width=_1f+"px";
var _23=0;
if(!this._dropDownWidth){
_23=_1e.offsetWidth-_1f;
}
if(_23>0&&_23<_1f){
if(window.netscape&&!window.opera){
_1e.style.width=_1f-_23+"px";
_1c.style.left=_1d.x+this.get_offsetX()+_23+"px";
}else{
_1e.style.width=_1f-_23+"px";
}
}
if(this._rightToLeft){
_1e.dir="rtl";
}
this._determineScreenBoundaryDetection();
},_fixShowMoreResultBoxWidth:function(_24,_25){
var _26=TelerikCommonScripts.getPaddingBox(_24).horizontal;
_24.style.width=(_25.offsetWidth-_26)+"px";
},_determineScreenBoundaryDetection:function(){
var _27=this.get_dropDownElement();
var _28=this._getAnimationContainer();
var _29=Telerik.Web.UI.Screen.getElementPosition(this.get_element());
if(this._enableScreenBoundaryDetection){
var _2a=Telerik.Web.UI.Screen.getViewPortSize();
if(this._elementOverflowsBottom(_2a,_27,this.get_inputDomElement())){
var y=_29.y-_27.offsetHeight;
if(y>=0){
this.set_slideDirection(Telerik.Web.UI.SlideDirection.Up);
this._getAnimationContainer().style.top=_29.y-this.get_offsetY()-_27.offsetHeight+"px";
this._getAnimationContainer().style.height=this.get_dropDownElement().offsetHeight;
if(window.netscape&&!window.opera){
this._getAnimationContainer().style.top=_29.y-this.get_offsetY()-_27.offsetHeight+2+"px";
}
}
}else{
this.set_slideDirection(Telerik.Web.UI.SlideDirection.Down);
}
}
this.set_dropDownVisible(true);
},_getScrollBarWidth:function(){
var _2c,_2d=0;
var _2e=document.createElement("div");
_2e.style.position="absolute";
_2e.style.top="-1000px";
_2e.style.left="-1000px";
_2e.style.width="100px";
_2e.style.height="50px";
_2e.style.overflow="hidden";
var _2f=document.createElement("div");
_2f.style.width="100%";
_2f.style.height="200px";
_2e.appendChild(_2f);
document.body.appendChild(_2e);
var _30=_2f.offsetWidth;
_2e.style.overflow="auto";
var _31=_2f.offsetWidth;
this._scrollbarWidth=_30-_31;
if(this._scrollbarWidth<=0){
_2f.style.width="300px";
_2c=_2e.offsetWidth;
_2d=_2e.clientWidth;
this._scrollbarWidth=_2c-_2d;
}
if(this._scrollbarWidth<=0){
this._scrollbarWidth=16;
}
document.body.removeChild(document.body.lastChild);
return this._scrollbarWidth;
},_elementOverflowsBottom:function(_32,_33,_34){
var _35=Telerik.Web.UI.Screen.getElementPosition(_34).y+_33.offsetHeight;
return _35>_32.height;
},_selectFirstMatch:function(){
var _36=this._findItemToSelect();
if(_36&&_36.get_enabled()){
_36.highlight();
_36.scrollOnTop();
this.set_selectedItem(_36);
}
},_findItemToSelect:function(){
var _37=this.findItemByValue(this.get_value());
if(!_37){
_37=this.findItemByText(this.get_text());
}
return _37;
},clearItems:function(){
this.get_items().clear();
},clearSelection:function(){
this.set_text("");
this.set_value("");
this.set_selectedItem(null);
this.set_highlightedItem(null);
},_findNextAvailableIndex:function(_38){
var _39=this.get_items();
for(var i=_38;i<_39.get_count();i++){
if(_39.getItem(i).get_enabled()){
return i;
}
}
return _39.get_count();
},_findPrevAvailableIndex:function(_3b){
var _3c=this.get_items();
if(_3c.get_count()<1){
return -1;
}
for(var i=_3b;i>=0;i--){
if(_3c.getItem(i).get_enabled()){
return i;
}
}
return -1;
},_onDropDownClick:function(e){
if(!this._enabled){
return;
}
var _3f=this._findNearestItem(e.target);
if(!_3f||!_3f.get_enabled()){
return;
}
this.hideDropDown();
this._performSelect(_3f);
},_onDropDownHover:function(e){
if(!this._enabled){
return;
}
var _41=this._findNearestItem(e.target);
if(!_41||!_41.get_enabled()){
return;
}
_41.highlight();
},_onDropDownOut:function(e){
if(!this._enabled){
return;
}
if(!e){
e=event;
}
var _43;
try{
_43=e.toElement||e.relatedTarget||e.fromElement;
while(_43.nodeType!==9){
if(_43.parentNode==this.get_dropDownElement()){
return;
}
_43=_43.parentNode;
}
}
catch(e){
}
var _44=this.get_highlightedItem();
if(_44){
_44.unHighlight();
}
},_onDocumentClick:function(e){
if(!e){
e=event;
}
var _46=e.target||e.srcElement;
while(_46.nodeType!==9){
if(_46.parentNode==null||_46==this.get_element()||_46==this.get_dropDownElement()){
return;
}
_46=_46.parentNode;
}
if(this.get_dropDownVisible()&&this.get_closeDropDownOnBlur()){
this.hideDropDown();
}
if(this._focused){
this._raiseClientBlur();
this._selectItemOnBlur();
this._focused=false;
}
},_selectItemOnBlur:function(){
var _47=this._findItemToSelect();
if(!_47&&!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);
_47=this.get_highlightedItem();
}
}
this._performSelect(_47);
},_onWindowResize:function(){
if(this.get_dropDownVisible()){
this._positionDropDown();
}
},_onKeyDown:function(e){
if(!this._fireEvents){
return;
}
if(!e){
e=event;
}
this.raise_onClientKeyPressing(e);
var _49=e.keyCode||e.which;
this._lastKeyCode=_49;
if(_49==Telerik.Web.UI.Keys.Escape&&this.get_dropDownVisible()){
if(this.get_dropDownVisible()){
this.hideDropDown();
}
return;
}
if(_49===Telerik.Web.UI.Keys.Enter){
if(this.get_dropDownVisible()){
this.hideDropDown();
}
this._performSelect(this.get_highlightedItem());
e.returnValue=false;
if(e.preventDefault){
e.preventDefault();
}
return;
}else{
if(_49===Telerik.Web.UI.Keys.Down){
e.returnValue=false;
if(e.altKey){
this.toggleDropDown();
return;
}
this.highlightNextItem();
return;
}else{
if(_49===Telerik.Web.UI.Keys.Up){
e.returnValue=false;
if(e.altKey){
this.toggleDropDown();
return;
}
this.highlightPreviousItem();
return;
}else{
if(_49===Telerik.Web.UI.Keys.Tab){
if(this.get_dropDownVisible()){
this.hideDropDown();
}
this._raiseClientBlur();
this._selectItemOnBlur();
this._focused=false;
return;
}
}
}
}
if(_49==Telerik.Web.UI.Keys.Left||_49==Telerik.Web.UI.Keys.Right){
return;
}
},_onImageClick:function(e){
if(this._enabled){
this._selectFirstMatch();
this.toggleDropDown();
}
},_onInputClick:function(e){
if(this._enabled){
this._selectFirstMatch();
this.selectText(0,this.get_text().length);
if(!this.get_dropDownVisible()&&this._showDropDownOnTextboxClick){
this.showDropDown();
}
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(!e){
e=event;
}
this._focused=true;
this.raise_onClientFocus();
return true;
},_raiseClientBlur:function(){
if(this._focused){
this.raise_onClientBlur();
}
},_onInputChange:function(){
this.set_value("");
this._text=this.get_inputDomElement().value;
this.updateClientState();
if(this.get_enableLoadOnDemand()&&!this._suppressChange){
var me=this;
if(this._requestTimeoutID>0){
window.clearTimeout(this._requestTimeoutID);
this._requestTimeoutID=0;
}
if(!this.get_dropDownVisible()){
this.showDropDown();
}
this._requestTimeoutID=window.setTimeout(function(){
me.requestItems(me.get_text(),false);
},me.get_itemRequestTimeout());
return;
}
if(!this._suppressChange&&this._shouldHighlight()){
this.highlightMatches();
}
},_onInputPropertyChange:function(){
if(event.propertyName=="value"){
var _51=this.get_text();
if(this._cachedText!=_51){
this._cachedText=_51;
this._onInputChange();
}
}
},_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;
},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 _53=Telerik.Web.UI.ControlItemContainer._getFirstChildByTagName(box,"span",0);
return _53;
},get_moreResultsBoxElement:function(){
var box=this._getChildElement("MoreResultsBox");
return box;
},get_imageDomElement:function(){
if(!this._imageDomElement){
this._imageDomElement=this._getChildElement("Arrow");
}
return this._imageDomElement;
},get_slideDirection:function(){
return this._slideDirection;
},set_slideDirection:function(_55){
this._slideDirection=_55;
this._slide.set_direction(_55);
},hideDropDown:function(){
if(this.raise_dropDownClosing(this)==true){
return;
}
this.get_dropDownElement().style.display="none";
if(!this._getAnimationContainer()){
return;
}
this._slide.collapse();
this.set_dropDownVisible(false);
},showDropDown:function(){
if(this.raise_dropDownOpening(this)==true){
return;
}
var _56=this._getAnimationContainer();
if(!_56){
return;
}
if(this.get_enableLoadOnDemand()&&this.get_items().get_count()==0){
this.requestItems(this.get_text(),false);
}
_56.style.visibility="hidden";
this.get_dropDownElement().style.visibility="hidden";
this._slide.show();
this._resetAnimatedElementPosition();
this._slide.set_direction(this.get_slideDirection());
this.get_inputDomElement().focus();
this.set_dropDownVisible(true);
this._positionDropDown();
var _57=this.get_dropDownElement();
this._slide.updateSize();
_56.style.visibility="visible";
this._slide.expand();
},toggleDropDown:function(){
if(this.get_dropDownVisible()){
this.hideDropDown();
}else{
this.showDropDown();
if(this.get_highlightedItem()){
this.get_highlightedItem().scrollOnTop();
}
}
},_resetAnimatedElementPosition:function(){
var _58=this._getAnimatedElement();
_58.style.top="0px";
_58.style.left="0px";
},_performSelect:function(_59){
if(_59&&_59!=this.get_selectedItem()&&!this.get_enableLoadOnDemand()){
_59.select();
return;
}
if(_59&&_59==this.get_selectedItem()&&this.get_text()!=_59.get_text()&&this.get_allowCustomText()){
this.set_text(_59.get_text());
return;
}
if(_59&&_59==this.get_selectedItem()){
return;
}
if(_59&&this.get_originalText()!=_59.get_text()){
_59.select();
return;
}
if(_59&&(!this.get_selectedItem()||this.get_selectedItem().get_value()!=_59.get_value())){
_59.select();
return;
}
if(this.get_originalText()!=this.get_text()){
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
var _5a={Command:"TextChanged"};
this.postback(_5a);
}
},set_value:function(_5b){
this._value=_5b;
this.updateClientState();
},get_value:function(){
return this._value;
},set_text:function(_5c){
this._suppressChange=true;
var _5d=this.get_inputDomElement();
_5d.value=_5c;
this.set_value("");
this.get_element().value=_5c;
if(_5d.fireEvent){
var _5e=document.createEventObject();
_5d.fireEvent("onchange",_5e);
}else{
if(_5d.dispatchEvent){
var _5f=true;
var _5e=document.createEvent("HTMLEvents");
_5e.initEvent("change",_5f,true);
_5d.dispatchEvent(_5e);
}
}
this._suppressChange=false;
this._text=_5c;
this.updateClientState();
},get_webServiceSettings:function(){
return this._webServiceSettings;
},set_webServiceSettings:function(_60){
var _61=Sys.Serialization.JavaScriptSerializer.deserialize(_60);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(_61);
},get_text:function(){
return this.get_inputDomElement().value;
},enable:function(){
this.get_inputDomElement().disabled=false;
this.set_enabled(true);
this.enableEvents();
var _62=this._items.get_count();
for(var i=0;i<_62;i++){
this._items.getItem(i).enable();
}
},disable:function(){
this.set_enabled(false);
this.set_value(this.get_text());
this.get_inputDomElement().disabled="disabled";
this.disableEvents();
var _64=this._items.get_count();
for(var i=0;i<_64;i++){
this._items.getItem(i).disable();
}
},set_enabled:function(_66){
this._enabled=_66;
this.updateClientState();
},get_enabled:function(){
return this._enabled;
},disableEvents:function(){
this._fireEvents=false;
},enableEvents:function(){
this._fireEvents=true;
},findItemByText:function(_67){
var _68=this.get_items();
for(var i=0;i<_68.get_count();i++){
if(_68.getItem(i).get_text()==_67){
return _68.getItem(i);
}
}
return null;
},findItemByValue:function(_6a){
if(!_6a){
return null;
}
var _6b=this.get_items();
for(var i=0;i<_6b.get_count();i++){
if(_6b.getItem(i).get_value()==_6a){
return _6b.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 _6d=this.get_items();
var _6e=this.get_highlightedItem();
var _6f=0;
if(_6e){
_6f=_6e.get_index()-1;
}
_6f=this._findPrevAvailableIndex(_6f);
if(_6f>=0){
_6d.getItem(_6f).highlight();
_6d.getItem(_6f).scrollIntoView();
var _70=this._getLastSeparatorIndex(this.get_text());
var _71=this.get_text().substring(0,_70+1)+_6d.getItem(_6f).get_text();
this.set_text(_71);
this.set_value(_6d.getItem(_6f).get_value());
}
},highlightNextItem:function(){
var _72=this.get_items();
var _73=this.get_highlightedItem();
var _74=0;
if(_73){
_74=_73.get_index()+1;
}
_74=this._findNextAvailableIndex(_74);
if(_74<_72.get_count()){
_72.getItem(_74).highlight();
_72.getItem(_74).scrollIntoView();
var _75=this._getLastSeparatorIndex(this.get_text());
var _76=this.get_text().substring(0,_75+1)+_72.getItem(_74).get_text();
this.set_text(_76);
this.set_value(_72.getItem(_74).get_value());
}
},findFirstMatch:function(_77){
if(!_77){
return null;
}
var _78=this.get_items();
for(var i=0;i<_78.get_count();i++){
if(_78.getItem(i).get_text().length<_77.length){
continue;
}
if(_78.getItem(i).get_enabled()==false){
continue;
}
var _7a=_78.getItem(i).get_text().substring(0,_77.length);
if(!this.get_isCaseSensitive()){
if(_7a.toLowerCase()==_77.toLowerCase()){
return _78.getItem(i);
}
}else{
if(_7a==_77){
return _78.getItem(i);
}
}
}
return null;
},highlightMatches:function(){
if(!this.get_markFirstMatch()){
return;
}
var _7b=this.get_text();
var _7c=this.getLastWord(_7b);
if(this._getLastSeparator(_7b)==_7b.charAt(_7b.length-1)){
return;
}
var _7d=this.findFirstMatch(_7c);
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
if(!_7d){
if(!this.get_allowCustomText()){
if(_7b){
var _7e=this._getLastSeparatorIndex(_7b);
if(_7e<_7b.length-1){
this.set_text(_7b.substring(0,_7b.length-1));
this.highlightMatches();
}
}
}
return;
}
_7d.highlight();
_7d.scrollOnTop();
var _7e=this._getLastSeparatorIndex(_7b);
var _7f=_7b.substring(0,_7e+1)+_7d.get_text();
if(_7b!=_7f){
this.set_text(_7f);
}
this.set_value(_7d.get_value());
var _80=_7e+_7c.length+1;
var _81=_7f.length-_80;
this.selectText(_80,_81);
},postback:function(_82){
if(!this._postBackReference){
return;
}
var _83=this._postBackReference.replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(_82));
eval(_83);
},_getLastSeparator:function(_84){
if(!this.get_autoCompleteSeparator()){
return null;
}
var _85=this._getLastSeparatorIndex(_84);
return _84.charAt(_85);
},getLastWord:function(_86){
var _87=-1;
if(this.get_autoCompleteSeparator()!=null){
_87=this._getLastSeparatorIndex(_86);
}
var _88=_86.substring(_87+1,_86.length);
return _88;
},_getLastSeparatorIndex:function(_89){
var _8a=-1;
if(!this.get_autoCompleteSeparator()){
return _8a;
}
for(var i=0;i<this.get_autoCompleteSeparator().length;i++){
var _8c=this.get_autoCompleteSeparator().charAt(i);
var _8d=_89.lastIndexOf(_8c);
if(_8d>_8a){
_8a=_8d;
}
}
return _8a;
},selectText:function(_8e,_8f){
if(this.get_inputDomElement().createTextRange){
var _90=this.get_inputDomElement().createTextRange();
if(_8e==0&&_8f==0){
_90.collapse(true);
return;
}
_90.moveStart("character",_8e);
_90.moveEnd("character",_8f);
_90.select();
}else{
this.get_inputDomElement().setSelectionRange(_8e,_8e+_8f);
}
},_childRemoved:function(_91,_92){
var _93=_91.get_element();
if(_91==this.get_selectedItem()){
this.set_selectedItem(null);
this.set_highlightedItem(null);
this.set_text("");
}
if(_92.get_items().get_count()==0&&!this._getHeaderElement()){
_93=_92._childListElement;
_92._childListElement=null;
}
if(_93){
_93.innerHTML="";
if(_93.parentNode){
_93.parentNode.removeChild(_93);
}
_93=null;
}
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"_childRemoved",[_91,_92]);
},_childrenCleared:function(_94){
var _95=_94.get_childListElement();
if(_95&&!this._getHeaderElement()){
for(var i=0;i<_94.get_items().get_count();i++){
_94.get_items().getItem(i).dispose();
}
_95.innerHTML="";
_95=null;
}else{
if(_95){
for(var i=0;i<_94.get_items().get_count();i++){
this._childRemoved(_94.get_items().getItem(i),_94);
}
}
}
},_createItemsFromJson:function(){
this._items=new Telerik.Web.UI.RadComboBoxItemCollection(this);
Telerik.Web.UI.RadComboBox._createItemsFromJson(this,this._items);
},_createChildListElement:function(){
var _97=document.createElement("ul");
this.get_combobox().get_dropDownElement().appendChild(_97);
},get_childListElement:function(){
if(!this._childListElement){
var _98=this.get_childListElementWrapper();
this._childListElement=Telerik.Web.UI.ControlItemContainer._getFirstChildByTagName(_98,"ul",0);
}
return this._childListElement;
},get_childListElementWrapper:function(){
if(!this._childListElementWrapper){
var _99=this.get_dropDownElement();
this._childListElementWrapper=Telerik.Web.UI.ControlItemContainer._getFirstChildByTagName(_99,"div",0);
}
return this._childListElementWrapper;
},_getHeaderElement:function(){
if(this.get_childListElement()){
return Telerik.Web.UI.ControlItemContainer._getChildByClassName(this.get_childListElement(),"rcbHeader",0);
}
return null;
},get_expandAnimation:function(){
return this._expandAnimation;
},set_expandAnimation:function(_9a){
var _9b=Sys.Serialization.JavaScriptSerializer.deserialize(_9a);
this._expandAnimation=new Telerik.Web.UI.AnimationSettings(_9b);
},get_collapseAnimation:function(){
return this._collapseAnimation;
},set_collapseAnimation:function(_9c){
var _9d=Sys.Serialization.JavaScriptSerializer.deserialize(_9c);
this._collapseAnimation=new Telerik.Web.UI.AnimationSettings(_9d);
},_getAnimatedElement:function(){
if(!this._animatedElement){
this._animatedElement=this.get_dropDownElement();
}
return this._animatedElement;
},get_items:function(){
this._ensureChildren();
return this._items;
},set_items:function(_9e){
this._items=_9e;
},get_itemData:function(){
return this._itemData;
},set_itemData:function(_9f){
this._itemData=_9f;
},get_itemRequestTimeout:function(){
return this._itemRequestTimeout;
},set_itemRequestTimeout:function(_a0){
this._itemRequestTimeout=_a0;
},get_appendItems:function(){
return this._appendItems;
},set_appendItems:function(_a1){
this._appendItems=_a1;
},get_selectedItem:function(){
return this._selectedItem;
},set_selectedItem:function(_a2){
this._selectedItem=_a2;
},get_selectedIndex:function(){
var _a3=this.get_selectedItem();
if(_a3){
return _a3.get_index();
}
return this._selectedIndex;
},set_selectedIndex:function(_a4){
this._selectedIndex=_a4;
},get_causesValidation:function(){
return this._causesValidation;
},set_causesValidation:function(_a5){
this._causesValidation=_a5;
},get_closeDropDownOnBlur:function(){
return this._closeDropDownOnBlur;
},set_closeDropDownOnBlur:function(_a6){
this._closeDropDownOnBlur=_a6;
},get_isTemplated:function(){
return this._isTemplated;
},set_isTemplated:function(_a7){
this._isTemplated=_a7;
},get_highlightTemplatedItems:function(){
return this._highlightTemplatedItems;
},set_highlightTemplatedItems:function(_a8){
this._highlightTemplatedItems=_a8;
},get_enableLoadOnDemand:function(){
return this._enableLoadOnDemand;
},set_enableLoadOnDemand:function(_a9){
this._enableLoadOnDemand=_a9;
},get_allowCustomText:function(){
return this._allowCustomText;
},set_allowCustomText:function(_aa){
this._allowCustomText=_aa;
},get_markFirstMatch:function(){
return this._markFirstMatch;
},set_markFirstMatch:function(_ab){
this._markFirstMatch=_ab;
},get_originalText:function(){
return this._originalText;
},set_originalText:function(_ac){
this._originalText=_ac;
},get_highlightedItem:function(){
return this._highlightedItem;
},set_highlightedItem:function(_ad){
this._highlightedItem=_ad;
},get_isCaseSensitive:function(){
return this._isCaseSensitive;
},set_isCaseSensitive:function(_ae){
this._isCaseSensitive=_ae;
},get_dropDownVisible:function(){
return this._dropDownVisible;
},set_dropDownVisible:function(_af){
this._dropDownVisible=_af;
},get_autoCompleteSeparator:function(){
return this._autoCompleteSeparator;
},set_autoCompleteSeparator:function(_b0){
this._autoCompleteSeparator=_b0;
},get_loadingMessage:function(){
return this._loadingMessage;
},set_loadingMessage:function(_b1){
this._loadingMessage=_b1;
},get_errorMessage:function(){
return this._errorMessage;
},set_errorMessage:function(_b2){
this._errorMessage=_b2;
},get_clientDataString:function(){
return this._clientDataString;
},set_clientDataString:function(_b3){
this._clientDataString=_b3;
},get_offsetX:function(){
return this._offsetX;
},set_offsetX:function(_b4){
this._offsetX=_b4;
},get_offsetY:function(){
return this._offsetY;
},set_offsetY:function(_b5){
this._offsetY=_b5;
},add_keyPressing:function(_b6){
this.get_events().addHandler("keyPressing",_b6);
},remove_keyPressing:function(_b7){
this.get_events().removeHandler("keyPressing",_b7);
},raise_keyPressing:function(_b8){
this.raiseEvent("keyPressing",_b8);
},add_selectedIndexChanging:function(_b9){
this.get_events().addHandler("selectedIndexChanging",_b9);
},remove_selectedIndexChanging:function(_ba){
this.get_events().removeHandler("selectedIndexChanging",_ba);
},raise_selectedIndexChanging:function(_bb){
var _bc=new Telerik.Web.UI.RadComboBoxItemCancelEventArgs(_bb);
this.raiseEvent("selectedIndexChanging",_bc);
return _bc.get_cancel();
},add_selectedIndexChanged:function(_bd){
this.get_events().addHandler("selectedIndexChanged",_bd);
},remove_selectedIndexChanged:function(_be){
this.get_events().removeHandler("selectedIndexChanged",_be);
},raise_selectedIndexChanged:function(_bf){
var _c0=new Telerik.Web.UI.RadComboBoxItemEventArgs(_bf);
this.raiseEvent("selectedIndexChanged",_c0);
},add_itemsRequesting:function(_c1){
this.get_events().addHandler("itemsRequesting",_c1);
},remove_itemsRequesting:function(_c2){
this.get_events().removeHandler("itemsRequesting",_c2);
},add_itemsRequested:function(_c3){
this.get_events().addHandler("itemsRequested",_c3);
},remove_itemsRequested:function(_c4){
this.get_events().removeHandler("itemsRequested",_c4);
},raise_itemsRequested:function(_c5){
var _c6=new Telerik.Web.UI.RadComboBoxRequestEventArgs(_c5);
this.raiseEvent("itemsRequested",_c6);
},add_dropDownOpening:function(_c7){
this.get_events().addHandler("dropDownOpening",_c7);
},remove_dropDownOpening:function(_c8){
this.get_events().removeHandler("dropDownOpening",_c8);
},raise_dropDownOpening:function(){
var _c9=new Telerik.Web.UI.RadComboBoxCancelEventArgs();
this.raiseEvent("dropDownOpening",_c9);
return _c9.get_cancel();
},add_dropDownClosing:function(_ca){
this.get_events().addHandler("dropDownClosing",_ca);
},remove_dropDownClosing:function(_cb){
this.get_events().removeHandler("dropDownClosing",_cb);
},add_itemsRequestFailed:function(_cc){
this.get_events().addHandler("itemsRequestFailed",_cc);
},remove_itemsRequestFailed:function(_cd){
this.get_events().removeHandler("itemsRequestFailed",_cd);
},raise_itemsRequestFailed:function(_ce,_cf){
var _d0=new Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs(_ce,_cf);
this.raiseEvent("itemsRequestFailed",_d0);
return _d0.get_cancel();
},raise_dropDownClosing:function(){
var _d1=new Telerik.Web.UI.RadComboBoxCancelEventArgs();
this.raiseEvent("dropDownClosing",_d1);
return _d1.get_cancel();
},add_onClientFocus:function(_d2){
this.get_events().addHandler("onClientFocus",_d2);
},remove_onClientFocus:function(_d3){
this.get_events().removeHandler("onClientFocus",_d3);
},raise_onClientFocus:function(){
var _d4=new Telerik.Web.UI.RadComboBoxEventArgs();
this.raiseEvent("onClientFocus",_d4);
},add_onClientBlur:function(_d5){
this.get_events().addHandler("onClientBlur",_d5);
},remove_onClientBlur:function(_d6){
this.get_events().removeHandler("onClientBlur",_d6);
},raise_onClientBlur:function(){
var _d7=new Telerik.Web.UI.RadComboBoxEventArgs();
this.raiseEvent("onClientBlur",_d7);
},add_onClientKeyPressing:function(_d8){
this.get_events().addHandler("keyPressing",_d8);
},remove_onClientKeyPressing:function(_d9){
this.get_events().removeHandler("keyPressing",_d9);
},raise_onClientKeyPressing:function(e){
this.raiseEvent("keyPressing",e);
},_logInserted:function(_db){
if(!_db.get_parent()._jsonItemsCreated||!this._enableClientStatePersistence){
return;
}
this._log.logInsert(_db);
},saveClientState:function(){
var _dc=this._log._logEntries;
var _dd={logEntries:_dc,value:this._value,text:this._text,enabled:this._enabled};
return Sys.Serialization.JavaScriptSerializer.serialize(_dd);
},requestItems:function(_de,_df){
var _e0={};
var _e1=new Telerik.Web.UI.RadComboBoxRequestCancelEventArgs(_de,_e0);
this.raiseEvent("itemsRequesting",_e1);
if(_e1.get_cancel()){
return;
}
this.set_appendItems(_df);
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);
}
if(this.get_webServiceSettings().get_method()){
this._doLoadOnDemandFromWebService(_de,_e0);
}else{
this._doLoadOnDemand(_de,_e0);
}
},_doLoadOnDemand:function(_e2,_e3){
var _e4=0;
if(this.get_appendItems()){
_e4=this.get_items().get_count();
}
var _e5={Command:"LOD",Text:_e2,ClientState:this._clientState,Context:_e3,NumberOfItems:_e4};
var _e6=Function.createDelegate(this,this._onCallbackResponse);
var _e7=Function.createDelegate(this,this._onErrorReceived);
WebForm_DoCallback(this._uniqueId,Sys.Serialization.JavaScriptSerializer.serialize(_e5),_e6,_e2,_e7,true);
},_onCallbackResponse:function(_e8){
this.set_selectedItem(null);
this.set_highlightedItem(null);
var _e9=this._items.get_count();
var _ea=_e8.split("_$$_");
var _eb;
if(_ea[0]=="[]"){
_eb=null;
}else{
_eb=eval(_ea[0]);
}
if(this.get_appendItems()&&this._itemData&&_eb){
Array.addRange(this._itemData,_eb);
}else{
this._itemData=_eb;
}
if(this._loadingDiv){
if(this._loadingDiv.parentNode){
this._loadingDiv.parentNode.removeChild(this._loadingDiv);
}
this._loadingDiv=null;
}
var _ec=this.get_childListElement();
if(!_ec){
_ec=this._createChildListElement();
}
var _ed=_ec.innerHTML;
var _ee=this._getHeaderElement();
this._jsonItemsCreated=true;
if(this.get_appendItems()){
var _ef=document.createElement("ul");
_ef.innerHTML=_ea[1];
var _f0=Telerik.Web.UI.ControlItemContainer._getChildrenByTagName(_ef,"li");
var _f1=_f0.length;
for(var i=0;i<_f0.length;i++){
_ec.appendChild(_f0[i]);
var _f3=new Telerik.Web.UI.RadComboBoxItem();
this._items.add(_f3);
_f3.initialize(this._itemData[i],_f0[i]);
}
_ec.innerHTML=_ed+_ea[1];
if(this._items.getItem(_e9+1)!=null){
this._items.getItem(_e9+1).scrollIntoView();
}
}else{
this._items.clear();
if(_ee){
_ec.appendChild(_ee);
_ec.innerHTML=_ec.innerHTML+_ea[1];
}else{
_ec.innerHTML=_ea[1];
}
this._jsonItemsCreated=false;
this._createItemsFromJson();
}
if(this._showMoreResultsBox&&this.get_moreResultsBoxMessageElement()){
this.get_moreResultsBoxMessageElement().innerHTML=_ea[2];
}
this.raise_itemsRequested(this.get_text());
if(this._shouldHighlight()){
this.highlightMatches();
}
if(this.get_dropDownVisible()){
if(this._slide){
this._slide.updateSize();
}
this._positionDropDown();
}
},_onErrorReceived:function(_f4,_f5){
if(this._requestTimeoutID>0){
window.clearTimeout(this._requestTimeoutID);
this._requestTimeoutID=0;
}
var _f6=this._extractErrorMessage(_f4);
if(this.raise_itemsRequestFailed(_f5,_f6)==true){
return;
}
alert(_f6);
},_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(_f7,_f8){
if(!this._webServiceLoader){
this._initializeWebServiceLoader();
}
var _f9={context:_f8};
this._webServiceLoader.loadItems(_f9,_f7);
},_onWebServiceResponse:function(_fa,_fb){
var _fc=_fb.get_items();
var _fd=_fb.get_context();
this.set_selectedItem(null);
this.set_highlightedItem(null);
var _fe=this.get_items().get_count();
this._jsonItemsCreated=true;
if(this._loadingDiv){
if(this._loadingDiv.parentNode){
this._loadingDiv.parentNode.removeChild(this._loadingDiv);
}
this._loadingDiv=null;
}
var _ff=this.get_childListElement();
if(!_ff){
_ff=this._createChildListElement();
}
if(!this.get_appendItems()){
this.clearItems();
}
for(var i=0;i<_fc.length;i++){
var item=new Telerik.Web.UI.RadComboBoxItem();
var data=_fc[i];
item._loadFromDictionary(data);
this._items.add(item);
}
if(this.get_appendItems()){
if(this.get_items().getItem(_fe+1)!=null){
this.get_items().getItem(_fe+1).scrollIntoView();
}
}
this.raise_itemsRequested(_fd);
if(this._shouldHighlight()){
this.highlightMatches();
}
if(this.get_dropDownVisible()){
if(this._slide){
this._slide.updateSize();
}
this._positionDropDown();
}
},_onWebServiceError:function(_103,_104){
var _105=_104.get_message();
var text=_104.get_context();
this._onErrorReceived(_105,text);
}};
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);
this._index=0;
this._highlighted=false;
this._selected=false;
this._enabled=true;
};
Telerik.Web.UI.RadComboBoxItem.prototype={initialize:function(_1,_2){
Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"initialize",[_1,_2]);
if(typeof (_1.text)!="undefined"){
this._text=_1.text;
}
if(typeof (_1.enabled)!="undefined"){
this._enabled=_1.enabled;
}
if(typeof (_1["selected"])!="undefined"){
this._selected=_1["selected"]==true;
}
},_shouldInitializeChild:function(_3){
return false;
},render:function(_4){
_4[_4.length]="<li class='";
if(this.get_enabled()){
_4[_4.length]="rcbItem'>";
}else{
_4[_4.length]="rcbDisabled'>";
}
_4[_4.length]=this.get_text();
_4[_4.length]="</li>";
},select:function(){
if(!this.get_isEnabled()){
return;
}
var _5=this.get_comboBox();
if(_5.raise_selectedIndexChanging(this)==true){
return;
}
var _6=_5.get_text();
var _7=_5._getLastSeparatorIndex(_6);
var _8=_6.substring(0,_7+1)+this.get_text();
_5.set_text(_8);
_5.set_value(this.get_value());
_5.set_selectedItem(this);
_5.set_selectedIndex(this.get_index());
this.highlight();
_5.raise_selectedIndexChanged(this);
var _9={Command:"Select",Index:this.get_index()};
_5.postback(_9);
},_createItemsFromJson:function(){
},unHighlight:function(){
var _a=this.get_comboBox();
if(!_a.get_isTemplated()||_a.get_highlightTemplatedItems()){
this._replaceCssClass(this.get_element(),"rcbHovered","rcbItem");
}
_a.set_highlightedItem(null);
this.set_highlighted(false);
},highlight:function(){
if(!this.get_isEnabled()){
return;
}
var _b=this.get_comboBox();
if(!_b.get_isTemplated()||_b.get_highlightTemplatedItems()){
var _c=_b.get_highlightedItem();
if(_c){
_c.unHighlight();
}
var _d=this.get_element();
if(_d){
this._replaceCssClass(_d,"rcbItem","rcbHovered");
}
}
_b.set_highlightedItem(this);
this.set_highlighted(true);
},scrollOnTop:function(){
this.get_comboBox().get_childListElement().parentNode.scrollTop=this.get_element().offsetTop;
},scrollIntoView:function(){
var _e=this.get_element().offsetTop;
var _f=this.get_element().offsetHeight;
var _10=this.get_comboBox().get_childListElement().parentNode;
var _11=_10.scrollTop;
var _12=_10.offsetHeight;
if(_e+_f>_11+_12){
_10.scrollTop=_e+_f-_12;
}else{
if(_e+_f<=_11){
_10.scrollTop=_e;
}
}
},nextItem:function(){
return this.get_comboBox().get_items().getItem(this.get_index()+1);
},_replaceCssClass:function(_13,_14,_15){
_13.className=_13.className.replace(_14,_15);
},_createDomElement:function(){
var _16=document.createElement("ul");
var _17=[];
this.render(_17);
_16.innerHTML=_17.join("");
var _18=_16.firstChild;
return _18;
},_createChildListElement:function(){
var _19=document.createElement("ul");
this.get_combobox().get_dropDownElement().appendChild(_19);
},set_selected:function(_1a){
this._selected=_1a;
},get_selected:function(){
return this._selected;
},set_highlighted:function(_1b){
this._highlighted=_1b;
},get_highlighted:function(){
return this._highlighted;
},disable:function(){
this.set_enabled(false);
this.get_element().className="rcbDisabled";
},enable:function(){
this.set_enabled(true);
this.get_element().className="rcbItem";
},set_index:function(_1c){
this._index=_1c;
},get_index:function(){
var _1d=this.get_comboBox();
if(_1d){
return _1d.get_items().indexOf(this);
}else{
return null;
}
},get_text:function(){
if(this._text===null){
var _1e=this.get_element();
if(_1e){
this._text=_1e.innerHTML;
}
}
return Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"get_text");
},set_text:function(_1f){
Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"set_text",[_1f]);
var _20=this.get_element();
if(_20){
_20.innerHTML=this._text;
}
},get_comboBox:function(_21){
this._parent=_21;
},get_comboBox:function(){
return this._parent;
},_getHierarchicalIndex:function(){
return this.get_index();
}};
Telerik.Web.UI.RadComboBoxItem.registerClass("Telerik.Web.UI.RadComboBoxItem",Telerik.Web.UI.ControlItem);;Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadComboBoxItemCollection=function(_1){
Telerik.Web.UI.RadComboBoxItemCollection.initializeBase(this,[_1]);
};
Telerik.Web.UI.RadComboBoxItemCollection.prototype={};
Telerik.Web.UI.RadComboBoxItemCollection.registerClass("Telerik.Web.UI.RadComboBoxItemCollection",Telerik.Web.UI.ControlItemCollection);;
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();