(function(){var a=Telerik.Web.UI; a.RadComboBoxEventArgs=function(b){a.RadComboBoxEventArgs.initializeBase(this); this._domEvent=b; }; a.RadComboBoxEventArgs.prototype={get_domEvent:function(){return this._domEvent; }}; a.RadComboBoxEventArgs.registerClass("Telerik.Web.UI.RadComboBoxEventArgs",Sys.EventArgs); a.RadComboBoxCancelEventArgs=function(b){a.RadComboBoxCancelEventArgs.initializeBase(this); this._domEvent=b; }; a.RadComboBoxCancelEventArgs.prototype={get_domEvent:function(){return this._domEvent; }}; a.RadComboBoxCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxCancelEventArgs",Sys.CancelEventArgs); a.RadComboBoxItemEventArgs=function(c,b){a.RadComboBoxItemEventArgs.initializeBase(this); this._item=c; this._domEvent=b; }; a.RadComboBoxItemEventArgs.prototype={get_item:function(){return this._item; },get_domEvent:function(){return this._domEvent; }}; a.RadComboBoxItemEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemEventArgs",Sys.EventArgs); a.RadComboBoxItemCancelEventArgs=function(c,b){Telerik.Web.UI.RadComboBoxItemCancelEventArgs.initializeBase(this); this._item=c; this._domEvent=b; }; a.RadComboBoxItemCancelEventArgs.prototype={get_item:function(){return this._item; },get_domEvent:function(){return this._domEvent; }}; a.RadComboBoxItemCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemCancelEventArgs",Sys.CancelEventArgs); a.RadComboBoxRequestEventArgs=function(c,b){Telerik.Web.UI.RadComboBoxRequestEventArgs.initializeBase(this); this._text=c; this._domEvent=b; }; a.RadComboBoxRequestEventArgs.prototype={get_text:function(){return this._text; },get_domEvent:function(){return this._domEvent; }}; a.RadComboBoxRequestEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestEventArgs",Sys.EventArgs); a.RadComboBoxRequestCancelEventArgs=function(d,b,c){a.RadComboBoxRequestCancelEventArgs.initializeBase(this); this._text=d; this._context=b; this._domEvent=c; }; a.RadComboBoxRequestCancelEventArgs.prototype={get_text:function(){return this._text; },get_context:function(){return this._context; },get_domEvent:function(){return this._domEvent; }}; a.RadComboBoxRequestCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestCancelEventArgs",Sys.CancelEventArgs); a.RadComboBoxItemsRequestFailedEventArgs=function(d,b,c){a.RadComboBoxItemsRequestFailedEventArgs.initializeBase(this); this._text=d; this._errorMessage=b; this._domEvent=c; }; a.RadComboBoxItemsRequestFailedEventArgs.prototype={get_text:function(){return this._text; },get_errorMessage:function(){return this._errorMessage; },get_domEvent:function(){return this._domEvent; }}; a.RadComboBoxItemsRequestFailedEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs",a.RadComboBoxCancelEventArgs); a.RadComboBoxItemDataBoundEventArgs=function(b,c){a.RadComboBoxItemDataBoundEventArgs.initializeBase(this,[b]); this._dataItem=c; }; a.RadComboBoxItemDataBoundEventArgs.prototype={get_dataItem:function(){return this._dataItem; }}; a.RadComboBoxItemDataBoundEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs",a.RadComboBoxItemEventArgs); })(); Type.registerNamespace("Telerik.Web.UI"); (function(){var b=$telerik.$; var a=Telerik.Web.UI; b.registerEnum(a,"Keys",{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,Zero:48,Numpad0:96,Numpad9:105}); b.registerEnum(a,"RadComboBoxFilter",{None:0,Contains:1,StartsWith:2}); a.RadComboBox=function(c){a.RadComboBox.initializeBase(this,[c]); this._callbackText=""; this._filterText=""; this._children=null; this._virtualScroll=true; this._itemData=null; this._selectedItem=null; this._selectedIndex=null; this._setSelectedItem=false; this._enableItemCaching=false; this._openDropDownOnLoad=false; this._allowCustomText=false; this._markFirstMatch=false; this._originalText=this.get_inputDomElement().value; this._cachedText=this._originalText; this._cachedOffsetHeight=""; this._text=""; this._value=null; this._postBackReference=null; this._dropDownElement=null; this._inputDomElement=null; this._imageDomElement=null; this._tableElement=null; 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._overlay=null; this._enableScreenBoundaryDetection=true; this._suppressChange=false; this._lastKeyCode=null; this._loadingDiv=null; this._showMoreResultsBox=false; this._focused=false; this._causesValidation=true; this.get_inputDomElement().setAttribute("autocomplete","off"); this._webServiceSettings=new a.WebServiceSettings({}); this._webServiceLoader=null; this._enabled=true; this._fireEvents=this._enabled; this._slide=null; this._expandAnimation=new a.AnimationSettings({}); this._collapseAnimation=new a.AnimationSettings({}); this._slideDirection=a.jSlideDirection.Down; this._animationEndedDelegate=null; this._animationStartedDelegate=null; this._showDropDownOnTextboxClick=true; this._dropDownWidth=""; this._height=""; this._maxHeight=""; this._childListElementWrapper=null; this._skin=""; this._skipLoadingItems=false; this._ajaxRequest=false; this._pendingAjaxRequestsCount=0; this._emptyMessage=null; this._disposed=false; this._disposeChildElements=true; this._firstOpeningOfDropDown=true; this._isAspNet35=false; this.lodHashTable={}; }; a.RadComboBox._getScrollBarWidth=function(){if(a.RadComboBox._scrollbarWidth){return a.RadComboBox._scrollbarWidth; }var g,h=0; var c=document.createElement("div"); c.style.position="absolute"; c.style.top="-1000px"; c.style.left="-1000px"; c.style.width="100px"; c.style.height="50px"; c.style.overflow="hidden"; var d=document.createElement("div"); d.style.width="100%"; d.style.height="200px"; c.appendChild(d); document.body.appendChild(c); var e=d.offsetWidth; c.style.overflow="auto"; var f=d.offsetWidth; a.RadComboBox._scrollbarWidth=e-f; if(a.RadComboBox._scrollbarWidth<=0){d.style.width="300px"; g=c.offsetWidth; h=c.clientWidth; a.RadComboBox._scrollbarWidth=g-h; }if(a.RadComboBox._scrollbarWidth<=0){a.RadComboBox._scrollbarWidth=16; }document.body.removeChild(document.body.lastChild); return a.RadComboBox._scrollbarWidth; }; a.RadComboBox.htmlEncode=function(c){return a.RadComboBox.replace(c,{"&":"&","<":"<",">":">"}); }; a.RadComboBox.htmlDecode=function(c){return a.RadComboBox.replace(c,{"&":"&","<":"<",">":">",""":'"'}); }; a.RadComboBox._getLocation=function(d){var e=$telerik.getLocation(d); if(($telerik.isOpera&&Sys.Browser.version<9.8)||$telerik.isSafari){var c=d.parentNode; while(c&&c.tagName.toUpperCase()!="BODY"&&c.tagName.toUpperCase()!="HTML"){e.x+=$telerik.getCorrectScrollLeft(c); e.y+=c.scrollTop; c=c.parentNode; }}return e; }; a.RadComboBox.replace=function(c,e){for(var d in e){c=c.replace(new RegExp(d,"g"),e[d]); }return c; }; a.RadComboBox.ComboBoxes=[]; a.RadComboBox._createChildControls=function(l,d){var m=l.get_itemData(); if(!m){return; }var j=l.get_childListElement(); if(!j){return; }var h=$telerik.getChildrenByTagName(l.get_childListElement(),"li"); var f=h.length; var g=0; if(h.length>0&&h[0].className=="rcbLoading"){f=f-1; g=1; }for(var c=g,k=h.length; c').css({border:0,padding:0,margin:0,position:"absolute",top:e.top,left:e.left,zIndex:1,width:f.offsetWidth,height:f.offsetHeight,background:"transparent"}).appendTo(f.parentNode); }if(this._openDropDownOnLoad&&!this.get_dropDownVisible()){this.showDropDown(); }var c=this; Array.add(a.RadComboBox.ComboBoxes,this); if(this._fireEvents){this.raiseEvent("load",null); }this.get_element().value=this._text; },_dummyHandler:function(){},_applyZIndex:function(){var d=this.get_element().style.zIndex; var c=this.get_dropDownElement().parentNode.style.zIndex; if(d==0){d=c; }this.get_dropDownElement().parentNode.style.zIndex=d; },_initializeAnimation:function(){var c=this._getAnimatedElement(); if(c){this._slide=new a.jSlide(c,this.get_expandAnimation(),this.get_collapseAnimation()); this._slide.initialize(); this._slide.set_direction(this.get_slideDirection()); }this._animationEndedDelegate=Function.createDelegate(this,this._onAnimationEnded); this._slide.add_expandAnimationEnded(this._animationEndedDelegate); this._slide.add_collapseAnimationEnded(this._animationEndedDelegate); this._animationStartedDelegate=Function.createDelegate(this,this._onAnimationStarted); this._slide.add_expandAnimationStarted(this._animationStartedDelegate); this._slide.add_collapseAnimationStarted(this._animationStartedDelegate); },_onAnimationEnded:function(c,f){if(window.netscape&&!window.opera){this.get_childListElementWrapper().style.overflow="auto"; }if(this.get_dropDownVisible()){var d=this.get_highlightedItem(); if(d){d.scrollOnTop(); }}},_onAnimationStarted:function(c,d){if(window.netscape&&!window.opera){this.get_childListElementWrapper().style.overflow="hidden"; }},_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(d,e,c){d.className=d.className.replace(e,c); },dispose:function(){Array.remove(a.RadComboBox.ComboBoxes,this); if(this._animationEndedDelegate){if(this._slide){this._slide.remove_expandAnimationEnded(this._animationEndedDelegate); this._slide.remove_collapseAnimationEnded(this._animationEndedDelegate); }this._animationEndedDelegate=null; }if(this._animationStartedDelegate){if(this._slide){this._slide.remove_expandAnimationStarted(this._animationStartedDelegate); this._slide.remove_collapseAnimationStarted(this._animationStartedDelegate); }this._animationStartedDelegate=null; }$removeHandler(window,"unload",this._onWindowUnloadDelegate); $removeHandler(window,"resize",this._onWindowResizeDelegate); if(!$telerik.isIE8&&!($telerik.isIE&&this._isAspNet35)){$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()){$telerik.removeExternalHandler(this.get_tableElement(),"mouseover",this._onTableHoverDelegate); $telerik.removeExternalHandler(this.get_tableElement(),"mouseout",this._onTableOutDelegate); }if(this.get_inputDomElement().parentNode){$telerik.removeExternalHandler(this.get_inputDomElement().parentNode,"mouseup",this._onInputCellClickDelegate); }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._virtualScroll&&this._onDropDownScrollDelegate){$removeHandler(this.get_childListElementWrapper(),"scroll",this._onDropDownScrollDelegate); }if(this._slide){this._slide.dispose(); this._slide=null; }this._removeDropDown(); this._disposed=true; a.RadComboBox.callBaseMethod(this,"dispose"); this._tableElement._events=null; this._inputDomElement._events=null; this._imageDomElement._events=null; this._childListElementWrapper._events=null; },_cancelEvent:function(c){c.preventDefault(); return false; },_onDropDownScroll:function(i){if(!this._virtualScroll||this._ajaxRequest||this.get_endOfItems()){return; }var f=this.get_items().get_count(); var g=22; var c=0; if(f>0){g=this.get_items().getItem(0).get_element().offsetHeight; c=this.get_items().getItem(f-1).get_element().offsetTop; }var h=$telerik.getFirstChildByTagName(this.get_childListElement(),"div",0); if(h){var d=h.offsetHeight; if(this.get_childListElementWrapper().scrollTop+d>=this.get_childListElement().offsetHeight-d){this.requestItems(this._filterText,true); }}},_detachDropDown:function(){var e=$telerik.isIE?document.readyState=="complete"||document.readyState=="interactive":true; if(e&&(!this._isDetached)){var f=this._findParentForm()||document.body; var d=this.get_dropDownElement(); var c=this.get_dropDownElement().parentNode; c.parentNode.removeChild(c); c.style.marginLeft="0"; f.insertBefore(c,f.firstChild); this._isDetached=true; }},_removeDropDown:function(){var c=this.get_dropDownElement().parentNode; c.parentNode.removeChild(c); if(this._disposeChildElements&&typeof(Sys.WebForms)!="undefined"){Sys.WebForms.PageRequestManager.getInstance()._destroyTree(c); }if(!$telerik.isSafari){c.outerHTML=null; }this._dropDownElement=null; },attachDropDown:function(){var c=this.get_dropDownElement().parentNode; c.parentNode.removeChild(c); this.get_tableElement().parentNode.appendChild(c); },_findParentForm:function(){var c=this.get_element(); while(c&&c.tagName&&c.tagName.toLowerCase()!="form"){c=c.parentNode; }if(!c.tagName){c=null; }return c; },_findNearestItem:function(c){while(c.nodeType!==9){if(c._item&&a.RadComboBoxItem.isInstanceOfType(c._item)){return c._item; }c=c.parentNode; }return null; },_positionDropDown:function(){if(this._skipDropDownPositioning){return; }this._detachDropDown(); var i=this.get_element(); var c=this._getAnimationContainer(); c.style.position="absolute"; var e=a.RadComboBox._getLocation(i); var h=this.get_dropDownElement(); var g=this.get_element().offsetWidth; if(this._dropDownWidth){g=this._dropDownWidth; }var f=this.get_childListElementWrapper(); var d=e.y+this.get_offsetY()+this.get_element().offsetHeight; c.style.top=d+"px"; c.style.left=e.x+this.get_offsetX()+"px"; if(this._rightToLeft&&document.body.dir=="rtl"){c.style.left=""; c.style.left=e.x+this.get_offsetX()-a.RadComboBox._getScrollBarWidth()+"px"; }h.style.display="block"; h.style.width=g+"px"; if(!this._dropDownWidth){var j=h.offsetWidth-g; if(j>0&&jthis._maxHeight){c=this._maxHeight; }if(!(n>=0&&(c+k)>=n)){n=c+k; }if(f&&k=0){this.set_slideDirection(a.jSlideDirection.Up); this._getAnimationContainer().style.height=this.get_dropDownElement().offsetHeight; this._getAnimationContainer().style.top=i.y-this.get_offsetY()-f.offsetHeight+"px"; if(window.netscape&&!window.opera){this._getAnimationContainer().style.top=i.y-this.get_offsetY()-f.offsetHeight+2+"px"; }if(this._height==""&&(this._maxHeight==""||this._calculateItemsHeight()d.height; },_highlightFirstMatch:function(){var c=this._findItemToSelect(); if(c&&c.get_enabled()&&!c.get_isSeparator()){c.highlight(); }},_findItemToSelect:function(){var c=this.findItemByValue(this.get_value()); if(!c){c=this.findItemByText(this.get_text()); }return c; },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); },_findNextAvailableIndex:function(f,c,e){var g=this.get_visibleItems(); for(var d=f; d=0; d--){if(c[d].get_enabled()&&!c[d].get_isSeparator()){return d; }}return -1; },_onDropDownClick:function(d){if(this._eventMap.skipElement(d,null)){return; }if(!this._enabled){return; }var c=this._findNearestItem(d.target); if(!c||!c.get_enabled()||c.get_isSeparator()){return; }try{this.get_inputDomElement().focus(); }catch(d){}this._performSelect(c,d); this._hideDropDown(d); if(!this.get_isTemplated()&&this.get_filter()!=a.RadComboBoxFilter.None&&d.stopPropagation){d.stopPropagation(); }},_onDropDownHover:function(d){if(!this._enabled||this._ajaxRequest){return; }var c=this._findNearestItem(d.target); if(!c||!c.get_enabled()||c.get_isSeparator()){return; }c.highlight(); },_onDropDownOut:function(f){if(!this._enabled){return; }if(!f){f=event; }var c=this._getRelatedTarget(f); if(!c){return; }while(c&&c.nodeType!==9){if(c.parentNode==this.get_dropDownElement()){return; }c=c.parentNode; }var d=this.get_highlightedItem(); if(d){d.unHighlight(); }},_onTableHover:function(d){if(!this._enabled){return; }var c=this.get_tableElement(); if(c!=null&&c.className!="rcbFocused"){c.className="rcbHovered"; }},_onTableOut:function(f){if(!this._enabled){return; }if(!f){f=event; }var d=this.get_tableElement(); var g=f.target||f.srcElement; var c=this._getRelatedTarget(f); if(!c){return; }while(c&&c.nodeType!==9){if(c.parentNode&&c.parentNode==d){return; }c=c.parentNode; }if(d!=null&&d.className=="rcbHovered"){d.className=""; }},_getRelatedTarget:function(f){var c=f.toElement||f.relatedTarget||f.fromElement; if(!c){return null; }try{var d=c.tagName; }catch(g){c=null; }return c; },_onDocumentClick:function(d){if(!d){d=event; }var c=d.target||d.srcElement; while(c.nodeType!==9){if(c.parentNode==null||c==this.get_element()||c==this.get_dropDownElement()){return; }c=c.parentNode; }if(this._focused){this._raiseClientBlur(d); this._selectItemOnBlur(d); this._focused=false; }if(this.get_dropDownVisible()&&this.get_closeDropDownOnBlur()){this._hideDropDown(d); }},_selectItemOnBlur:function(d){if(this.get_emptyMessage()&&(this.get_text()==this.get_emptyMessage())){return; }var c=this._findItemToSelect(); if(!c&&!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); c=this.get_highlightedItem(); }}if(this.get_filter()!=a.RadComboBoxFilter.None){this.setAllItemsVisible(true); }if(!c){var f=this.get_selectedItem(); if(f){f.set_selected(false); this.set_selectedItem(null); this.set_selectedIndex(null); }}this._performSelect(c,d); },_onWindowResize:function(){if(this.get_dropDownVisible()){this._positionDropDown(); }},_onWindowUnload:function(){this._disposeChildElements=false; },_onKeyDown:function(g){this._isKeyPressed=true; if($telerik.isIE8||($telerik.isIE&&this._isAspNet35)){var h=this; setTimeout(function(){h._handleInputValueChange(); },0); }if(!this._fireEvents||this._ajaxRequest){return; }if(!g){g=event; }this.raise_onClientKeyPressing(g); var f=g.keyCode||g.which; this._lastKeyCode=f; if(f==a.Keys.Escape&&this.get_dropDownVisible()){if(this.get_dropDownVisible()){this._hideDropDown(g); }return; }else{if(f===a.Keys.Enter){if(this.get_dropDownVisible()){this._hideDropDown(g); }this._performSelect(this.get_highlightedItem(),g); if(this.get_markFirstMatch()){var d=this.get_text().length; this.selectText(d,d); }g.returnValue=false; if(g.preventDefault){g.preventDefault(); }return; }else{if(f===a.Keys.Down){g.returnValue=false; if(g.altKey){this._toggleDropDown(g); return; }this.highlightNextItem(null); if(g.preventDefault){g.preventDefault(); }return; }else{if(f===a.Keys.Up){g.returnValue=false; if(g.altKey){this._toggleDropDown(g); return; }this.highlightPreviousItem(); if(g.preventDefault){g.preventDefault(); }return; }else{if(f===a.Keys.Tab){if(this.get_dropDownVisible()){this._hideDropDown(g); }this._raiseClientBlur(g); this._selectItemOnBlur(g); this._focused=false; return; }}}}}if(f==a.Keys.Left||f==a.Keys.Right){return; }if(f>=a.Keys.Numpad0&&f<=a.Keys.Numpad9){f-=(a.Keys.Numpad0-a.Keys.Zero); }var c=String.fromCharCode(f); if(c&&(!g.altKey)&&!(this.get_enableLoadOnDemand()||!this.get_readOnly())){this.highlightNextItem(c); return; }},_onKeyPress:function(d){if(!this._fireEvents){return; }var c=d.charCode||d.keyCode; if(this._ajaxRequest){if(c===a.Keys.Enter){d.returnValue=false; if(d.preventDefault){d.preventDefault(); }}return; }if((this.get_markFirstMatch())&&(this.get_autoCompleteSeparator())&&(this.get_autoCompleteSeparator().search(String.fromCharCode(c))!=-1)){this._performSelect(this.get_highlightedItem(),d); if(this.get_highlightedItem()){this.get_highlightedItem().unHighlight(); }var f=this.get_text().length; this.selectText(f,f); }},_onImageClick:function(c){if(this._enabled){this._toggleDropDown(c); }},_onInputCellClick:function(c){if(this._enabled){if(this.get_text()!==this.get_emptyMessage()){this.selectText(0,this.get_text().length); }if(!this.get_dropDownVisible()&&this._showDropDownOnTextboxClick){this._showDropDown(c); }return true; }},_onMoreResultsBoxClick:function(c){this.requestItems(this._filterText,true); },_onMoreResultsBoxOver:function(c){this.get_moreResultsBoxElement().style.cursor="pointer"; },_onMoreResultsBoxOut:function(c){this.get_moreResultsBoxElement().style.cursor="default"; },_onFocus:function(d){if(this._focused){return; }if(this.get_emptyMessage()&&this.get_emptyMessage()==this.get_text()){this._suppressChange=true; this.get_inputDomElement().value=this._text; if($telerik.isIE8||($telerik.isIE&&this._isAspNet35)){this._handleInputValueChange(); }(function(e){setTimeout(function(){e.get_inputDomElement().className="rcbInput"; },0); })(this); this._suppressChange=false; }var c=this.get_tableElement(); if(c!=null){(function(){setTimeout(function(){c.className="rcbFocused"; },0); })(); }if(!d&&typeof(event)!="undefined"){d=event; }this._focused=true; this.raise_onClientFocus(d); return true; },_raiseClientBlur:function(d){if(this._focused){var c=this.get_tableElement(); if(c!=null){c.className=""; }this._applyEmptyMessage(); this.raise_onClientBlur(d); }},_applyEmptyMessage:function(){if(this.get_emptyMessage()&&this.get_text()==""){this._suppressChange=true; this.get_inputDomElement().value=this.get_emptyMessage(); if($telerik.isIE8||($telerik.isIE&&this._isAspNet35)){this._handleInputValueChange(); }this.get_inputDomElement().className+=" rcbEmptyMessage"; this._suppressChange=false; }},_onInputChange:function(){var d=this.get_text(); if(this._isKeyPressed){this._filterText=d; }this._isKeyPressed=false; if(!this.get_emptyMessage()||d!=this.get_emptyMessage()){this._ensureChildControls(); this._text=d; }this.set_value(""); this.get_inputDomElement().className="rcbInput"; this.get_element().value=this._text; this.updateClientState(); if(!this._suppressChange){if(this.get_enableLoadOnDemand()){var c=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(c._disposed){return; }c.requestItems(c._filterText,false); },c.get_itemRequestTimeout()); return; }if(this.get_filter()==a.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"){this._handleInputValueChange(); }},_handleInputValueChange:function(){var c=this.get_text(); if(this._cachedText!=c){this._cachedText=c; this._onInputChange(); }},_shouldHighlight:function(){if(this._lastKeyCode=a.Keys.PageUp)&&(this._lastKeyCode<=a.Keys.Del)){return false; }if((this._lastKeyCode>=a.Keys.F1)&&(this._lastKeyCode<=a.Keys.F12)){return false; }return true; },_showDropDown:function(f){if(this._firstOpeningOfDropDown){this._applyZIndex(); this._firstOpeningOfDropDown=false; }this._highlightFirstMatch(); if(this.raise_dropDownOpening(f)==true){return; }var d=this._getAnimationContainer(); if(!d){return; }var g=this.get_text(); if(this.get_emptyMessage()==this.get_text()){g=""; }if(this.get_enableLoadOnDemand()&&this.get_items().get_count()==0&&!this._skipLoadingItems){this.requestItems(g,false); }d.style.visibility="hidden"; this.get_dropDownElement().style.visibility="hidden"; if(window.netscape&&!window.opera){this.get_childListElementWrapper().style.overflow="hidden"; }this._slide.show(); this._resetAnimatedElementPosition(); this._slide.set_direction(this.get_slideDirection()); try{this.get_inputDomElement().focus(); }catch(f){}this._onFocus(f); this.set_dropDownVisible(true); this._positionDropDown(); var c=this.get_dropDownElement(); c.style.top=-c.offsetHeight+"px"; this._skipDropDownPositioning=true; this._slide.updateSize(); this._skipDropDownPositioning=null; d.style.visibility="visible"; this._slide.expand(); this.raise_dropDownOpened(f); },_toggleDropDown:function(c){if(this.get_dropDownVisible()){this._hideDropDown(c); }else{this._showDropDown(c); }},_hideDropDown:function(c){if(!this.get_dropDownVisible()){return; }if(this.raise_dropDownClosing(c)==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()!=a.RadComboBoxFilter.None){this._removeEmTagsFromAllItems(); }this.raise_dropDownClosed(c); },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 d=this.get_moreResultsBoxElement(); var c=$telerik.getFirstChildByTagName(d,"span",0); return c; },get_moreResultsBoxElement:function(){var c=this._getChildElement("MoreResultsBox"); return c; },get_emptyMessage:function(){return this._emptyMessage; },set_emptyMessage:function(c){if(this._emptyMessage!==c){this._emptyMessage=c; }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(c){this._slideDirection=c; this._slide.set_direction(c); },hideDropDown:function(){this._hideDropDown(null); },showDropDown:function(){if(this._enabled){this._showDropDown(null); }},toggleDropDown:function(){if(this._enabled){this._toggleDropDown(null); }},_resetAnimatedElementPosition:function(){var c=this._getAnimatedElement(); c.style.top="0px"; c.style.left="0px"; },get_readOnly:function(){return !(this.get_allowCustomText()||this.get_markFirstMatch())&&this.get_filter()==a.RadComboBoxFilter.None; },_performSelect:function(f,d){if(f&&f!=this.get_selectedItem()&&!this.get_enableLoadOnDemand()){f._select(d); return; }if(f&&f==this.get_selectedItem()&&this.getLastWord(this.get_text())!=f.get_text()&&!this.get_readOnly()){this.set_text(f.get_text()); return; }if(f&&f==this.get_selectedItem()){return; }if(f&&this.get_originalText()!=f.get_text()){f._select(d); return; }if(f&&(!this.get_selectedItem()||this.get_selectedItem().get_value()!=f.get_value())){f._select(d); return; }if(this.get_originalText()!=this.get_text()){if(this.get_highlightedItem()){this.get_highlightedItem().unHighlight(); }if(this.raise_textChange(this,d)==true){return; }var c={Command:"TextChanged"}; this.postback(c); }},set_value:function(c){this._value=c; this.updateClientState(); },get_value:function(){return this._value; },set_text:function(d){d=a.RadComboBox.htmlDecode(d); this.get_element().value=d; this._suppressChange=true; var f=this.get_inputDomElement(); f.value=d; if($telerik.isIE8||($telerik.isIE&&this._isAspNet35)){this._handleInputValueChange(); }f.className="rcbInput"; this.set_value(""); if(f.fireEvent&&document.createEventObject){var c=document.createEventObject(); f.fireEvent("onchange",c); }else{if(f.dispatchEvent){var e=true; var c=document.createEvent("HTMLEvents"); c.initEvent("change",e,true); f.dispatchEvent(c); }}this._suppressChange=false; this._ensureChildControls(); this._text=d; this.updateClientState(); },get_webServiceSettings:function(){return this._webServiceSettings; },set_webServiceSettings:function(c){var d=Sys.Serialization.JavaScriptSerializer.deserialize(c); this._webServiceSettings=new a.WebServiceSettings(d); },get_text:function(){return this.get_inputDomElement().value; },enable:function(){this.get_inputDomElement().disabled=false; var d=this.get_tableElement(); if(d!=null){d.className=""; }this.set_enabled(true); this.enableEvents(); var c=this.get_items().get_count(); for(var e=0; e=0){g[f].highlight(); g[f].scrollIntoView(); var d=this._getLastSeparatorIndex(this.get_text()); var e=this.get_text().substring(0,d+1)+g[f].get_text(); if(this.get_changeText()){this.set_text(e); this.set_value(g[f].get_value()); }}},highlightNextItem:function(f){var e=this.get_visibleItems(); var g=this.get_highlightedItem(); if(!g){g=this.get_selectedItem(); }var k=0; if(g){var j=e.length; for(var c=0; c0){var c=this.get_visibleItems(); var e=c.length; for(var d=0; dd&&!this._checkIsThisPartOfWord(c,f)){d=c; }}return d; },_checkIsThisPartOfWord:function(f,e){var d=""; if(this.get_selectedItem()){d=this.get_selectedItem().get_text(); }var c=d.lastIndexOf(e); if(c>-1&&c==f){return true; }return false; },selectText:function(e,d){if(!this.get_enableTextSelection()){return; }if((!this.get_enableLoadOnDemand())&&(this.get_readOnly())){return; }if(this.get_inputDomElement().createTextRange){var c=this.get_inputDomElement().createTextRange(); if(e==0&&d==0){c.collapse(true); return; }c.moveStart("character",e); c.moveEnd("character",d); c.select(); }else{this.get_inputDomElement().setSelectionRange(e,e+d); }},_childRemoving:function(c){var d=c.get_index(); if(this._itemData){Array.remove(this._itemData,this._itemData[d]); }a.RadComboBox.callBaseMethod(this,"_childRemoving",[c]); },_childRemoved:function(d,c){var e=d.get_element(); if(d==this.get_selectedItem()){this.set_selectedItem(null); this.set_highlightedItem(null); this.set_text(""); }if(c.get_items().get_count()==0&&!this._getHeaderElement()&&!this._getFooterElement()){e=c._childListElement; c._childListElement=null; }if(e){e.innerHTML=""; if(e.parentNode){e.parentNode.removeChild(e); }e=null; }a.RadComboBox.callBaseMethod(this,"_childRemoved",[d,c]); },_childrenCleared:function(e){this.set_selectedItem(null); this.set_highlightedItem(null); var c=e.get_childListElement(); var d=e.get_items().get_count(); if(c&&!this._getHeaderElement()&&!this._getFooterElement()){for(var f=0; f0)||this.get_endOfItems()){return; }}else{this._filterText=f; }this._ensureChildControls(); f=f.replace(/'/g,"&squote"); this._ajaxRequest=true; var d={}; this.set_appendItems(c); d.Text=f; d.NumberOfItems=0; if(this.get_appendItems()){d.NumberOfItems=this.get_items().get_count(); }var e=new a.RadComboBoxRequestCancelEventArgs(f,d); this.raiseEvent("itemsRequesting",e); if(e.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); }f=encodeURIComponent(f); this._callbackText=f; this._pendingAjaxRequestsCount++; if(this.get_webServiceSettings().get_method()){this._doLoadOnDemandFromWebService(f,d); }else{this._doLoadOnDemand(f,d); }},_doLoadOnDemand:function(h,d){var f=0; if(this.get_appendItems()){f=this.get_items().get_count(); }var c={Command:"LOD",Text:h,ClientState:this._clientState,Context:d,NumberOfItems:f}; var g=Function.createDelegate(this,this._onCallbackResponse); var e=Function.createDelegate(this,this._onErrorReceived); if(this.get_enableItemCaching()&&this.lodHashTable[h+"$"+f]!=null){this._onCallbackResponse(this.lodHashTable[h+"$"+f]); }else{WebForm_DoCallback(this._uniqueId,Sys.Serialization.JavaScriptSerializer.serialize(c),g,h,e,true); }},_onCallbackResponse:function(e){if(this._disposed){return; }this._pendingAjaxRequestsCount--; this.set_selectedItem(null); this.set_highlightedItem(null); var q=this._children.get_count(); var p=this.get_text(); var m=0; var l=e.split("_$$_")[4]; if((this._pendingAjaxRequestsCount==0)&&(l!=this._callbackText)){this.requestItems(this._callbackText,this.get_appendItems()); return; }if(this.get_appendItems()){m=this.get_items().get_count(); }if(this.get_enableItemCaching()&&this.lodHashTable[l+"$"+m]==null){this.lodHashTable[l+"$"+m]=e; }var j=e.split("_$$_"); var n; if(j[0]=="[]"){n=null; }else{n=eval(j[0]); }if(j[3]=="True"){this.set_endOfItems(true); }else{this.set_endOfItems(false); }if(this.get_appendItems()&&this._itemData&&n){Array.addRange(this._itemData,n); }else{this._itemData=n; }if(this._loadingDiv){if(this._loadingDiv.parentNode){this._loadingDiv.parentNode.removeChild(this._loadingDiv); }this._loadingDiv=null; }var h=this.get_childListElement(); if(!h){h=this._createChildListElement(); }this._childControlsCreated=true; var g=$telerik.getFirstChildByTagName(h,"div",0); if(g){g.parentNode.removeChild(g); }if(this.get_appendItems()){var k=document.createElement("ul"); k.innerHTML=j[1]; var o=$telerik.getChildrenByTagName(k,"li"); var f=o.length; for(var c=0; c0){d=this.get_items().getItem(0).get_element().offsetHeight; }if(g){var c=$telerik.getFirstChildByTagName(e,"div",0); if(c){c.parentNode.removeChild(c); }}else{var c=document.createElement("div"); if(this._height==""&&this._maxHeight!=""){c.style.height=this._maxHeight+"px"; }else{c.style.height=this.get_childListElementWrapper().offsetHeight+"px"; }e.appendChild(c); }},_onErrorReceived:function(e,c){if(this._requestTimeoutID>0){window.clearTimeout(this._requestTimeoutID); this._requestTimeoutID=0; }var d=this._extractErrorMessage(e); if(this.raise_itemsRequestFailed(c,d,null)==true){return; }alert(d); },_initializeWebServiceLoader:function(){this._webServiceLoader=new a.WebServiceLoader(this.get_webServiceSettings()); this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onWebServiceResponse)); this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onWebServiceError)); },_doLoadOnDemandFromWebService:function(f,d){if(!this._webServiceLoader){this._initializeWebServiceLoader(); }var c={context:d}; if(this.get_webServiceSettings().get_isWcf()){c.context=this._webServiceLoader._serializeDictionaryAsKeyValuePairs(c.context); }var e=d.NumberOfItems; if(this.get_enableItemCaching()&&this.lodHashTable[f+"$"+e]!=null){this._pendingAjaxRequestsCount--; this._addNewItems(f,this.lodHashTable[f+"$"+e]); }else{this._webServiceLoader.loadData(c,f); }},_onWebServiceResponse:function(c,f){this._pendingAjaxRequestsCount--; var d=f.get_data(); var g=f.get_context(); var e=0; if(this.get_appendItems()){e=this.get_items().get_count(); }if((this._pendingAjaxRequestsCount==0)&&(g!=this._callbackText)){this.requestItems(this._callbackText,this.get_appendItems()); return; }if(this.get_enableItemCaching()){this.lodHashTable[g+"$"+e]=d; }this._addNewItems(g,d); },_addNewItems:function(m,e){this.set_selectedItem(null); this.set_highlightedItem(null); this._childControlsCreated=true; var s=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 g=this.get_childListElement(); if(!g){g=this._createChildListElement(); }if(this._virtualScroll){this._setUpScroll(true,g); }var d=null; if(Array.prototype.isPrototypeOf(e)){d=e; }else{d=e.Items; this.set_endOfItems(e.EndOfItems); this.set_showMoreMessage(e.Message); }this._childControlsCreated=false; var j=this.get_webServiceSettings().get_isWcf(); var f=[]; for(var c=0,o=d.length; c=p)&&k){var n=c-p; var q=new a.RadComboBoxItemDataBoundEventArgs(r,d[n]); this.raiseEvent("itemDataBound",q); }}this._setUpDropDownAfterRequest(m,g,s); },_setUpDropDownAfterRequest:function(e,c,d){if(this._virtualScroll){this._setUpScroll(this.get_endOfItems(),c); }if(this.get_appendItems()&&(this.get_items().getItem(d+1)!=null)){this.get_items().getItem(d+1).scrollIntoView(); }if(this._showMoreResultsBox&&this.get_moreResultsBoxMessageElement()){this.get_moreResultsBoxMessageElement().innerHTML=this.get_showMoreMessage(); }this.raise_itemsRequested(e,null); if(this.get_filter()==a.RadComboBoxFilter.None){this.highlightMatches(); }else{this.highlightAllMatches(this.get_text()); }if(this.get_dropDownVisible()){this._skipDropDownPositioning=true; if(this._slide){this._slide.updateSize(); }this._skipDropDownPositioning=null; this._positionDropDown(); }this._ajaxRequest=false; },_onWebServiceError:function(c,e){var d=e.get_message(); var f=e.get_context(); this._onErrorReceived(d,f); }}; b.registerControlProperties(a.RadComboBox,{autoCompleteSeparator:null,appendItems:false,endOfItems:false,enableLoadOnDemand:false,closeDropDownOnBlur:true,changeText:true,enableTextSelection:true,dropDownVisible:false,highlightedItem:null,filter:0,clientDataString:null,isCaseSensitive:false,itemRequestTimeout:300,showMoreMessage:"",errorMessage:"CallBack Error!",loadingMessage:"Loading...",offsetX:0,offsetY:0}); b.registerControlEvents(a.RadComboBox,["load","keyPressing","textChange","itemsRequestFailed","selectedIndexChanging","selectedIndexChanged","itemsRequesting","itemsRequested","itemDataBound","dropDownOpening","dropDownOpened","dropDownClosing","dropDownClosed","onClientFocus","onClientBlur"]); a.RadComboBox._preInitialize=function(c){var d=$get(c); var e="inline-block"; if($telerik.isIE6||$telerik.isIE7){e="inline"; }else{if($telerik.isFirefox2){e="-moz-inline-stack"; }}d.style.display=e; }; a.RadComboBox.registerClass("Telerik.Web.UI.RadComboBox",a.ControlItemContainer); })(); Type.registerNamespace("Telerik.Web.UI"); (function(){var b=$telerik.$; var a=Telerik.Web.UI; a.RadComboBoxItem=function(){a.RadComboBoxItem.initializeBase(this); }; a.RadComboBoxItem.prototype={_shouldInitializeChild:function(c){return false; },get_text:function(){if(this._text!==null){return this._removeEmTags(this._text); }if((this._text=this._properties.getValue("text",null))!=null){return this._removeEmTags(this._text); }if(!this.get_element()){return""; }var c=this.get_textElement(); if(!c){return""; }if(typeof(c.innerText)!="undefined"){this._text=c.innerText; }else{this._text=c.textContent; }if($telerik.isSafari2){this._text=c.innerHTML; }return this._removeEmTags(this._text); },get_baseText:function(){return a.RadComboBoxItem.callBaseMethod(this,"get_text"); },_removeEmTags:function(e){var c=e.indexOf(""); var d=e.indexOf(""); if(c>=0&&d>c){e=String.format("{0}{1}{2}",e.substr(0,c),e.substr(c+4,d-c-4),e.substr(d+5)); }return e; },set_visible:function(c){var d=this.get_visible()!=c; if(!d){return; }a.RadComboBoxItem.callBaseMethod(this,"set_visible",[c]); if(c){this.get_element().style.display=""; }else{this.get_element().style.display="none"; }},_markText:function(k){var m=this.get_comboBox(); var g=this.get_baseText(); var c=this.get_text(); var n=this.get_imageElement(); if(!m.get_isTemplated()){this.set_text(c); this.get_element().innerHTML=a.RadComboBox.htmlEncode(c); }g=c; var i=g.toLowerCase().indexOf(k.toLowerCase()); var f=m.get_filter()==a.RadComboBoxFilter.Contains&&(i>=0); var o=m.get_filter()==a.RadComboBoxFilter.StartsWith&&(i==0); if(f||o){if(k!=""&&!m.get_isTemplated()){var l="{0}{1}{2}"; var j=g.substr(0,i); var h=g.substring(i,i+k.length); var e=g.substr(i+k.length); var d=String.format(l,j,h,e); this.set_text(d); this.get_element().innerHTML=String.format(l,a.RadComboBox.htmlEncode(j),a.RadComboBox.htmlEncode(h),a.RadComboBox.htmlEncode(e)); }this.set_visible(true); }else{this.set_visible(false); }b(this.get_element()).prepend(n); },_render:function(c){c[c.length]="
  • "; }else{c[c.length]="rcbItem'>"; }}else{c[c.length]="rcbDisabled'>"; }if(this.get_imageUrl()){this._renderImage(c); }c[c.length]=this.get_text(); c[c.length]="
  • "; },_renderImage:function(c){c[c.length]="e+g){c.scrollTop=h+f-g; if(c.clientWidth