/* * * GrapeCity InputMan Library 1.0.0 * http://grapecity.com/ * * Copyright(c) GrapeCity, Inc. All rights reserved. * **/ var GCIM;(function(n){var i=function(){function t(){}return t.CreateTempDomElement=function(t){var i=n.Utility.CreateInnerDiv(),r;return i.style.fontFamily=t.GetFontFamily(),r=t.GetFontSize(),r!==""&&(i.style.fontSize=n.Utility.GetFontSizeUnitValue(r)+"px"),i.style.fontStyle=t.GetFontStyle(),i.style.fontWeight=t.GetFontWeight(),i},t.GetEventCurrentTarget=function(t){var i,r;if(n.Utility.IsIE8OrBelow){i=t.srcElement;while(i!=null){r=i.getAttribute("CellType");if(r!=null)return i;i=i.parentElement}return null}else return t.currentTarget},t}(),t;n.BalloonTipUtility=i,t=function(){function n(n){this.Cancel=!1,this.TipClosedMode=typeof n=="undefined"?"":n}return n}(),n.BalloonTipEventArgs=t})(GCIM||(GCIM={}));var GCIM;(function(n){var i=function(){function t(n,t,i){this.InitBalloonTipInfo(),arguments.length==1?this._text=arguments[0]:arguments.length==2?(this._text=arguments[0],this._caption=arguments[1]):arguments.length==3&&(this._text=arguments[0],this._icon=arguments[1],this._span=arguments[2])}return t.prototype.GetID=function(){return this._id},t.prototype.GetAutoClose=function(){return this._autoClose},t.prototype.GetBackColor=function(){return this._backColor},t.prototype.GetSpan=function(){return this._span},t.prototype.GetShowCloseButton=function(){return this._showCloseButton},t.prototype.GetIcon=function(){return this._icon},t.prototype.GetCaption=function(){return this._caption},t.prototype.GetCaptionForeColor=function(){return this._captionForeColor},t.prototype.GetCaptionFont=function(){var t=new n.UserFont;return t.Name=this.GetCaptionFontFamily(),t.Size=this.GetCaptionFontSize(),t.Bold=this.GetCaptionFontWeight(),t.Italic=this.GetCaptionFontStyle(),t.ParseTextDecorationString(this.GetCaptionTextDecoration()),t},t.prototype._getInnerCaptionFont=function(){return this._captionFont},t.prototype.SetCaptionFont=function(t){t.Name!==undefined&&this.SetCaptionFontFamily(t.Name),t.Size!==undefined&&this.SetCaptionFontSize(t.Size),t.Bold!==undefined&&this.SetCaptionFontWeight(t.Bold),t.Italic!==undefined&&this.SetCaptionFontStyle(t.Italic),this.SetCaptionTextDecoration(n.UserFont.GetTextDecorationStringFromObj(t))},t.prototype.GetTextFont=function(){var t=new n.UserFont;return t.Name=this.GetTextFontFamily(),t.Size=this.GetTextFontSize(),t.Bold=this.GetTextFontWeight(),t.Italic=this.GetTextFontStyle(),t.ParseTextDecorationString(this.GetTextTextDecoration()),t},t.prototype._getInnerTextfont=function(){return this._textFont},t.prototype.SetTextFont=function(t){t.Name!==undefined&&this.SetTextFontFamily(t.Name),t.Size!==undefined&&this.SetTextFontSize(t.Size),t.Bold!==undefined&&this.SetTextFontWeight(t.Bold),t.Italic!==undefined&&this.SetTextFontStyle(t.Italic),this.SetTextTextDecoration(n.UserFont.GetTextDecorationStringFromObj(t))},t.prototype.GetCaptionFontFamily=function(){return this._captionFont.GetFontFamily()},t.prototype.GetCaptionFontSize=function(){return this._captionFont.GetFontSize()},t.prototype.GetCaptionFontWeight=function(){return this._captionFont.GetFontWeight()},t.prototype.GetCaptionFontStyle=function(){return this._captionFont.GetFontStyle()},t.prototype.GetCaptionTextDecoration=function(){return n.Utility.GetMultipleStringEnum(this._captionFont.GetTextDecoration())},t.prototype.GetText=function(){return this._text},t.prototype.GetTextForeColor=function(){return this._textForeColor},t.prototype.GetTextFontFamily=function(){return this._textFont.GetFontFamily()},t.prototype.GetTextFontSize=function(){return this._textFont.GetFontSize()},t.prototype.GetTextFontWeight=function(){return this._textFont.GetFontWeight()},t.prototype.GetTextFontStyle=function(){return this._textFont.GetFontStyle()},t.prototype.GetTextTextDecoration=function(){return n.Utility.GetMultipleStringEnum(this._textFont.GetTextDecoration())},t.prototype.GetUseCaptionFont=function(){return this._useCaptionFont},t.prototype.GetUseTextFont=function(){return this._useTextFont},t.prototype.GetBorderColor=function(){return this._borderColor},t.prototype.GetCloseButtonImage=function(){return this.GetCloseButtonImageUrl()},t.prototype.GetCloseButtonImageUrl=function(){return this._closeButtonImage},t.prototype.GetHoveredCloseButtonImage=function(){return this.GetHoveredCloseButtonImageUrl()},t.prototype.GetHoveredCloseButtonImageUrl=function(){return this._hoveredCloseButtonImage},t.prototype.GetPressedCloseButtonImage=function(){return this.GetPressedCloseButtonImageUrl()},t.prototype.GetPressedCloseButtonImageUrl=function(){return this._pressedCloseButtonImage},t.prototype.GetIconImage=function(){return this.GetIconImageUrl()},t.prototype.GetIconImageUrl=function(){return this._iconImage},t.prototype.GetUseSystemIcon=function(){return this._useSystemIcon},t.prototype.GetCustomControlID=function(){return this._customControlID},t.prototype._getFlatStyle=function(){return this._flatStyle},t.prototype.SetID=function(n){this._id=n},t.prototype.SetAutoClose=function(n){this._autoClose=n},t.prototype.SetBackColor=function(n){return this._backColor=n,this},t.prototype.SetCaption=function(n){this._caption=n},t.prototype.SetCaptionForeColor=function(n){this._captionForeColor=n},t.prototype.SetCaptionFontFamily=function(n){this._captionFont.SetFontFamily(n)},t.prototype.SetCaptionFontSize=function(n){this._captionFont.SetFontSize(n)},t.prototype.SetCaptionFontWeight=function(n){this._captionFont.SetFontWeight(n)},t.prototype.SetCaptionFontStyle=function(n){this._captionFont.SetFontStyle(n)},t.prototype.SetCaptionTextDecoration=function(t){t.indexOf(",")!==-1&&(t=n.Utility.CheckMultipleStringEnum(n.TextDecoration,t)),this._captionFont.SetTextDecoration(t)},t.prototype.SetIcon=function(t){var i=n.IconType.None;if(typeof t=="string")switch(t.toLowerCase()){case n.IconType.None:case n.IconType.Information:case n.IconType.Exclamation:case n.IconType.Warning:case n.IconType.Error:i=t.toLowerCase();break}this._icon=i},t.prototype.SetShowCloseButton=function(n){this._showCloseButton=n},t.prototype.SetSpan=function(n){this._span=n},t.prototype.SetText=function(n){return this._text=n,this},t.prototype.SetUseCaptionFont=function(n){this._useCaptionFont=n},t.prototype.SetUseTextFont=function(n){this._useTextFont=n},t.prototype.SetBorderColor=function(n){return this._borderColor=n,this},t.prototype.SetCloseButtonImage=function(n){this.SetCloseButtonImageUrl(n)},t.prototype.SetCloseButtonImageUrl=function(n){this._closeButtonImage=n},t.prototype.SetHoveredCloseButtonImage=function(n){this.SetHoveredCloseButtonImageUrl(n)},t.prototype.SetHoveredCloseButtonImageUrl=function(n){this._hoveredCloseButtonImage=n},t.prototype.SetPressedCloseButtonImage=function(n){this.SetPressedCloseButtonImageUrl(n)},t.prototype.SetPressedCloseButtonImageUrl=function(n){this._pressedCloseButtonImage=n},t.prototype.SetIconImage=function(n){this.SetIconImageUrl(n)},t.prototype.SetIconImageUrl=function(n){this._iconImage=n},t.prototype.SetUseSystemIcon=function(n){this._useSystemIcon=n},t.prototype.SetTextForeColor=function(n){this._textForeColor=n},t.prototype.SetCustomControlID=function(n){this._customControlID=n},t.prototype.SetTextFontFamily=function(n){this._textFont.SetFontFamily(n)},t.prototype.SetTextFontSize=function(n){this._textFont.SetFontSize(n)},t.prototype.SetTextFontWeight=function(n){this._textFont.SetFontWeight(n)},t.prototype.SetTextFontStyle=function(n){this._textFont.SetFontStyle(n)},t.prototype.SetTextTextDecoration=function(t){t.indexOf(",")!==-1&&(t=n.Utility.CheckMultipleStringEnum(n.TextDecoration,t)),this._textFont.SetTextDecoration(t)},t.prototype.SetFlatStyle=function(n){this._flatStyle=n},t.prototype.InitBalloonTipInfo=function(){this._id="",this._flatStyle=n.FlatStyle.Standard,this._span=5e3,this._backColor="",this._borderColor="",this._icon=n.IconType.Information,this._customControlID="",this._text="",this._caption="",this._textForeColor="",this._captionForeColor="",this._textFont=new n.Font("MS UI Gothic","9pt","normal","normal"),this._captionFont=new n.Font("MS UI Gothic","9pt","bold","normal"),this._iconImage="",this._closeButtonImage="",this._hoveredCloseButtonImage="",this._pressedCloseButtonImage="",this._autoClose=!1,this._useCaptionFont=!1,this._useTextFont=!1,this._useSystemIcon=!0,this._showCloseButton=!0},t.prototype.GetCustomControlHtml=function(){if(this._customControlID!=null&&this._customControlID!=""){var n=document.getElementById(this._customControlID);if(n!=null)return n.style.position=="absolute"&&(n.style.position="static"),n.outerHTML}return""},t.prototype.Clone=function(){var i=new t;return i.SetText(this._text),i._textFont=n.Font.CloneFont(this._textFont),i.SetUseTextFont(this._useTextFont),i.SetTextForeColor(this._textForeColor),i.SetCaption(this._caption),i._captionFont=n.Font.CloneFont(this._captionFont),i.SetUseCaptionFont(this._useCaptionFont),i.SetCaptionForeColor(this._captionForeColor),i.SetBackColor(this._backColor),i.SetIcon(this._icon),i.SetSpan(this._span),i.SetAutoClose(this._autoClose),i.SetShowCloseButton(this._showCloseButton),i.SetCustomControlID(this._customControlID),i.SetBorderColor(this._borderColor),i.SetCloseButtonImageUrl(this._closeButtonImage),i.SetHoveredCloseButtonImageUrl(this._hoveredCloseButtonImage),i.SetPressedCloseButtonImageUrl(this._pressedCloseButtonImage),i.SetIconImageUrl(this._iconImage),i.SetUseSystemIcon(this._useSystemIcon),i},t.prototype.Equals=function(n){return n==null?!1:this.GetID()==n.GetID()&&this.GetText()==n.GetText()&&this.FontEquals(this._getInnerTextfont(),n._getInnerTextfont())&&this.GetUseTextFont()==n.GetUseTextFont()&&this.GetTextForeColor()==n.GetTextForeColor()&&this.GetCaption()==n.GetCaption()&&this.FontEquals(this._getInnerCaptionFont(),n._getInnerCaptionFont())&&this.GetUseCaptionFont()==n.GetUseCaptionFont()&&this.GetCaptionForeColor()==n.GetCaptionForeColor()&&this.GetBackColor()==n.GetBackColor()&&this.GetIcon()==n.GetIcon()&&this.GetSpan()==n.GetSpan()&&this.GetShowCloseButton()==n.GetShowCloseButton()&&this.GetCustomControlID()==n.GetCustomControlID()&&this.GetBorderColor()==n.GetBorderColor()&&this.GetCloseButtonImageUrl()==n.GetCloseButtonImageUrl()&&this.GetHoveredCloseButtonImageUrl()==n.GetHoveredCloseButtonImageUrl()&&this.GetPressedCloseButtonImageUrl()==n.GetPressedCloseButtonImageUrl()&&this.GetIconImageUrl()==n.GetIconImageUrl()&&this.GetUseSystemIcon()==n.GetUseSystemIcon()},t.prototype.FontEquals=function(n,t){return n.GetFontFamily()==t.GetFontFamily()&&n.GetFontSize()==t.GetFontSize()&&n.GetFontWeight()==t.GetFontWeight()&&n.GetFontStyle()==t.GetFontStyle()&&n.GetTextDecoration()==t.GetTextDecoration()},t.prototype.GetDefaultFont=function(n){var i=new t;return n?i._captionFont:i._textFont},t}(),t;n.BalloonTipInfo=i,t=function(){function n(n,t){this.Control=n,this.TipInfo=t}return n}(),n.BalloonTipBindingInfo=t,window.BalloonTipInfo=i})(GCIM||(GCIM={}));var GCIM;(function(n){var i=function(){function t(n){this._all=[],this._data=null,arguments.length>0&&(this._data=arguments[0])}return t.prototype.GetCount=function(){return this._all.length},t.prototype.GetItem=function(n){if(typeof n=="number"){if(n<0||n>=this.GetCount())throw"The index is out of the boundary.";return this._all[n]}else if(typeof n=="string"){var t=this.IndexofTipID(n);if(t!=-1)return this._all[t]}return this._data.GetBalloonTipInfosBinding().GetBalloonTipInfoByControl(n)},t.prototype.SetItem=function(n,t){if(typeof n=="number"){if(n<0||n>=this.GetCount())throw"The index is out of the boundary.";this._all[n]=t;return}else if(typeof n=="string"){var i=this.IndexofTipID(n);if(i!==-1){this._all[i]=t;return}}this._data&&(this.Add(t),this._data.GetBalloonTipInfosBinding().SetItem(n,t))},t.prototype.Add=function(n,t){if(typeof arguments[0]=="undefined")return;if(arguments.length>=2&&this._data){this.Add(arguments[1]),this._data.GetBalloonTipInfosBinding().Add(arguments[0],arguments[1]);return}if(this.Contains(arguments[0]))return;this._all.push(arguments[0])},t.prototype.Insert=function(n,t){if(this.Contains(t))return;this._all.splice(n,0,t)},t.prototype.Remove=function(t){var u,r,i;if(t&&t instanceof n.BalloonTipInfo&&this.Contains(t)){u=this.IndexofTipInfo(t),this._all.splice(u,1);return}typeof t=="string"&&this._data&&(r=n.Utility.GetNakedDomElement(t),i=this._data.GetBalloonTipInfosBinding().GetBalloonTipInfoByControl(r),this.Remove(i),this._data.GetBalloonTipInfosBinding().Remove(t))},t.prototype.RemoveAt=function(t){var u,r,i;if(t&&t instanceof n.BalloonTipInfo&&this.Contains(t)){u=this.IndexofTipInfo(t),this._all.splice(u,1);return}if(typeof t=="string")this.Contains(t)&&(r=this.IndexofTipID(t),this._all.splice(r,1));else if(typeof t=="number"){if(t<0||t>=this.GetCount())throw"The index is out of the boundary.";this._data&&(i=this._all[t],this._data.GetBalloonTipInfosBinding().RemoveBalloonTipInfo(i)),this._all.splice(t,1)}},t.prototype.Clear=function(){this._all=[]},t.prototype.IndexOf=function(n){return typeof n=="string"?this.IndexofTipID(n):this.IndexofTipInfo(n)},t.prototype.Contains=function(n){return typeof n=="string"?this.IndexofTipID(n)!=-1:this.IndexofTipInfo(n)!=-1},t.prototype.IndexesOf=function(n){var i,t;if(n===null)throw"The argument tipInfo cannot be null.";for(i=[],t=0;t=this.GetCount()?null:this._all[n];else{var t=this.IndexofControl(n);return t==-1?null:this._all[t]}},t.prototype.SetItem=function(t,i){for(var f=n.Utility.GetNakedDomElement(t),u,r=0;r=this.GetCount())throw"The index is out of the boundary.";this._all.splice(n,1)},t.prototype.Clear=function(){this._all=[]},t.prototype.AddRange=function(t,i){var r,u;if(typeof t!="object"||typeof i!="object")throw"Error type for the arguments, both should be array.";if(t.length!=i.length)throw"Both the arguments should have the same size.";for(r=0;r/g,"\r\n").replace(/
/g,"\r\n").split("\r\n"),f=[];for(t=0;tg&&(g=f[t].length,it=t);r=n.Utility.MeasureText(f[it]||"",tt),r.Height*=f.length,(nt==null||nt.length==0)&&(r.Height=0),o=this._control._render.GetCustomControl(),o!=null&&(h=this._control._render.GetSaveCustomControlDiv(),h.style.display="",ut=o.parentNode,h.appendChild(o),h.style.position="absolute",r.Width=Math.max(r.Width,o.clientWidth),r.Height+=o.clientHeight,h.removeChild(o),ut.appendChild(o),h.style.position="",h.style.display="none"),k=Math.max(r.Width,a.Width+y.Width+v.Width)+20,d=Math.max(a.Height,y.Height,v.Height),r.Width=k,v.Width=k-a.Width-y.Width,v.Height=d,a.Height=d,y.Height=d;var ct=10,st=8,ht=3,et=3,i=new n.Size;return i.Width=ct+k,i.Height=v.Height+r.Height+st+ht+et,i.Width=Math.ceil(i.Width),i.Height=Math.ceil(i.Height),w=new n.Size,w.Width=5,w.Height=i.Height,b=new n.Size,b.Width=5,b.Height=i.Height,c=new n.Size,c.Width=w.Width+i.Width+b.Width,c.Height=17,u=new n.Size,u.Width=c.Width,u.Height=c.Height+i.Height,e=new n.Size,e.Width=u.Width-2,e.Height=u.Height-c.Height,n.Utility.IsIE7?(e.Width=u.Width-4,e.Height=u.Height-6):n.Utility.IsIE8&&(e.Width=u.Width+4,e.Height=u.Height-6),{ContainerSize:u,AcuteAngleSize:c,LeftCornerAreaSize:w,RightCornerAreaSize:b,ContentAreaSize:i,CaptionSize:v,TextSize:r,IconSize:a,CloseButtonSize:y,ShadowSize:e}},t.prototype.GetBalloonTipPosition=function(){if(this._balloonTipPosition!=null)return this._balloonTipPosition;var e=15,f=this._showingControl,r=n.Utility.GetElementPosition(this._showingControl),o=this.GetBalloonTipAreaSize(),i=r.Top-o.ContainerSize.Height-t.TOPOFFSET,u=r.Left+Math.ceil(f.offsetWidth/2)-e;if(this._useTipPosition){switch(this._tipPosition){case n.TipPosition.BottomLeft:case n.TipPosition.BottomCenter:case n.TipPosition.BottomRight:i=r.Top+Math.ceil(f.offsetHeight);break;case n.TipPosition.TopLeft:case n.TipPosition.TopCenter:case n.TipPosition.TopRight:i+=t.TOPOFFSET;break;default:}switch(this._tipPosition){case n.TipPosition.TopLeft:case n.TipPosition.BottomLeft:u=r.Left-e;break;case n.TipPosition.TopRight:case n.TipPosition.BottomRight:u=r.Left+Math.ceil(f.offsetWidth)-e;break;default:}n.Utility.IsIE8OrBelow&&this.GetArrowType()==n.ArrowType.Down&&(i-=5)}else n.Utility.IsIE8OrBelow&&this.GetArrowType()==n.ArrowType.Down&&(i-=5),i=i>=0?i+t.TOPOFFSET:r.Top+Math.ceil(f.offsetHeight);return n.Utility.IsIE8&&this.GetArrowType()===n.ArrowType.Down&&(i=i-6),u=Math.ceil(u),i=Math.ceil(i),new n.Position(u,i)},t.prototype.GetBalloonTipShadowPosition=function(t){var i=this.GetBalloonTipPosition();return this.GetArrowType()==n.ArrowType.Up?(i.Y+=t.AcuteAngleSize.Height+1,i.X+=n.Utility.IsIE8OrBelow?5:0,i.X+=n.Utility.IsPad()?1:0,i.Y+=n.Utility.IsPad()?1:0):(i.Y+=n.Utility.IsIE8OrBelow?3:0,i.X+=n.Utility.IsIE8OrBelow?5:0),i},t.prototype.GetBalloonTipInfoByControl=function(t){var i=this._balloonTipInfosBinding.GetItem(t);return i?i.TipInfo:new n.BalloonTipInfo},t.prototype.DefaultCaptionFont=function(){return new n.Font("MS UI Gothic","9pt","bold","normal")},t.prototype.DefaultTextFont=function(){return new n.Font("MS UI Gothic","9pt","normal","normal")},t.prototype.DefaultCloseButtonImage=function(){return n.Utility.BaseImageUrl+"BalloonTip_CloseButton_Normal"+n.Component._getImageExtends(".gif")},t.prototype.DefaultHoveredCloseButtonImage=function(){return n.Utility.BaseImageUrl+"BalloonTip_CloseButton_Hovered"+n.Component._getImageExtends(".gif")},t.prototype.DefaultPressedCloseButtonImage=function(){return n.Utility.BaseImageUrl+"BalloonTip_CloseButton_Pressed"+n.Component._getImageExtends(".gif")},t.prototype.DefaultBackColor=function(){return"white"},t.prototype.DefaultForeColor=function(){return"black"},t.prototype.DefaultBorderColor=function(){return"#D3D3D3"},t.prototype._initWithServerData=function(t){var i,u,r;t.ShowShadow!==undefined&&(this._showShadow=t.ShowShadow),t.UseFading!==undefined&&(this._useFading=t.UseFading),t.ClientEvents!==undefined&&(t.ClientEvents.TipOpening!==undefined&&(t.ClientEvents.TipOpening=n.Utility.CheckFunction(t.ClientEvents.TipOpening),this._control._specialClientEvents.TipOpening=t.ClientEvents.TipOpening),t.ClientEvents.TipClosed!==undefined&&(t.ClientEvents.TipClosed=n.Utility.CheckFunction(t.ClientEvents.TipClosed),this._control._specialClientEvents.TipClosed=t.ClientEvents.TipClosed));if(t.BalloonTipInfos!==undefined)for(i=0;i").replace(/\r/,"
").replace(/\n/g,"
").replace(/
/g,"
").replace(/
/g,"
"),r=r.replace(//g,"g-C2"),r=n.Utility.EncodingToHTML(r),r=r.replace(/g-C2/g,"
"),o=document.createElement("div"),o.innerHTML=r,i.appendChild(o),f=this.GetCustomControl(),f!=null&&(e=n.Utility.CreateElement("div"),e.style.width="0px",e.style.height="0px",i.appendChild(e),this._balloonTipDom.CustomControl=f,i.appendChild(f)),this._balloonTipDom.TextCell=i,i},t.prototype.CreateCaptionCell=function(t){var i=document.createElement("td"),r=this._data.InnerCaptionFont(),u;return i.style.fontFamily=r.GetFontFamily(),i.style.fontSize=r.GetFontSize(),i.style.fontWeight=r.GetFontWeight(),i.style.fontStyle=r.GetFontStyle(),i.style.textDecoration=r.GetTextDecoration(),i.style.color=this._data.InnerCaptionForeColor(),i.style.width=t.CaptionSize.Width+"px",i.style.height=t.CaptionSize.Height+"px",i.style.paddingLeft="3px",i.style.paddingRight="3px",u=n.Utility.CreateInnerTextNode(this._data.InnerCaption()),i.appendChild(u),i},t.prototype.CreateIconCell=function(t){var r=document.createElement("td"),u,i;return r.style.width=t.IconSize.Width+"px",r.style.height=t.IconSize.Height+"px",u=this._data.InnerIconImage(),u!=""&&(i=n.Utility.CreateInnerImage(u),i.style.width=t.IconSize.Width+"px",i.style.height=t.IconSize.Width+"px",r.appendChild(i)),r},t.prototype.CreateCloseButtonCell=function(t){var r=document.createElement("td"),u,i;return r.style.width=t.CloseButtonSize.Width+"px",r.style.height=t.CloseButtonSize.Height+"px",r.setAttribute("CellType","CloseButton"),u=this._data.InnerCloseButtonImage(),u!=""&&(i=n.Utility.CreateInnerImage(this._data.InnerCloseButtonImage()),i.style.width=t.CloseButtonSize.Width+"px",i.style.height=t.CloseButtonSize.Width+"px",i.setAttribute("CellType","CloseButton"),r.appendChild(i),this._balloonTipDom.CloseButton=i),r},t.prototype.CreateBalloonTipEvent=function(){var r=this._balloonTipDom.BalloonTipDiv,t,i;n.Utility.AttachEvent(r,"mousedown",this.MouseDownHandler,!1),this._data.InnerShowCloseButton()&&(t=this._balloonTipDom.CloseButton,t&&(n.Utility.AttachEvent(t,"mousedown",this.MouseDownHandler,!1),n.Utility.AttachEvent(t,"mouseup",this.MouseUpHandler,!1),n.Utility.AttachEvent(t,"mouseover",this.MouseEnterHandler,!1),n.Utility.AttachEvent(t,"mouseout",this.MouseLeaveHandler,!1))),this._data._showingControl!=null&&this._data.InnerAutoClose()&&(i=this._data._showingControl,i&&(this._data._autoCloseFunction=this.AutoCloseHandler,n.Utility.AttachEvent(i,"blur",this._data._autoCloseFunction,!1)))},t.prototype._setCssTransform=function(t,i,r,u){var f=r;u||(f="translate(0, "+i+r+"px)"),t.style.position="",t.style.top="",n.Utility.IsIE8OrBelow?(t.style.position="relative",t.style.top=i+r+"px"):n.Utility.IsIE9?t.style.msTransform=f:n.Utility.chrome||n.Utility.safari?(t.style.MozTransform=f,t.style.WebkitTransform=f):t.style.transform=f},t.prototype.RemoveShadowDiv=function(){var n=this._balloonTipDom.BalloonTipShadowDiv;n&&(document.body.removeChild(n),this._balloonTipDom.BalloonTipShadowDiv=null)},t.prototype.RemoveContainerDiv=function(){var n=this._balloonTipDom.ContainerDiv;n&&(document.body.removeChild(n),this._balloonTipDom.ContainerDiv=null)},t.prototype.RemoveAutoCloseFuncton=function(){if(this._data._showingControl!=null&&this._data._autoCloseFunction!=null){var t=this._data._showingControl;t&&n.Utility.DetachEvent(t,"blur",this._data._autoCloseFunction,!1)}},t.prototype.RemoveCustomControl=function(){if(this._balloonTipDom.CustomControl){var n=this.GetSaveCustomControlDiv();n.appendChild(this._balloonTipDom.CustomControl)}},t.prototype.CreateBalloonTipShadow=function(){var i=this._data.GetBalloonTipAreaSize(),r=this._data.GetBalloonTipShadowPosition(i),t=document.createElement("div");return t.style.left=r.X+"px",t.style.top=r.Y+"px",t.style.position="absolute",t.style.zIndex="99997",t.style.width=i.ShadowSize.Width+"px",t.style.height=i.ShadowSize.Height+"px",n.Utility.IsIE8OrBelow?(t.style.backgroundColor="gray",t.style.filter="progid:DXImageTransform.Microsoft.Blur(pixelradius=5)"):(t.style.borderRadius="5px",t.style.backgroundColor=this._data.InnerBackColor(),t.style.boxShadow="8px 8px 11px gray"),this._data.GetUseFading()&&(n.Utility.IsIE8OrBelow?t.style.filter="alpha(opacity = 0)":t.style.opacity="0"),this._balloonTipDom.BalloonTipShadowDiv=t,t},t.prototype.CrearteInnerAcuteAngleCell=function(n){var i=document.createElement("td"),t;return i.style.height=n.AcuteAngleSize.Height+"px",i.style.border="solid 0px "+this._data.InnerBorderColor(),t=document.createElement("div"),t.style.width="100%",t.style.height=n.AcuteAngleSize.Height+"px",t.style.border="solid 0px "+this._data.InnerBorderColor(),i.appendChild(t),i},t.prototype.CrearteInnerAcuteAngleDiv=function(n){var t=document.createElement("div");return t.style.width=n+"px",t.style.height="1px",t.style.borderColor=this._data.InnerBorderColor(),t.style.backgroundColor=this._data.InnerBackColor(),t.style.borderStyle="solid",t.style.borderLeftWidth="1px",t.style.borderRightWidth="1px",t.style.borderTopWidth="0px",t.style.borderBottomWidth="0px",t},t.prototype.CrearteInnerLeftRadiusDiv=function(n,t){var i=document.createElement("div");return i.style.width="5px",i.style.height="1px",i.style.marginLeft=n+"px",i.style.borderStyle="solid",i.style.borderColor=this._data.InnerBorderColor(),i.style.backgroundColor=this._data.InnerBackColor(),i.style.borderRightWidth="0px",i.style.borderLeftWidth=t+"px",i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i},t.prototype.CrearteInnerRightRadiusDiv=function(n,t){var i=document.createElement("div");return i.style.width=n+"px",i.style.height="1px",i.style.backgroundColor=this._data.InnerBackColor(),i.style.borderColor=this._data.InnerBorderColor(),i.style.borderStyle="solid",i.style.borderRightWidth=t+"px",i.style.borderLeftWidth="0px",i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i},t.prototype.CreateLeftRadiusElementIE8=function(n){var o=document.createElement("td"),e=n.LeftCornerAreaSize.Width+1,t,u,r,f,s,h,i;for(o.style.width=e+"px",o.style.height=n.LeftCornerAreaSize.Height+"px",t=document.createElement("div"),t.style.width=e+"px",t.style.height=n.LeftCornerAreaSize.Height+10+"px",t.style.overflow="hidden",u=document.createElement("div"),u.style.width=e+"px",u.style.height="5px",u.style.overflow="hidden",r=document.createElement("div"),r.style.width=e+"px",r.style.height=n.LeftCornerAreaSize.Height+"px",r.style.borderLeft="1px solid "+this._data.InnerBorderColor(),r.style.backgroundColor=this._data.InnerBackColor(),f=document.createElement("div"),f.style.width=e+"px",f.style.height="5px",f.style.overflow="hidden",s=[0,0,0,1,2],h=[1,1,2,2,3],i=0;i<5;i++)u.appendChild(this.CrearteInnerLeftRadiusDiv(s[4-i],h[4-i])),f.appendChild(this.CrearteInnerLeftRadiusDiv(s[i],h[i]));return t.appendChild(u),t.appendChild(r),t.appendChild(f),o.appendChild(t),o},t.prototype.CreateRightRadiusElementIE8=function(n){var e=document.createElement("td"),i,u,r,f,o,s,t;for(e.style.width=n.RightCornerAreaSize.Width+"px",e.style.height=n.RightCornerAreaSize.Height+"px",i=document.createElement("div"),i.style.width=n.RightCornerAreaSize.Width+1+"px",i.style.height=n.RightCornerAreaSize.Height+10+"px",u=document.createElement("div"),u.style.width=n.RightCornerAreaSize.Width+1+"px",u.style.height="5px",r=document.createElement("div"),r.style.width=n.RightCornerAreaSize.Width+"px",r.style.height=n.RightCornerAreaSize.Height+"px",r.style.borderRight="1px solid "+this._data.InnerBorderColor(),r.style.backgroundColor=this._data.InnerBackColor(),f=document.createElement("div"),f.style.width=n.RightCornerAreaSize.Width+1+"px",f.style.height="5px",o=[5,5,4,3,0],s=[1,1,2,2,4],t=0;t<5;t++)u.appendChild(this.CrearteInnerRightRadiusDiv(o[4-t],s[4-t])),f.appendChild(this.CrearteInnerRightRadiusDiv(o[t],s[t]));return i.appendChild(u),i.appendChild(r),i.appendChild(f),e.appendChild(i),e},t.prototype.CreateAcuteAngleCellIE8=function(t){var h=document.createElement("td"),u,v,i,s;h.setAttribute("colSpan","3"),u=document.createElement("table"),v=n.Utility.IsIE7?t.AcuteAngleSize.Width-2:t.AcuteAngleSize.Width+5,u.style.width=v+"px",u.setAttribute("cellPadding","0px"),u.setAttribute("cellSpacing","0px"),u.style.borderWidth="0px";var a=document.createElement("tbody"),f=document.createElement("tr"),c=this.CrearteInnerAcuteAngleCell(t),e=this.CrearteInnerAcuteAngleCell(t),r=this.CrearteInnerAcuteAngleCell(t),o=this.CrearteInnerAcuteAngleCell(t),l=this.CrearteInnerAcuteAngleCell(t);c.style.width="5px",e.style.width="10px",r.style.width="18px",o.style.width=t.AcuteAngleSize.Width-28+"px",l.style.width="5px",r.firstChild.style.borderColor=this._data.InnerBackColor();if(this._data.GetArrowType()===n.ArrowType.Up)for(e.firstChild.style.borderBottomWidth="1px",r.firstChild.style.borderBottomWidth="1px",o.firstChild.style.borderBottomWidth="1px",i=0;i<=16;i++)s=this.CrearteInnerAcuteAngleDiv(i),r.firstChild.appendChild(s);else for(e.firstChild.style.borderTopWidth="1px",r.firstChild.style.borderTopWidth="1px",o.firstChild.style.borderTopWidth="1px",i=16;i>=0;i--)s=this.CrearteInnerAcuteAngleDiv(i),r.firstChild.appendChild(s);return f.appendChild(c),f.appendChild(e),f.appendChild(r),f.appendChild(o),f.appendChild(l),a.appendChild(f),u.appendChild(a),h.appendChild(u),h},t}();n.BalloonTipRender=t})(GCIM||(GCIM={}));var GCIM;(function(n){var t=function(){function t(t){this._control=t,this._render=t._render,this._closeType=n.TipClosedMode.Others,this._data=t._data,this._showingTimer=-1,this._hidingTimer=-1,this._spanTimer=-1}return t.prototype.MouseDownHandler=function(t){var u=n.BalloonTipUtility.GetEventCurrentTarget(t),r,e,f,i;if(u===null)return;r=this._render.GetCustomControl(),e=t.srcElement||t.target;if(r&&r.contains(e))return;n.Utility.PreventDefault(t),f=u.getAttribute("CellType");if(f=="CloseButton"){i=this._render._balloonTipDom.CloseButton,i&&i.setAttribute("src",this._data.InnerPressedCloseButtonImage()),n.Utility.CancelBubble(t);return}this._closeType=n.TipClosedMode.ClickOnTip,this._control.Hide()},t.prototype.MouseUpHandler=function(t){var r=n.BalloonTipUtility.GetEventCurrentTarget(t),i;if(r===null)return;i=r.getAttribute("CellType"),i=="CloseButton"&&(this._closeType=n.TipClosedMode.ClickOnCloseButton,this._control.Hide())},t.prototype.MouseEnterHandler=function(n){var t=this._render._balloonTipDom.CloseButton;t&&t.setAttribute("src",this._data.InnerHoveredCloseButtonImage())},t.prototype.MouseLeaveHandler=function(n){var t=this._render._balloonTipDom.CloseButton;t&&t.setAttribute("src",this._data.InnerCloseButtonImage())},t.prototype.DeleteShowingBalloobTip=function(){this._control.Close(),this.StopSpanTimer(),this.StopShowingTimer(),this.StopHidingTimer()},t.prototype.StartShowingTimer=function(){this._currentOpacity=0,this._offsetOpacity=.125,this._finallyOpacity=1,n.Utility.IsIE8OrBelow&&(this._currentOpacity=0,this._offsetOpacity=12.5,this._finallyOpacity=100),this.SetShowingOpacity()},t.prototype.StopShowingTimer=function(){this._showingTimer!=-1&&(clearTimeout(this._showingTimer),this._showingTimer=-1)},t.prototype.StartHidingTimer=function(){this._currentOpacity=1,this._offsetOpacity=-.125,this._finallyOpacity=0,n.Utility.IsIE8OrBelow&&(this._currentOpacity=100,this._offsetOpacity=-12.5,this._finallyOpacity=0),this.StopShowingTimer(),this.StopSpanTimer(),this.SetHidingOpacity()},t.prototype.StopHidingTimer=function(){this._hidingTimer!=-1&&(clearTimeout(this._hidingTimer),this._hidingTimer=-1)},t.prototype.StartSpanTimer=function(){var n=this;this._data.InnerSpan()>0&&(this._spanTimer=setTimeout(function(){return n.ProcessSpan()},this._data.InnerSpan()))},t.prototype.StopSpanTimer=function(){this._spanTimer!=-1&&(clearTimeout(this._spanTimer),this._spanTimer=-1)},t.prototype.ProcessSpan=function(){this._hidingTimer==-1&&(this._closeType=n.TipClosedMode.SpanTimeout,this._control.Hide())},t.prototype.SetShowingOpacity=function(){var r=this,i=this._render._balloonTipDom.ContainerDiv,t;if(!i)return;this._currentOpacity=this._currentOpacity+this._offsetOpacity,t=this._render._balloonTipDom.BalloonTipShadowDiv,n.Utility.IsIE8OrBelow?(t&&(t.style.display="none"),i.style.filter="alpha(opacity ="+this._currentOpacity+")"):(t&&(t.style.opacity=this._currentOpacity),i.style.opacity=this._currentOpacity);if(this._currentOpacity>=this._finallyOpacity){n.Utility.IsIE8OrBelow&&t&&(t.style.display="",t.style.filter="progid:DXImageTransform.Microsoft.Blur(pixelradius=5);alpha(opacity ="+this._currentOpacity+")");return}this._showingTimer=setTimeout(function(){return r.SetShowingOpacity()},100)},t.prototype.SetHidingOpacity=function(){var r=this,i=this._render._balloonTipDom.ContainerDiv,t;if(!i)return;this._currentOpacity=this._currentOpacity+this._offsetOpacity,t=this._render._balloonTipDom.BalloonTipShadowDiv,n.Utility.IsIE8OrBelow?(t&&this._render.RemoveShadowDiv(),i.style.filter="alpha(opacity ="+this._currentOpacity+")"):(t&&(t.style.opacity=this._currentOpacity),i.style.opacity=this._currentOpacity);if(this._currentOpacity<=this._finallyOpacity){this._control.Close();return}this._hidingTimer=setTimeout(function(){return r.SetHidingOpacity()},100)},t}();n.BalloonTipUIProcess=t})(GCIM||(GCIM={}));var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},GCIM;(function(n){var t=function(t){function i(n){t.call(this,undefined,n,!1),this._ignoreAutoClose=!1,this.Init()}return __extends(i,t),i.prototype._getComponentType=function(){return n.IMControlType.Balloontip},i.prototype.Init=function(){this._data=new n.BalloonTipData(this),this._render=new n.BalloonTipRender(this),this._uiProcess=new n.BalloonTipUIProcess(this)},i.prototype.GetBalloonTipInfos=function(){return this._data.GetBalloonTipInfos()},i.prototype.GetShowShadow=function(){return this._data.GetShowShadow()},i.prototype.SetShowShadow=function(n){this._data.SetShowShadow(n)},i.prototype.GetUseFading=function(){return this._data.GetUseFading()},i.prototype.SetUseFading=function(n){this._data.SetUseFading(n)},i.prototype.ShowByWrapper=function(n,t,i){this._ignoreAutoClose=!0,arguments.length==1?this.Show(n):arguments.length==2?this.Show(n,t):arguments.length<3||this.Show(n,t,i),this._ignoreAutoClose=!1},i.prototype.Show=function(t,i,r){var i,u;this._data.ResetData();if(arguments.length>=2)if(arguments[0]instanceof n.Position){this._data._balloonTipPosition=arguments[0];if(arguments[1]instanceof n.BalloonTipInfo)this._data._balloonTipInfo=arguments[1];else throw"arguments type error";return this.ShowInner(),this}else if(arguments[1]instanceof n.BalloonTipInfo)this._data._balloonTipInfo=arguments[1];else if(typeof arguments[1]=="string"||typeof arguments[1]=="number")this._data._useTipPosition=!0,i=n.Utility.CheckEnum(n.TipPosition,arguments[1]),this._data._tipPosition=i;else throw"arguments type error";return arguments.length<3||(this._data._balloonTipInfo=arguments[2]),u=n.Utility.GetNakedDomElement(t),this._data._showingControl=u,this.ShowInner(),this},i.prototype.ShowInner=function(){var t,u,e,i,r,f;this._uiProcess.DeleteShowingBalloobTip();if(this._data._showingControl!=null&&this._data.InnerAutoClose()){t=null;try{t=document.activeElement}catch(o){}if(!t)return;u=t.getAttribute("id"),e=t.getAttribute(n.Utility.IMControlIDAttribute);if(u===null||t!==this._data._showingControl&&u!==e)return}i=new n.BalloonTipEventArgs,n.Utility.FireEvent(this,this._specialClientEvents.TipOpening,i,"TipOpening");if(i.Cancel===!0)return;r=this._render.CreateBalloonTip(),document.body.appendChild(r),this.GetShowShadow()&&(f=this._render.CreateBalloonTipShadow(),document.body.appendChild(f)),this._data.GetUseFading()&&(r.style.opacity="0",this._uiProcess.StartShowingTimer()),this._uiProcess._closeType=n.TipClosedMode.Others,this._uiProcess.StartSpanTimer()},i.prototype.Hide=function(){return this._data.GetUseFading()?this._uiProcess.StartHidingTimer():this.Close(),this},i.prototype.Close=function(){var i=this._render._balloonTipDom.ContainerDiv?!0:!1,t;this._render.RemoveAutoCloseFuncton(),this._render.RemoveShadowDiv(),this._render.RemoveCustomControl(),this._render.RemoveContainerDiv(),this._render._balloonTipDom={},i&&(t=new n.BalloonTipEventArgs(this._uiProcess._closeType),n.Utility.FireEvent(this,this._specialClientEvents.TipClosed,t,"TipClosed"))},i.prototype.AddBalloonTipInfo=function(n,t){this._data.GetBalloonTipInfos().Add(t),this._data.GetBalloonTipInfosBinding().Add(n,t)},i.prototype.InsertBalloonTipInfo=function(n,t,i){this._data.GetBalloonTipInfos().Insert(n,i),this._data.GetBalloonTipInfosBinding().Add(t,i)},i.prototype.RemoveBalloonTipInfo=function(t){var r=n.Utility.GetNakedDomElement(t),i=this._data.GetBalloonTipInfosBinding().GetBalloonTipInfoByControl(r);this._data.GetBalloonTipInfos().Remove(i),this._data.GetBalloonTipInfosBinding().Remove(t)},i.prototype.RemoveBalloonTipInfoAt=function(n){var t=this._data.GetBalloonTipInfos().GetItem(n);this._data.GetBalloonTipInfos().RemoveAt(t),this._data.GetBalloonTipInfosBinding().RemoveBalloonTipInfo(t)},i.prototype.ClearBalloonTipInfos=function(){this._data.GetBalloonTipInfos().Clear(),this._data.GetBalloonTipInfosBinding().Clear()},i.prototype.GetBalloonTipInfosCount=function(){return this._data.GetBalloonTipInfos().GetCount()},i.prototype.GetBalloonTipInfo=function(n){return this._data.GetBalloonTipInfos().GetItem(n)},i.prototype.GetBalloonTipInfoIndex=function(n){return this._data.GetBalloonTipInfos().IndexofTipInfo(n)},i.prototype.OnTipClosed=function(t){t=n.Utility.CheckFunction(t),this._specialClientEvents.TipClosed=t},i.prototype.OnTipOpening=function(t){t=n.Utility.CheckFunction(t),this._specialClientEvents.TipOpening=t},i.prototype._initWithServerData=function(n){t.prototype._initWithServerData.call(this,n),this._data._initWithServerData(n)},i}(n.Component);n.GcBalloonTip=t})(GCIM||(GCIM={})) if(typeof(Sys)!='undefined' && typeof(Sys.Application) != 'undefined'){Sys.Application.notifyScriptLoaded();};