Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.BoxCorners=function(){throw Error.invalidOperation();};Sys.Extended.UI.BoxCorners.prototype={None:0,TopLeft:1,TopRight:2,BottomRight:4,BottomLeft:8,Top:3,Right:6,Bottom:12,Left:9,All:15};Sys.Extended.UI.BoxCorners.registerEnum("Sys.Extended.UI.BoxCorners",!0);Sys.Extended.UI.RoundedCornersBehavior=function(n){Sys.Extended.UI.RoundedCornersBehavior.initializeBase(this,[n]);this._corners=Sys.Extended.UI.BoxCorners.All;this._radius=5;this._color=null;this._parentDiv=null;this._originalStyle=null;this._borderColor=null;this._isDirty=!0};Sys.Extended.UI.RoundedCornersBehavior.prototype={initialize:function(){Sys.Extended.UI.RoundedCornersBehavior.callBaseMethod(this,"initialize");this.update()},dispose:function(){this.disposeParentDiv();Sys.Extended.UI.RoundedCornersBehavior.callBaseMethod(this,"dispose")},update:function(){var n=this.get_element(),f,h,r,u;if(n&&this._isDirty&&!this.get_isUpdating())if(this.disposeParentDiv(),n.style.borderRadius!=undefined)n.style.borderRadius=this._radius+"px",this._borderColor?(n.style.border="solid",n.style.borderWidth="1px",n.style.borderColor=this._borderColor):(n.style.border="none",n.style.borderWidth="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(n.style.borderTopLeftRadius="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(n.style.borderBottomLeftRadius="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(n.style.borderTopRightRadius="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(n.style.borderBottomRightRadius="0");else if(n.style.MozBorderRadius!=undefined)n.style.MozBorderRadius=this._radius+"px",this._borderColor?(n.style.border="solid",n.style.borderWidth="1px",n.style.borderColor=this._borderColor):(n.style.border="none",n.style.borderWidth="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(n.style.MozBorderRadiusTopleft="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(n.style.MozBorderRadiusBottomleft="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(n.style.MozBorderRadiusTopright="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(n.style.MozBorderRadiusBottomright="0");else if(n.style.WebkitBorderRadius!=undefined)n.style.WebkitBorderRadius=this._radius+"px",this._borderColor?(n.style.border="solid",n.style.borderWidth="1px",n.style.borderColor=this._borderColor):(n.style.border="none",n.style.borderWidth="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(n.style.WebkitBorderRadiusTopLeft="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(n.style.WebkitBorderRadiusBottomLeft="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(n.style.WebkitBorderRadiusTopRight="0"),this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(n.style.WebkitBorderRadiusBottomRight="0");else{var v=this.getBackgroundColor(),c=n.offsetWidth,t=n.cloneNode(!1);this.moveChildren(n,t);this._originalStyle=n.style.cssText;n.style.backgroundColor="transparent";n.style.verticalAlign="top";n.style.padding="0";n.style.overflow="";n.style.className="";n.style.height&&n.style.height!="auto"?n.style.height=parseInt($common.getCurrentStyle(n,"height"))+this._radius*2+"px":!n.style.width&&00;f--){var y=Math.acos(f/s),o=s-Math.round(Math.sin(y)*s),i=document.createElement("DIV");i.__roundedDiv=!0;i.style.backgroundColor=v;i.style.marginLeft=o+"px";i.style.marginRight=o-(this._borderColor?2:0)+"px";i.style.height="1px";i.style.fontSize="1px";i.style.overflow="hidden";this._borderColor&&(i.style.borderLeftStyle="solid",i.style.borderRightStyle="solid",i.style.borderLeftColor=this._borderColor,i.style.borderRightColor=this._borderColor,h=Math.max(0,a-o-1),i.style.borderLeftWidth=h+1+"px",i.style.borderRightWidth=h+1+"px",f==l&&(i.__roundedDivNoBorder=!0,i.style.backgroundColor=this._borderColor));n.insertBefore(i,e);r=i;i=i.cloneNode(!0);i.__roundedDiv=!0;n.insertBefore(i,e);u=i;e=i;a=o;this.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)||(r.style.marginLeft="0",this._borderColor&&(r.style.borderLeftWidth="1px"));this.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)||(r.style.marginRight="0",this._borderColor&&(r.style.borderRightWidth="1px",r.style.marginRight="-2px"));this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)||(u.style.marginLeft="0",this._borderColor&&(u.style.borderLeftWidth="1px"));this.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)||(u.style.marginRight="0",this._borderColor&&(u.style.borderRightWidth="1px",u.style.marginRight="-2px"))}n.insertBefore(t,e);this._parentDiv=t;this._isDirty=!1}},disposeParentDiv:function(){var n,r,i,t;if(this._parentDiv){for(n=this.get_element(),r=n.childNodes,i=r.length-1;i>=0;i--)if(t=r[i],t){t==this._parentDiv&&this.moveChildren(t,n);try{n.removeChild(t)}catch(n){}}this._originalStyle&&(n.style.cssText=this._originalStyle,this._originalStyle=null);this._parentDiv=null}},getBackgroundColor:function(){return this._color?this._color:$common.getCurrentStyle(this.get_element(),"backgroundColor")},moveChildren:function(n,t){for(var r=0,i;n.hasChildNodes();)i=n.childNodes[0],i=n.removeChild(i),t.appendChild(i),r++;return r},isCornerSet:function(n){return(this._corners&n)!=Sys.Extended.UI.BoxCorners.None},setCorner:function(n,t){t?this.set_corners(this._corners|n):this.set_corners(this._corners&~n)},get_color:function(){return this._color},set_color:function(n){n!=this._color&&(this._color=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("color"))},get_Color:function(){return Sys.Extended.Deprecated("get_Color()","get_color()"),this.get_color()},set_Color:function(n){Sys.Extended.Deprecated("set_Color(value)","set_color(value)");this.set_color(n)},get_radius:function(){return this._radius},set_radius:function(n){n!=this._radius&&(this._radius=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("radius"))},get_Radius:function(){return Sys.Extended.Deprecated("get_Radius()","get_radius()"),this.get_radius()},set_Radius:function(n){Sys.Extended.Deprecated("set_Radius(value)","set_radius(value)");this.set_radius(n)},get_corners:function(){return this._corners},set_corners:function(n){n!=this._corners&&(this._corners=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("corners"))},get_Corners:function(){return Sys.Extended.Deprecated("get_Corners()","get_corners()"),this.get_corners()},set_Corners:function(n){Sys.Extended.Deprecated("set_Corners(value)","set_corners(value)");this.set_corners(n)},get_borderColor:function(){return this._borderColor},set_borderColor:function(n){n!=this._borderColor&&(this._borderColor=n,this._isDirty=!0,this.update(),this.raisePropertyChanged("borderColor"))},get_BorderColor:function(){return Sys.Extended.Deprecated("get_BorderColor()","get_borderColor()"),this.get_borderColor()},set_BorderColor:function(n){Sys.Extended.Deprecated("set_BorderColor(value)","set_borderColor(value)");this.set_borderColor(n)}};Sys.Extended.UI.RoundedCornersBehavior.registerClass("Sys.Extended.UI.RoundedCornersBehavior",Sys.Extended.UI.BehaviorBase);