(function(a,b){if(!b.RadComboBox.Views){b.RadComboBox.Views={}; }b.RadComboBox.Views.Classic=function(c){b.RadComboBox.makeEventHandler(this); this._owner=c; this._enabled=c.get_enabled(),this._wrapper=$telerik.getFirstChildByTagName(c.get_element(),"table",0); a(c.get_element()).find("caption").hide(); }; b.RadComboBox.Views.Classic.prototype={initialize:function(){this.get_wrapper().style.display=""; this.initDomEvents(); },initDomEvents:function(){var f=this.get_wrapper(),e=this._owner,d=e.get_inputDomElement(),c=e.get_imageDomElement(); this._onTableHoverDelegate=Function.createDelegate(this,this._onTableHover); $telerik.addExternalHandler(f,"mouseover",this._onTableHoverDelegate); this._onTableOutDelegate=Function.createDelegate(this,this._onTableOut); $telerik.addExternalHandler(f,"mouseout",this._onTableOutDelegate); this._onInputCellMouseUpDelegate=Function.createDelegate(this,this._onInputCellClick); $telerik.addExternalHandler(d.parentNode,"mouseup",this._onInputCellMouseUpDelegate); this._onImageClickDelegate=Function.createDelegate(this,this._onImageClick); $telerik.addHandler(c,"click",this._onImageClickDelegate); },dispose:function(){this.disposeEvents(); this.disposeDomEvents(); this._nulifyEventExpandos(); },disposeDomEvents:function(){var f=this.get_wrapper(),e=this._owner,d=e.get_inputDomElement(),c=e.get_imageDomElement(); $telerik.removeExternalHandler(f,"mouseover",this._onTableHoverDelegate); $telerik.removeExternalHandler(f,"mouseout",this._onTableOutDelegate); this._onTableHoverDelegate=null; this._onTableOutDelegate=null; if(d.parentNode){$telerik.removeExternalHandler(d.parentNode,"mouseup",this._onInputCellMouseUpDelegate); this._onInputCellMouseUpDelegate=null; }if(c){$telerik.removeHandler(c,"click",this._onImageClickDelegate); this._onImageClickDelegate=null; }},disable:function(){this.withWrapper(function(c){a(c).attr("class","rcbDisabled"); }); },enable:function(){this.withWrapper(function(c){c.removeAttribute("class"); }); },repaint:function(){var i=this._owner,f=i.get_element(),g=a(f).find(".rcbLabel").get(0),k=this.get_wrapper(),j=k.getElementsByTagName("tr")[0]; a(j).toggleClass("rcbReadOnly",i.get_readOnly()); if(g){var e=f.offsetWidth,h=g.offsetWidth; tableWidth=e-h; if(tableWidth==0){var c=f,d=c.style.width; if(d.indexOf("%",0)==-1){tableWidth=this._measureTableWidthWithLabel(); }}if(tableWidth>0){var l=$telerik.getMargin(k,Telerik.Web.BoxSide.Right); if(tableWidth-l>=0){tableWidth-=l; }}k.style.width=tableWidth+"px"; }k.style.display=""; if(i._fakeInput){i._repaintFakeInput(); }},focus:function(c){this.withWrapper(function(d){setTimeout(function(){a(d).attr("class","rcbFocused"); },0); }); },blur:function(c){this.withWrapper(function(d){d.removeAttribute("class"); if($telerik.isIE){a(d).removeAttr("class"); }}); },withWrapper:function(c){var d=this.get_wrapper(); if(d!=null){c.apply(this,[d]); }},_nulifyEventExpandos:function(){var c=this._owner; c._inputDomElement._events=null; c._inputDomElement=null; c._imageDomElement._events=null; c._imageDomElement=null; if(this._wrapper){this._wrapper.events=null; this._wrapper=null; }},_measureTableWidthWithLabel:function(){var i=this._owner,f=i.get_element(),g=a(f).find("label").get(0).cloneNode(false),d=this.get_wrapper().cloneNode(false),c=f.cloneNode(false); c.style.position="absolute"; c.style.top="-1000px"; c.style.left="-1000px"; c.appendChild(g); c.appendChild(d); document.body.appendChild(c); var l=document.createElement("td"),m=document.createElement("tr"); m.appendChild(l); var k=document.createElement("tbody"); k.appendChild(m); d.appendChild(k); var e=c.offsetWidth,h=g.offsetWidth,j=e-h; document.body.removeChild(c); return j; },_onTableHover:function(c){if(!this._owner.get_enabled()){return; }var d=this.get_wrapper(); if(d!=null&&d.className!="rcbFocused"){d.className="rcbHovered"; }},_onTableOut:function(c){if(!this._owner.get_enabled()){return; }var d=this._wrapper; relatedTarget=this._owner._getRelatedTarget(c); if(!relatedTarget){return; }while(relatedTarget&&relatedTarget.nodeType!==9){if(relatedTarget.parentNode&&relatedTarget.parentNode==d){return; }relatedTarget=relatedTarget.parentNode; }if(d!=null&&d.className=="rcbHovered"){d.className=""; }},_onInputCellClick:function(c){this.trigger("inputClick",c); },_onImageClick:function(c){this.trigger("buttonClick",c); },get_wrapper:function(){return this._wrapper; }}; })($telerik.$,Telerik.Web.UI);