if(typeof(window.RadTabStripNamespace)=="undefined"){window.RadTabStripNamespace=new Object()}RadTabStripNamespace.ItemGroup=function(a,b){this.Size=0;this.ExpandableSize=0;this.FixedSize=0;this.Items=[];this.SizeMethod=b;this.SizeProperty=a};RadTabStripNamespace.ItemGroup.prototype.RegisterItem=function(a,b){var c=a.className.indexOf("separator")>-1;if(c){b=true}else{a=a.firstChild}this.Size+=RadTabStripNamespace.Box[this.SizeMethod](a);if(c||(b&&a.firstChild.firstChild.style[this.SizeProperty])){this.FixedSize+=RadTabStripNamespace.Box[this.SizeMethod](a);return}this.ExpandableSize+=RadTabStripNamespace.Box[this.SizeMethod](a);this.Items[this.Items.length]=a};RadTabStripNamespace.Align=function(a,b,c){this.Element=a;this.ItemGroups=[];if(b=="horizontal"){this.OuterSizeMethod="GetOuterWidth";this.InnerSizeMethod="GetInnerWidth";this.SetSizeMethod="SetOuterWidth";this.OffsetProperty="offsetTop";this.SizeProperty="width"}else{this.OuterSizeMethod="GetOuterHeight";this.InnerSizeMethod="GetInnerHeight";this.SetSizeMethod="SetOuterHeight";this.OffsetProperty="offsetLeft";this.SizeProperty="height"}this.SkipFixedSize=c;if(!this.Element.ItemGroups){this.BuildItemGroups();this.Element.ItemGroups=this.ItemGroups}else{this.ItemGroups=this.Element.ItemGroups}};RadTabStripNamespace.Align.prototype.CreateItemGroup=function(){return new RadTabStripNamespace.ItemGroup(this.SizeProperty,this.OuterSizeMethod)};RadTabStripNamespace.Align.prototype.BuildItemGroups=function(){var a=3;var b=this.Element.childNodes;var c=0;var d=-1;this.ItemGroups[0]=this.CreateItemGroup();for(var f=0;f<b.length;f++){var g=b[f];var h=g[this.OffsetProperty];if(g.nodeType==a){continue}if(d==-1){d=h}if(h>d+1){c++;this.ItemGroups[c]=this.CreateItemGroup();d=h}this.ItemGroups[c].RegisterItem(g)}this.CalculateItemSizePercentage()};RadTabStripNamespace.Align.prototype.CalculateItemSizePercentage=function(){for(var a=0;a<this.ItemGroups.length;a++){var b=this.ItemGroups[a];for(var c=0;c<b.Items.length;c++){var d=b.Items[c];if(this.SkipFixedSize&&d.style[this.SizeProperty]){continue}var f=RadTabStripNamespace.Box[this.OuterSizeMethod](d);var g=RadTabStripNamespace.Box[this.OuterSizeMethod](d.firstChild.firstChild);if(b.ExpandableSize==0){d.Percentage=0}else{d.Percentage=f/b.ExpandableSize}d.PaddingDiff=f-g}}};RadTabStripNamespace.Align.prototype.InterateOverRows=function(a){var b=RadTabStripNamespace.Box[this.InnerSizeMethod](this.Element);for(var c=0;c<this.ItemGroups.length;c++){if(!this.ItemGroups[c].Items.length){continue}a(this.ItemGroups[c],b)}};RadTabStripNamespace.Align.Justify=function(h){var k=new RadTabStripNamespace.Align(h,"horizontal",true);var j=function(a,b){for(var c=0;c<a.Items.length;c++){var d=a.Items[c];var f=d.Percentage*(b-a.FixedSize)-d.PaddingDiff;var g=d.firstChild.firstChild;RadTabStripNamespace.Box.SetOuterWidth(g,Math.floor(f))}};k.InterateOverRows(j)};RadTabStripNamespace.Align.Right=function(d){var f=new RadTabStripNamespace.Align(d,"horizontal");var g=function(a,b){var c=a.Items[0];c.style.marginLeft=(b-a.Size-1)+"px";c.style.cssText=c.style.cssText};f.InterateOverRows(g)};RadTabStripNamespace.Align.Center=function(f){var g=new RadTabStripNamespace.Align(f,"horizontal");var h=function(a,b){var c=a.Items[0];var d=Math.floor((b-a.Size)/2)+"px";c.style.marginLeft=d;c.style.cssText=c.style.cssText};g.InterateOverRows(h)};RadTabStripNamespace.Align.VJustify=function(h){var k=new RadTabStripNamespace.Align(h,"vertical",true);var j=function(a,b){for(var c=0;c<a.Items.length;c++){var d=a.Items[c];var f=d.Percentage*(b-a.FixedSize)-d.PaddingDiff;var g=d.firstChild.firstChild;RadTabStripNamespace.Box.SetOuterHeight(g,Math.floor(f))}};k.InterateOverRows(j)};RadTabStripNamespace.Align.Bottom=function(d){var f=new RadTabStripNamespace.Align(d,"vertical");var g=function(a,b){var c=a.Items[0];c.style.marginTop=(b-a.Size-1)+"px"};f.InterateOverRows(g)};RadTabStripNamespace.Align.Middle=function(f){var g=new RadTabStripNamespace.Align(f,"vertical");var h=function(a,b){var c=a.Items[0];var d=Math.floor((b-a.Size)/2)+"px";c.style.marginTop=d};g.InterateOverRows(h)};if(typeof(window.RadTabStripNamespace)=="undefined"){window.RadTabStripNamespace=new Object()}RadTabStripNamespace.Box={GetOuterWidth:function(a){var b=this.GetCurrentStyle(a);return a.offsetWidth+this.GetHorizontalMarginValue(b)},GetOuterHeight:function(a){var b=this.GetCurrentStyle(a);return a.offsetHeight+this.GetVerticalMarginValue(b)},GetInnerWidth:function(a){var b=this.GetCurrentStyle(a);return a.offsetWidth-this.GetHorizontalPaddingAndBorderValue(b)},GetInnerHeight:function(a){var b=this.GetCurrentStyle(a);return a.offsetHeight-this.GetVerticalPaddingAndBorderValue(b)},SetOuterWidth:function(a,b){var c=this.GetCurrentStyle(a);b-=this.GetHorizontalMarginValue(c);if(RadControlsNamespace.Browser.StandardsMode){b-=this.GetHorizontalPaddingAndBorderValue(c)}if(b<0){a.style.width="auto"}else{a.style.width=b+"px"}},SetOuterHeight:function(a,b){var c=b;var d=this.GetCurrentStyle(a);b-=this.GetVerticalMarginValue(d);if(RadControlsNamespace.Browser.StandardsMode){b-=this.GetVerticalPaddingAndBorderValue(d)}a.style.height=b+"px";var f=this.GetOuterHeight(a);if(f!=c){var g=(f-c);var h=(c-g);if(h>0){a.style.height=h+"px"}}},SafeParseInt:function(a){var b=parseInt(a);return isNaN(b)?0:b},GetStyleValues:function(a){var b=0;for(var c=1;c<arguments.length;c++){b+=this.SafeParseInt(a[arguments[c]])}return b},GetHorizontalPaddingAndBorderValue:function(a){return this.GetStyleValues(a,"borderLeftWidth","paddingLeft","paddingRight","borderRightWidth")},GetVerticalPaddingAndBorderValue:function(a){return this.GetStyleValues(a,"borderTopWidth","paddingTop","paddingBottom","borderBottomWidth")},GetHorizontalMarginValue:function(a){return this.GetStyleValues(a,"marginLeft","marginRight")},GetVerticalMarginValue:function(a){return this.GetStyleValues(a,"marginTop","marginBottom")},GetCurrentStyle:function(a){if(a.currentStyle){return a.currentStyle}else{if(document.defaultView&&document.defaultView.getComputedStyle){return document.defaultView.getComputedStyle(a,null)}else{return null}}}};if(typeof window.RadControlsNamespace=="undefined"){window.RadControlsNamespace={}}if(typeof(window.RadControlsNamespace.Browser)=="undefined"||typeof(window.RadControlsNamespace.Browser.Version)==null||window.RadControlsNamespace.Browser.Version<1){window.RadControlsNamespace.Browser={Version:1};window.RadControlsNamespace.Browser.ParseBrowserInfo=function(){this.IsMacIE=(navigator.appName=="Microsoft Internet Explorer")&&((navigator.userAgent.toLowerCase().indexOf("mac")!=-1)||(navigator.appVersion.toLowerCase().indexOf("mac")!=-1));this.IsSafari=(navigator.userAgent.toLowerCase().indexOf("safari")!=-1);this.IsSafari3=(this.IsSafari&&navigator.userAgent.toLowerCase().indexOf("ersion/3.")!=-1);this.IsMozilla=window.netscape&&!window.opera;this.IsNetscape=/Netscape/.test(navigator.userAgent);this.IsOpera=window.opera;this.IsOpera9=window.opera&&(parseInt(window.opera.version())>8);this.IsIE=!this.IsMacIE&&!this.IsMozilla&&!this.IsOpera&&!this.IsSafari;this.IsIE7=/MSIE 7/.test(navigator.appVersion);this.StandardsMode=this.IsSafari||this.IsOpera9||this.IsMozilla||document.compatMode=="CSS1Compat";this.IsMac=/Mac/.test(navigator.userAgent)};RadControlsNamespace.Browser.ParseBrowserInfo()};if(typeof window.RadControlsNamespace=="undefined"){window.RadControlsNamespace={}}if(typeof(window.RadControlsNamespace.DomEventMixin)=="undefined"||typeof(window.RadControlsNamespace.DomEventMixin.Version)==null||window.RadControlsNamespace.DomEventMixin.Version<3){RadControlsNamespace.DomEventMixin={Version:3,Initialize:function(a){a.CreateEventHandler=this.CreateEventHandler;a.AttachDomEvent=this.AttachDomEvent;a.DetachDomEvent=this.DetachDomEvent;a.DisposeDomEventHandlers=this.DisposeDomEventHandlers;a._domEventHandlingEnabled=true;a.EnableDomEventHandling=this.EnableDomEventHandling;a.DisableDomEventHandling=this.DisableDomEventHandling;a.RemoveHandlerRegister=this.RemoveHandlerRegister;a.GetHandlerRegister=this.GetHandlerRegister;a.AddHandlerRegister=this.AddHandlerRegister;a.handlerRegisters=[]},EnableDomEventHandling:function(){this._domEventHandlingEnabled=true},DisableDomEventHandling:function(){this._domEventHandlingEnabled=false},CreateEventHandler:function(b,c){var d=this;return function(a){if(!d._domEventHandlingEnabled&&!c){return}return d[b](a||window.event)}},AttachDomEvent:function(a,b,c,d){var f=this.CreateEventHandler(c,d);var g=this.GetHandlerRegister(a,b,c);if(g!=null){this.DetachDomEvent(g.Element,g.EventName,c)}var h={"Element":a,"EventName":b,"HandlerName":c,"Handler":f};this.AddHandlerRegister(h);if(a.addEventListener){a.addEventListener(b,f,false)}else{if(a.attachEvent){a.attachEvent("on"+b,f)}}},DetachDomEvent:function(a,b,c){var d=null;var f="";if(typeof c=="string"){f=c;d=this.GetHandlerRegister(a,b,f);if(d==null){return}c=d.Handler}if(!a){return}if(a.removeEventListener){a.removeEventListener(b,c,false)}else{if(a.detachEvent){a.detachEvent("on"+b,c)}}if(d!=null&&f!=""){this.RemoveHandlerRegister(d);d=null}},DisposeDomEventHandlers:function(){for(var a=0;a<this.handlerRegisters.length;a++){var b=this.handlerRegisters[a];if(b!=null){this.DetachDomEvent(b.Element,b.EventName,b.Handler)}}this.handlerRegisters=[]},RemoveHandlerRegister:function(a){try{var b=a.index;for(var c in a){a[c]=null}this.handlerRegisters[b]=null}catch(e){}},GetHandlerRegister:function(a,b,c){for(var d=0;d<this.handlerRegisters.length;d++){var f=this.handlerRegisters[d];if(f!=null&&f.Element==a&&f.EventName==b&&f.HandlerName==c){return this.handlerRegisters[d]}}return null},AddHandlerRegister:function(a){a.index=this.handlerRegisters.length;this.handlerRegisters[this.handlerRegisters.length]=a}};RadControlsNamespace.DomEvent={};RadControlsNamespace.DomEvent.PreventDefault=function(a){if(!a){return true}if(a.preventDefault){a.preventDefault()}a.returnValue=false;return false};RadControlsNamespace.DomEvent.StopPropagation=function(a){if(!a){return}if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}};RadControlsNamespace.DomEvent.GetTarget=function(a){if(!a){return null}return a.target||a.srcElement};RadControlsNamespace.DomEvent.GetRelatedTarget=function(a){if(!a){return null}return a.relatedTarget||(a.type=="mouseout"?a.toElement:a.fromElement)};RadControlsNamespace.DomEvent.GetKeyCode=function(a){if(!a){return 0}return a.which||a.keyCode}};if(typeof window.RadControlsNamespace=="undefined"){window.RadControlsNamespace={}}if(typeof(window.RadControlsNamespace.EventMixin)=="undefined"||typeof(window.RadControlsNamespace.EventMixin.Version)==null||window.RadControlsNamespace.EventMixin.Version<2){RadControlsNamespace.EventMixin={Version:2,Initialize:function(a){a._listeners={};a._eventsEnabled=true;a.AttachEvent=this.AttachEvent;a.DetachEvent=this.DetachEvent;a.RaiseEvent=this.RaiseEvent;a.EnableEvents=this.EnableEvents;a.DisableEvents=this.DisableEvents;a.DisposeEventHandlers=this.DisposeEventHandlers},DisableEvents:function(){this._eventsEnabled=false},EnableEvents:function(){this._eventsEnabled=true},AttachEvent:function(a,b){if(!this._listeners[a]){this._listeners[a]=[]}this._listeners[a][this._listeners[a].length]=(RadControlsNamespace.EventMixin.ResolveFunction(b))},DetachEvent:function(a,b){var c=this._listeners[a];if(!c){return false}var d=RadControlsNamespace.EventMixin.ResolveFunction(b);for(var f=0;f<c.length;f++){if(d==c[f]){c.splice(f,1);return true}}return false},DisposeEventHandlers:function(){for(var a in this._listeners){var b=null;if(this._listeners.hasOwnProperty(a)){b=this._listeners[a];for(var c=0;c<b.length;c++){b[c]=null}b=null}}},ResolveFunction:function(a){if(typeof(a)=="function"){return a}else{if(typeof(window[a])=="function"){return window[a]}else{return new Function("var Sender = arguments[0];var Arguments = arguments[1];"+a)}}},RaiseEvent:function(a,b){if(!this._eventsEnabled){return true}var c=true;if(this[a]){var d=RadControlsNamespace.EventMixin.ResolveFunction(this[a])(this,b);if(typeof(d)=="undefined"){d=true}c=c&&d}if(!this._listeners[a]){return c}for(var f=0;f<this._listeners[a].length;f++){var g=this._listeners[a][f];var d=g(this,b);if(typeof(d)=="undefined"){d=true}c=c&&d}return c}}};if(typeof window.RadControlsNamespace=="undefined"){window.RadControlsNamespace={}}if(typeof(window.RadControlsNamespace.JSON)=="undefined"||typeof(window.RadControlsNamespace.JSON.Version)==null||window.RadControlsNamespace.JSON.Version<1){window.RadControlsNamespace.JSON={Version:1,copyright:"(c)2005 JSON.org",license:"http://www.crockford.com/JSON/license.html",stringify:function(h,k){var j=[];var m=arguments[2]||{};function i(a){j[j.length]=a}function l(a){var b,c,d,f;switch(typeof a){case"object":if(a){if(a instanceof Array){i("[");d=j.length;for(c=0;c<a.length;c+=1){f=a[c];if(typeof f!="undefined"&&typeof f!="function"){if(d<j.length){i(",")}l(f)}}i("]");return""}else{if(typeof a.valueOf=="function"){i("{");d=j.length;for(c in a){f=a[c];if(k&&f==k[c]){continue}var g=typeof f;if(g=="undefined"||g=="function"){continue}if(g=="object"&&!m[c]){continue}if(d<j.length){i(",")}l(c);i(":");l(f)}return i("}")}}}i("null");return"";case"number":i(isFinite(a)?+a:"null");return"";case"string":d=a.length;i("\"");for(c=0;c<d;c+=1){b=a.charAt(c);if(b>=" "){if(b=="\\"||b=="\""){i("\\")}i(b)}else{switch(b){case"\b":i("\\b");break;case"\f":i("\\f");break;case"\n":i("\\n");break;case"\r":i("\\r");break;case"\t":i("\\t");break;default:b=b.charCodeAt();i("\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16))}}}i("\"");return"";case"boolean":i(String(a));return"";default:i("null");return""}}l(h,0);return j.join("")},stringifyHashTable:function(a,b,c){var d=[];if(!c){c=[]}for(var f=0;f<a.length;f++){var g=this.stringify(a[f],c[f]);if(g=="{}"){continue}d[d.length]="\""+a[f][b]+"\":"+g}return"{"+d.join(",")+"}"},parse:function(a){return(/^([ \t\r\n,:{}\[\]]|"(\\["\\\/bfnrtu]|[^\x00-\x1f"\\]+)*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)+$/.test(a))&&eval("("+a+")")}}};function RadMultiPage(a,b){var c=window[a];if(c!=null&&typeof(c.Dispose)=="function"){c.Dispose()}this.DomElement=document.getElementById(a);this.PageViews=b;this.HiddenInput=document.getElementById(a+"_Selected");this.PageView=null}RadMultiPage.prototype.Dispose=function(){if(this.disposed==null){return}this.disposed=true;this.DomElement=null;this.HiddenInput=null};RadMultiPage.prototype.GetSelectedIndex=function(){return parseInt(this.HiddenInput.value)};RadMultiPage.prototype.GetPageViewDomElement=function(a){return document.getElementById(this.PageViews[a].ClientID)};RadMultiPage.prototype.Show=function(a){if(this.NavigateAfterClick){return}a.style.display="block";var b=a.getElementsByTagName("*");for(var c=0,d=b.length;c<d;c++){var f=b[c];if(f.RadShow){f.RadShow()}}};RadMultiPage.prototype.Hide=function(a){if(this.NavigateAfterClick){return}a.style.display="none"};RadMultiPage.prototype.SelectPageById=function(a){if(a=="Null"){return}var b=-1;for(var c=0;c<this.PageViews.length;c++){var d=this.GetPageViewDomElement(c);if(this.PageViews[c].ID==a){if(d){this.Show(this.GetPageViewDomElement(c))}b=c}else{if(d){this.Hide(this.GetPageViewDomElement(c))}}}this.HiddenInput.value=b};RadMultiPage.prototype.SelectPageByIndex=function(a){if(a>=this.PageViews.length){return}for(var b=0;b<this.PageViews.length;b++){var c=this.GetPageViewDomElement(b);if(c){if(b==a){this.Show(c)}else{this.Hide(c)}}}this.HiddenInput.value=a};function RadTab(a,b){this.Parent=null;this.TabStrip=null;this.SelectedTab=null;this.SelectedIndex=-1;this.Selected=false;this.ScrollChildren=false;this.ScrollPosition=0;this.ScrollButtonsPosition=RadControlsNamespace.ScrollButtonsPosition.Right;this.PerTabScrolling=false;this.Tabs=[];this.PageViewID="";this.PageViewClientID="";this.Index=-1;this.GlobalIndex=-1;this.CssClass="";this.SelectedCssClass="selected";this.DisabledCssClass="disabled";this.NavigateAfterClick=false;this.Enabled=true;this.Value="";this.DepthLevel=-1;this.IsBreak=false;this.ID=a.id;this.DomElement=a;this.Text=a.firstChild.firstChild.innerHTML;this.ImageDomElement=a.getElementsByTagName("img")[0];if(this.ImageDomElement){if(a.firstChild.firstChild.childNodes.length>1){this.Text=a.firstChild.firstChild.childNodes[1].nodeValue}else{this.Text=""}}this.ChildStripDomElement=a.parentNode.getElementsByTagName("ul")[0]}RadTab.prototype.Initialize=function(){RadControlsNamespace.DomEventMixin.Initialize(this);this.AttachEventHandlers();if(this.TabStrip.TabData[this.ID]!=null){for(var a in this.TabStrip.TabData[this.ID]){this[a]=this.TabStrip.TabData[this.ID][a]}}RadTabStrip.CreateState(this)};RadTab.prototype.Dispose=function(){this.DisposeDomEventHandlers();for(var a in this.DomElement){if(typeof(this.DomElement[a])=="function"){this.DomElement[a]=null}}if(this.Scroll){this.Scroll.Dispose()}this.DomElement=null;this.ImageDomElement=null;this.ChildStripDomElement=null};RadTab.prototype.ClickHandler=function(a){return this.Click(a)};RadTab.prototype.MouseOverHandler=function(a){var b=this.DomElement;var c=RadControlsNamespace.DomEvent.GetRelatedTarget(a);if(c&&(c==b||c.parentNode==b||c.parentNode.parentNode==b)){return}if(this.Enabled){this.SetImageUrl(this.ImageOverUrl)}this.TabStrip.RaiseEvent("OnClientMouseOver",{Tab:this,EventObject:a})};RadTab.prototype.SetImageUrl=function(a){if(!this.ImageDomElement||!a){return}a=a.replace(/&amp;/ig,"&");if(this.ImageDomElement.src!=a){this.ImageDomElement.src=a}};RadTab.prototype.IsChildOfTab=function(a){while(a.nodeType!==9){if(a.parentNode==this.DomElement){return true}a=a.parentNode}return false};RadTab.prototype.MouseOutHandler=function(a){var b=this.DomElement;var c=RadControlsNamespace.DomEvent.GetRelatedTarget(a);if(c&&(c==b||this.IsChildOfTab(c))){return}if(this.Enabled){if(this.Parent.SelectedTab==this&&this.SelectedImageUrl){this.SetImageUrl(this.SelectedImageUrl)}else{this.SetImageUrl(this.ImageUrl)}}this.TabStrip.RaiseEvent("OnClientMouseOut",{Tab:this,EventObject:a})};RadTab.prototype.KeyPressHandler=function(a){};RadTab.prototype.FocusHandler=function(a){if(!a.altKey){return}this.Click();var b=this;setTimeout(function(){b.DomElement.focus()},0)};RadTab.prototype.AttachEventHandlers=function(){this.AttachDomEvent(this.DomElement,"click","ClickHandler");this.AttachDomEvent(this.DomElement,"mouseover","MouseOverHandler");this.AttachDomEvent(this.DomElement,"contextmenu","ContextMenuHandler");this.AttachDomEvent(this.DomElement,"dblclick","DoubleClickHandler");this.AttachDomEvent(this.DomElement,"mouseout","MouseOutHandler");if(RadControlsNamespace.Browser.IsIE){this.AttachDomEvent(this.DomElement,"focus","FocusHandler")}};RadTab.prototype.DoubleClickHandler=function(a){if(!this.TabStrip.RaiseEvent("OnClientDoubleClick",{Tab:this,EventObject:a})){return RadControlsNamespace.DomEvent.PreventDefault(a)}};RadTab.prototype.ContextMenuHandler=function(a){if(!this.TabStrip.RaiseEvent("OnClientContextMenu",{Tab:this,EventObject:a})){return RadControlsNamespace.DomEvent.PreventDefault(a)}};RadTab.prototype.Validate=function(){if(!this.TabStrip.CausesValidation){return true}if(typeof(Page_ClientValidate)!="function"){return true}return Page_ClientValidate(this.TabStrip.ValidationGroup)};RadTab.prototype.Click=function(a){if((!this.Enabled)||(!this.Validate())){return RadControlsNamespace.DomEvent.PreventDefault(a)}var b=this.NavigateAfterClick;if(this.DomElement.target&&this.DomElement.target!="_self"){b=false}if(!this.TabStrip.EnableImmediateNavigation){b=false}var c=this.Select(b);if((!c)||(!this.NavigateAfterClick)){return RadControlsNamespace.DomEvent.PreventDefault(a)}else{if(!a||(this.ImageDomElement&&(a.srcElement==this.ImageDomElement))){var d=this.DomElement.target;if(!d||d=="_self"){location.href=this.DomElement.href}else{if(d=="_blank"){window.open(this.DomElement.href)}else{if(top.frames[d]){top.frames[d].window.location.href=this.DomElement.href}}}}}return true};RadTab.prototype.InternalUnSelect=function(a){this.Selected=false;this.Parent.SelectedTab=null;this.Parent.SelectedIndex=-1;if(this.SelectedTab!=null&&this.TabStrip.UnSelectChildren){this.SelectedTab.UnSelect(a)}this.RecordState()};RadTab.prototype.UnSelect=function(a){if(!this.Selected){return}this.InternalUnSelect(a);if(!a){this.ModifyZIndex(-this.MaxZIndex);this.DomElement.className=this.CssClass;this.HideChildren();this.SetImageUrl(this.ImageUrl)}this.TabStrip.RaiseEvent("OnClientTabUnSelected",{Tab:this})};RadTab.prototype.RecordState=function(){this.InitialState.Selected=!this.Selected;var a=RadControlsNamespace.JSON.stringify(this,this.InitialState);if(a=="{}"){this.TabStrip.TabsState[this.ID]=""}else{this.TabStrip.TabsState[this.ID]="\""+this.ID+"\":"+a}this.TabStrip.RecordState()};RadTab.prototype.ModifyZIndex=function(a){this.DomElement.style.zIndex=parseInt(this.DomElement.style.zIndex)+a;this.DomElement.style.cssText=this.DomElement.style.cssText};RadTab.prototype.InternalSelect=function(a){var b=this.Parent.SelectedTab;if(b){this.TabStrip.InUpdate=true;this.Parent.SelectedTab.UnSelect(a);this.TabStrip.InUpdate=false}this.Selected=true;this.Parent.SelectedTab=this;this.Parent.SelectedIndex=this.Index;this.RecordState()};RadTab.prototype.Select=function(a){if(!this.Enabled){return false}if(this.Selected&&!this.TabStrip.ClickSelectedTab){return false}var b=this.Parent.SelectedTab;var c={Tab:this,PreviousTab:b};if(!this.TabStrip.RaiseEvent("OnClientTabSelecting",c)){return false}this.TabStrip.SelectPageView(this);this.InternalSelect(a);if(!a){if(this.TabStrip.ReorderTabRows&&!this.TabStrip.RenderInProgress()){this.PopRow()}this.DomElement.className=this.SelectedCssClass;this.ModifyZIndex(this.MaxZIndex);this.FixFirstTabPosition();this.SetImageUrl(this.SelectedImageUrl)}this.ShowChildren(a);this.TabStrip.RaiseEvent("OnClientTabSelected",c);return true};RadTab.prototype.FixFirstTabPosition=function(){if(this.Parent.Tabs[0]&&this.Parent.Tabs[0].DomElement){this.Parent.Tabs[0].DomElement.style.cssText=this.Parent.Tabs[0].DomElement.style.cssText}};RadTab.prototype.SelectParents=function(){var a=[];var b=this;while(b!=this.TabStrip){a[a.length]=b;b=b.Parent}var c=a.length;while(c--){a[c].Select()}};RadTab.prototype.IsVisible=function(){var a=this.Parent;if(a==this.TabStrip){return true}while(a!=this.TabStrip){if(!a.Selected){return false}a=a.Parent}return true};RadTab.prototype.ShowChildren=function(a){if(!this.ChildStripDomElement){return}if(!this.IsVisible()){return}if(!a){this.ChildStripDomElement.style.display="block";this.TabStrip.ShowLevels(this.DepthLevel);this.TabStrip.ApplyTabBreaks(this.ChildStripDomElement);this.TabStrip.AlignElement(this.ChildStripDomElement);if(this.ScrollChildren){this.TabStrip.MakeScrollable(this)}}if(this.SelectedTab){this.SelectedTab.Selected=false;this.SelectedTab.Select(a)}};RadTab.prototype.HideChildren=function(){if(!this.ChildStripDomElement){return}this.TabStrip.ShowLevels(this.DepthLevel-1);this.ChildStripDomElement.style.display="none";if(this.SelectedTab){this.SelectedTab.HideChildren()}};RadTab.prototype.Enable=function(){if(this.Enabled){return}this.Enabled=true;this.DomElement.className=this.CssClass;this.DomElement.disabled="";this.RecordState();if(this.Parent.SelectedTab==this&&this.SelectedImageUrl){this.SetImageUrl(this.SelectedImageUrl)}else{this.SetImageUrl(this.ImageUrl)}this.TabStrip.RaiseEvent("OnClientTabEnabled",{Tab:this})};RadTab.prototype.Disable=function(){this.Enabled=false;this.UnSelect();this.DomElement.className=this.DisabledCssClass;this.DomElement.disabled="disabled";this.RecordState();this.SetImageUrl(this.DisabledImageUrl);this.TabStrip.RaiseEvent("OnClientTabDisabled",{Tab:this})};RadTab.prototype.OnScrollStop=function(){this.RecordState()};RadTab.prototype.SetCssClass=function(a){this.CssClass=a;if(this.Enabled&&!this.Selected){this.DomElement.className=a}};RadTab.prototype.SetText=function(a){this.Text=a;var b=this.DomElement.firstChild.firstChild;var c=b.firstChild.nodeType==3?b.firstChild:b.childNodes[1];c.nodeValue=a;this.RecordState()};RadTab.prototype.SetDisabledCssClass=function(a){this.DisabledCssClass=a;if(!this.Enabled){this.DomElement.className=a}};RadTab.prototype.SetSelectedCssClass=function(a){this.SelectedCssClass=a;if(this.Selected){this.DomElement.className=a}};RadTab.prototype.PopRow=function(){var a=this.DomElement.parentNode.offsetTop;if(this.IsBreak&&RadControlsNamespace.Browser.IsIE){var b=RadTabStripNamespace.Box.GetCurrentStyle(this.DomElement);a-=RadTabStripNamespace.Box.GetStyleValues(b,"marginTop")}var c=[];for(var d=0;d<this.Parent.Tabs.length;d++){var f=this.Parent.Tabs[d].DomElement.parentNode;var g=f.offsetTop;var b=RadTabStripNamespace.Box.GetCurrentStyle(this.Parent.Tabs[d].DomElement);if(this.Parent.Tabs[d].IsBreak&&(this.Parent.Tabs[d].Selected)&&RadControlsNamespace.Browser.IsIE){g-=RadTabStripNamespace.Box.GetStyleValues(b,"marginTop")}if(g==a||this==this.Parent.Tabs[d]){c[c.length]=this.Parent.Tabs[d].DomElement.parentNode}}if(c.length==this.Parent.Tabs.length){return}var h=this.DomElement.parentNode.parentNode;for(var d=0;d<c.length;d++){c[d].parentNode.removeChild(c[d]);h.appendChild(c[d])}};if(typeof(window.RadTabStripNamespace)=="undefined"){window.RadTabStripNamespace=new Object()}if(typeof(window.RadControlsNamespace)=="undefined"){window.RadControlsNamespace=new Object()}RadControlsNamespace.AppendStyleSheet=function(a,b,c){if(!c){return}if(!a){document.write("<link rel='stylesheet' type='text/css' href='"+c+"' />")}else{var d=document.createElement("LINK");d.rel="stylesheet";d.type="text/css";d.href=c;document.getElementById(b+"StyleSheetHolder").appendChild(d)}};RadTabStripNamespace.TabStripAlign={Left:0,Center:1,Right:2,Justify:3};RadTabStripNamespace.GetChildren=function(a,b){var c=[];var d=a.firstChild;b=b.toLowerCase();while(d){if(d.nodeType==1&&d.tagName.toLowerCase()==b){c[c.length]=d}d=d.nextSibling}return c};function RadTabStrip(a){var b=window[a];if(b!=null&&typeof(b.Dispose)=="function"){b.Dispose()}this.DomElement=document.getElementById(a);this.ChildStripDomElement=this.DomElement.getElementsByTagName("ul")[0];this.StateField=document.getElementById(a+"_Hidden");this.Tabs=[];this.AllTabs=[];this.ID=a;this.LevelWraps=[];this.LevelWraps[0]=this.ChildStripDomElement.parentNode;RadControlsNamespace.EventMixin.Initialize(this);this.SelectedTab=null;this.SelectedIndex=-1;this.IsVertical=false;this.ReverseLevelOrder=false;this.ScrollChildren=false;this.EnableImmediateNavigation=true;this.ScrollPosition=0;this.ScrollButtonsPosition=RadControlsNamespace.ScrollButtonsPosition.Right;this.PerTabScrolling=false;this.MultiPageID="";this.MultiPageClientID="";this.CausesValidation=true;this.ValidationGroup="";this.Enabled=true;this.Direction="ltr";this.Align=RadTabStripNamespace.TabStripAlign.Left;this.ReorderTabRows=false;this.UnSelectChildren=false;this.ClickSelectedTab=false;this.OnClientTabSelected="";this.OnClientTabSelecting="";this.OnClientMouseOver="";this.OnClientMouseOut="";this.OnClientTabUnSelected="";this.OnClientTabEnabled="";this.OnClientTabDisabled="";this.OnClientLoad="";this.DepthLevel=0;this.MaxLevel=0;this.TabData={};this.InPostBack=false;this.Disposed=false;this.InitialAllTabs=[];this.TabsState={};this.InUpdate=false;this.Initialized=false}RadTabStrip.prototype.Dispose=function(){if(this.Disposed){return}this.Disposed=true;try{if(this.Scroll){this.Scroll.Dispose()}for(var a=0;a<this.AllTabs.length;a++){this.AllTabs[a].Dispose()}this.DisposeDomEventHandlers();if(this.DomElement){this.DomElement.RadShow=null;this.DomElement.RadResize=null}this.DomElement=null;this.ChildStripDomElement=null;this.StateField=null;this.LevelWraps[0]=null}catch(e){}};RadTabStrip.prototype.MakeScrollable=function(a){var b=RadControlsNamespace.Scroll.Create(a.ChildStripDomElement,this.IsVertical,a);b.WrapNeeded=true;b.Initialize();b.OnScrollStop=function(){a.OnScrollStop()};a.Scroll=b};RadTabStrip.prototype.AlignElement=function(a){if(this.IsVertical){if(a.offsetHeight==0){return}if(this.Align==RadTabStripNamespace.TabStripAlign.Center){RadTabStripNamespace.Align.Middle(a)}else{if(this.Align==RadTabStripNamespace.TabStripAlign.Right){RadTabStripNamespace.Align.Bottom(a)}else{if(this.Align==RadTabStripNamespace.TabStripAlign.Justify){RadTabStripNamespace.Align.VJustify(a)}}}}else{if(a.offsetWidth==0){return}if(this.Align==RadTabStripNamespace.TabStripAlign.Center){RadTabStripNamespace.Align.Center(a)}else{if(this.Align==RadTabStripNamespace.TabStripAlign.Right){RadTabStripNamespace.Align.Right(a)}else{if(this.Align==RadTabStripNamespace.TabStripAlign.Justify){RadTabStripNamespace.Align.Justify(a)}}}}};RadTabStrip.prototype.FindTabById=function(a){for(var b=0;b<this.AllTabs.length;b++){if(this.AllTabs[b].ID==a){return this.AllTabs[b]}}return null};RadTabStrip.prototype.FindTabByText=function(a){for(var b=0;b<this.AllTabs.length;b++){if(this.AllTabs[b].Text==a){return this.AllTabs[b]}}return null};RadTabStrip.prototype.FindTabByValue=function(a){for(var b=0;b<this.AllTabs.length;b++){if(this.AllTabs[b].Value==a){return this.AllTabs[b]}}return null};RadTabStrip.prototype.FindTabByUrl=function(a){for(var b=0;b<this.AllTabs.length;b++){if(this.AllTabs[b].DomElement.href==a){return this.AllTabs[b]}}return null};RadTabStrip.prototype.GetAllTabs=function(){return this.AllTabs};RadTabStrip.prototype.RenderInProgress=function(){return((!this.IsVertical)&&this.ChildStripDomElement.offsetWidth==0)||(this.IsVertical&&this.ChildStripDomElement.offsetHeight==0)};RadTabStrip.prototype.ApplyAlign=function(){if(this.RenderInProgress()){return}this.AlignElement(this.ChildStripDomElement);var a=this.SelectedTab;while(a){if(!a.ChildStripDomElement){break}this.AlignElement(a.ChildStripDomElement);a=a.SelectedTab}};RadTabStrip.prototype.Initialize=function(a,b){this.LoadConfiguration(a);this.TabData=b;this.DetermineDirection();this.ApplyRTL();this.DisableEvents();this.CreateControlHierarchy(this,this.ChildStripDomElement);if(!this.Enabled){this.Disable()}this.ApplyTabBreaks(this.ChildStripDomElement);this.ApplyAlign();if(this.LevelWraps.length==1){this.ShowLevels(1)}if(this.ScrollChildren){this.MakeScrollable(this)}this.ApplySelected();this.EnableEvents();RadControlsNamespace.DomEventMixin.Initialize(this);this.AttachEventHandlers();this.Initialized=true;RadTabStrip.CreateState(this);this.RaiseEvent("OnClientLoad",null);this.RecordState()};RadTabStrip.CreateState=function(a){a.InitialState={};for(var b in a){var c=typeof a[b];if(c=="number"||c=="string"||c=="boolean"){a.InitialState[b]=a[b]}}};RadTabStrip.prototype.AttachEventHandlers=function(){this.HandleResize();this.AttachDomEvent(window,"unload","Dispose");this.AttachDomEvent(window,"load","HandleResize");if(this.RenderInProgress()){this.AttachDomEvent(window,"load","PopRowOnLoad")}this.AttachDomEvent(window,"resize","HandleResize");var a=this;this.DomElement.RadShow=function(){a.HandleResize();a.DomElement.style.cssText=a.DomElement.style.cssText};this.DomElement.RadResize=function(){a.HandleResize();a.DomElement.style.cssText=a.DomElement.style.cssText}};RadTabStrip.prototype.PopRowOnLoad=function(){if(this.ReorderTabRows&&this.SelectedTab){this.SelectedTab.PopRow()}};RadTabStrip.prototype.ApplySelected=function(){for(var a=0;a<this.AllTabs.length;a++){if(this.AllTabs[a].Selected){this.AllTabs[a].Selected=false;this.AllTabs[a].Select();this.AllTabs[a].DomElement.style.cssText=this.AllTabs[a].DomElement.style.cssText}}};RadTabStrip.prototype.HandleResize=function(){this.ApplyAlign();if(this.Scroll){this.Scroll.ResizeHandler()}var a=this.SelectedTab;while(a){if(a.Scroll){a.Scroll.ResizeHandler()}a=a.SelectedTab}};RadTabStrip.prototype.LoadConfiguration=function(a){for(var b in a){this[b]=a[b]}};RadTabStrip.prototype.ShowLevels=function(a){for(var b=0;b<=this.MaxLevel;b++){var c=b>a?"none":"block";if(this.LevelWraps[b].style.display!=c){this.LevelWraps[b].style.display=c}}};RadTabStrip.prototype.DetermineDirection=function(){var a=this.DomElement;while(a.tagName.toLowerCase()!="html"){if(a.dir){this.Direction=a.dir.toLowerCase();return}a=a.parentNode}this.Direction="ltr"};RadTabStrip.prototype.ApplyTabBreaks=function(a){var b=a.getElementsByTagName("li");for(var c=0;c<b.length;c++){var d=b[c];if(d.className.indexOf("break")==-1){continue}var f=d.getElementsByTagName("a")[0];if(this.Direction=="rtl"&&d.firstChild.tagName.toLowerCase()=="a"){f.style.cssFloat="right";f.style.styleFloat="right"}}};RadTabStrip.prototype.CreateTab=function(a,b,c){var d=new RadTab(b);d.MaxZIndex=c;d.DepthLevel=a.DepthLevel+1;d.Parent=a;d.TabStrip=this;d.Index=a.Tabs.length;d.GlobalIndex=this.AllTabs.length;return d};RadTabStrip.prototype.CreateTabObject=function(a,b,c){var d=this.CreateTab(a,b,c);a.Tabs[a.Tabs.length]=d;this.AllTabs[this.AllTabs.length]=d;return d};RadTabStrip.prototype.CreateLevelWrap=function(a){if(this.LevelWraps[a]){return this.LevelWraps[a]}this.LevelWraps[a]=document.createElement("div");this.LevelWraps[a].style.display=a>0?"none":"block";if(this.ReverseLevelOrder&&a>0){this.DomElement.insertBefore(this.LevelWraps[a],this.LevelWraps[a-1])}else{this.DomElement.appendChild(this.LevelWraps[a])}this.LevelWraps[a].className="levelwrap level"+(a+1);if(this.Direction=="rtl"){this.LevelWraps[a].style.cssFloat="right";this.LevelWraps[a].style.styleFloat="right"}return this.LevelWraps[a]};RadTabStrip.prototype.CreateControlHierarchy=function(a,b){this.MaxLevel=Math.max(a.DepthLevel,this.MaxLevel);if(a.DepthLevel>0){this.CreateLevelWrap(a.DepthLevel).appendChild(b)}var c=RadTabStripNamespace.GetChildren(b,"li");for(var d=0;d<c.length;d++){var f=c[d];var g=f.getElementsByTagName("a")[0];if(!g){continue}g.style.zIndex=c.length-d;var h=this.CreateTabObject(a,g,c.length);h.Initialize();if(h.ChildStripDomElement){this.CreateControlHierarchy(h,h.ChildStripDomElement)}}};RadTabStrip.prototype.SelectPageView=function(a){if(!this.Initialized){return}if(this.MultiPageClientID==""||typeof(window[this.MultiPageClientID])=="undefined"||window[this.MultiPageClientID].innerHTML){return}var b=window[this.MultiPageClientID];if(a.NavigateAfterClick&&this.EnableImmediateNavigation){b.NavigateAfterClick=true}if(a.PageViewID){b.SelectPageById(a.PageViewID)}else{b.SelectPageByIndex(a.GlobalIndex)}};RadTabStrip.prototype.ApplyRTL=function(){if(this.Direction=="ltr"){return}if(RadControlsNamespace.Browser.IsIE){this.DomElement.dir="ltr"}var a=this.DomElement.getElementsByTagName("li");if(this.IsVertical){return}for(var b=0;b<a.length;b++){if(a[b].className.indexOf("break")>-1){continue}a[b].style.styleFloat="right";a[b].style.cssFloat="right"}var c=this.DomElement.getElementsByTagName("ul");for(var b=0;b<c.length;b++){c[b].style["clear"]="right"}var d=this.Skin?this.Skin:"Default";this.DomElement.className+=" tabstrip_rtl RadTabStrip_"+d+"_rtl"};RadTabStrip.prototype.Enable=function(){this.Enabled=true;this.DomElement.disabled="";this.InUpdate=true;for(var a=0;a<this.AllTabs.length;a++){this.AllTabs[a].Enable()}this.InUpdate=false;this.RecordState()};RadTabStrip.prototype.Disable=function(){this.Enabled=false;this.DomElement.disabled="disabled";this.InUpdate=true;for(var a=0;a<this.AllTabs.length;a++){this.AllTabs[a].Disable()}this.InUpdate=false;this.RecordState()};RadTabStrip.prototype.RecordState=function(){if(this.InUpdate||!this.Initialized||!this.Enabled){return}var a=RadControlsNamespace.JSON.stringify(this,this.InitialState);var b=[];for(var c in this.TabsState){if(this.TabsState[c]==""){continue}if(typeof this.TabsState[c]=="function"){continue}b[b.length]=this.TabsState[c]}this.StateField.value="{\"State\":"+a+",\"TabState\":{"+b.join(",")+"}}"};RadTabStrip.prototype.OnScrollStop=function(){this.RecordState()};if(typeof window.RadControlsNamespace=="undefined"){window.RadControlsNamespace={}}RadControlsNamespace.ScrollButtonsPosition={Left:0,Middle:1,Right:2};RadControlsNamespace.Scroll=function(a,b,c){this.Owner=c;this.Element=a;this.IsVertical=b;this.ScrollButtonsPosition=c.ScrollButtonsPosition;this.ScrollPosition=c.ScrollPosition;this.PerTabScrolling=c.PerTabScrolling;this.ScrollOnHover=false;this.WrapNeeded=false;this.LeaveGapsForArrows=true;this.LeftArrowClass="leftArrow";this.LeftArrowClassDisabled="leftArrowDisabled";this.RightArrowClass="rightArrow";this.RightArrowClassDisabled="rightArrowDisabled";this.Initialized=false};RadControlsNamespace.Scroll.Create=function(a,b,c){return new RadControlsNamespace.Scroll(a,b,c)};RadControlsNamespace.Scroll.prototype.Initialize=function(){if(this.Initialized){this.ApplyOverflow();this.CalculateMinMaxPosition();this.EvaluateArrowStatus();return false}if((this.Element.offsetWidth==0&&!this.IsVertical)||(this.Element.offsetHeight==0&&this.IsVertical)){return false}this.Initialized=true;this.ScrollAmount=2;this.Direction=0;if(this.WrapNeeded){var a=this.CreateScrollWrap()}this.ApplyOverflow();this.Element.style.position="relative";this.AttachArrows();this.CalculateMinMaxPosition();if(this.PerTabScrolling){this.CalculateInitialTab()}this.AttachScrollMethods();this.EvaluateArrowStatus();this.AttachEventHandlers();this.ScrollTo(this.ScrollPosition);this.ApplyOverflow();return a};RadControlsNamespace.Scroll.prototype.ApplyOverflow=function(){if(RadControlsNamespace.Browser.IsIE){this.Element.parentNode.style.overflow="visible";if(this.IsVertical){this.Element.parentNode.style.overflowX="";this.Element.parentNode.style.overflowY="hidden"}else{this.Element.parentNode.style.overflowX="hidden";this.Element.parentNode.style.overflowY="hidden"}}else{this.Element.parentNode.style.overflow="hidden"}if(!this.ScrollNeeded()){this.Element.parentNode.style.overflow="visible";this.Element.parentNode.style.overflowX="visible";this.Element.parentNode.style.overflowY="visible"}};RadControlsNamespace.Scroll.prototype.ResizeHandler=function(){if(this.Disposed){return}if(!this.Initialized){this.Initialize()}if(!this.Initialized){return}if(!this.Element.offsetHeight||!this.Element.offsetWidth){return}this.CalculateMinMaxPosition();if(this.Element.offsetWidth<this.Element.parentNode.offsetWidth){this.ScrollTo(0)}var a=parseInt(this.IsVertical?this.Element.style.top:this.Element.style.left);if(isNaN(a)){a=0}var b=this};RadControlsNamespace.Scroll.prototype.AttachEventHandlers=function(){var a=this.Element;var b=this;this.resizeClosure=function(){b.ResizeHandler()};if(window.addEventListener){window.addEventListener("resize",this.resizeClosure,false)}else{window.attachEvent("onresize",this.resizeClosure)}};RadControlsNamespace.Scroll.prototype.Dispose=function(){this.Disposed=true;this.Element=null;clearTimeout(this.intervalPointer);if(window.removeEventListener){window.removeEventListener("resize",this.resizeClosure,false)}else{window.detachEvent("onresize",this.resizeClosure)}};RadControlsNamespace.Scroll.prototype.AttachArrows=function(){var a=this.CreateArrow("&laquo;",1,this.LeftArrowClass);var b=this.CreateArrow("&raquo;",-1,this.RightArrowClass);this.LeftArrow=a;this.RightArrow=b;if(this.IsVertical){a.style.left="0px";b.style.left="0px";if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Middle){a.style.top="0px";b.style.bottom="0px"}else{if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Left){a.style.top="0px";b.style.top=a.offsetHeight+"px"}else{b.style.bottom="0px";a.style.bottom=a.offsetHeight+"px"}}}else{a.style.top="0px";b.style.top="0px";if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Middle){a.style.left="-1px";b.style.right="-1px"}else{if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Left){a.style.left="-1px";b.style.left=(a.offsetWidth-1)+"px"}else{b.style.right="-1px";a.style.right=(b.offsetWidth-1)+"px"}}}};RadControlsNamespace.Scroll.prototype.CreateArrow=function(a,b,c){var d=document.createElement("a");d.href="#";d.className=c;d.style.zIndex="2000";d.appendChild(document.createTextNode("&nbsp;"));this.Element.parentNode.appendChild(d);var f=this;d.ScrollDirection=b;if(this.ScrollOnHover){d.onmousedown=function(){if(this.disabled){return false}f.ScrollAmount=3;return true};d.onmouseup=function(){f.ScrollAmount=1};d.onmouseover=function(){if(this.disabled){return false}f.ScrollAmount=1;f.Scroll(this.ScrollDirection);return true};d.onmouseout=function(){f.scrollAmount=0;f.Stop();return false}}else{d.onmousedown=function(){f.Scroll(this.ScrollDirection)};d.onmouseup=function(){f.Stop()}}d.onclick=function(){return false};return d};RadControlsNamespace.Scroll.prototype.SetHeight=function(a){if(parseInt(a)==0){return}this.Element.parentNode.style.height=a;this.Initialize()};RadControlsNamespace.Scroll.prototype.SetWidth=function(a){if(parseInt(a)==0){return}this.Element.parentNode.style.width=a;this.Initialize()};RadControlsNamespace.Scroll.prototype.CreateScrollWrap=function(){var a=document.createElement("div");var b=this.Element.parentNode;a.appendChild(this.Element);a.style.position="relative";a.align="left";b.appendChild(a);if(this.IsVertical){a.style.styleFloat="left";a.style.cssFloat="left";this.Element.style.display="none";a.style.height=a.parentNode.parentNode.offsetHeight+"px";this.Element.style.display="block"}else{var c=0;for(var d=0;d<this.Element.childNodes.length;d++){var f=this.Element.childNodes[d];if(!f.tagName){continue}c+=f.offsetWidth}this.Element.style.width=(c+3)+"px"}return a};RadControlsNamespace.Scroll.prototype.CalculateMinMaxPosition=function(){if(!this.Initialized){return}if(this.IsVertical){var a=this.Element.parentNode.offsetHeight-this.Element.offsetHeight;var b=this.LeftArrow.offsetHeight;var c=this.RightArrow.offsetHeight}else{var a=this.Element.parentNode.offsetWidth-this.Element.offsetWidth;var b=this.LeftArrow.offsetWidth;var c=this.RightArrow.offsetWidth}if(!this.LeaveGapsForArrows){b=0;c=0}this.MaxScrollPosition=0;this.MinScrollPosition=a-c-b;if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Middle){this.Offset=b}else{if(this.ScrollButtonsPosition==RadControlsNamespace.ScrollButtonsPosition.Left){this.Offset=b+c}else{this.Offset=0}}};RadControlsNamespace.Scroll.prototype.CalculateInitialTab=function(){var a=this.Element.getElementsByTagName("li");if(a.length>0){var b=0;while(this.ScrollPosition<-(this.IsVertical?a[b].offsetTop:a[b].offsetLeft)){b++}this.CurrentTab=b}};RadControlsNamespace.Scroll.prototype.AttachScrollMethods=function(){if(this.PerTabScrolling){this.Scroll=RadControlsNamespace.Scroll.StartPerTabScroll;this.Stop=RadControlsNamespace.Scroll.StopPerTabScroll}else{this.Scroll=RadControlsNamespace.Scroll.StartSmoothScroll;this.Stop=RadControlsNamespace.Scroll.StopSmoothScroll}};RadControlsNamespace.Scroll.prototype.EvaluateArrowStatus=function(){var a=!(this.ScrollPosition>this.MinScrollPosition);var b=!(this.ScrollPosition<this.MaxScrollPosition);this.RightArrow.disabled=a;this.LeftArrow.disabled=b;if(b){if(this.LeftArrow.className!=this.LeftArrowClassDisabled){this.LeftArrow.className=this.LeftArrowClassDisabled}}else{if(this.LeftArrow.className!=this.LeftArrowClass){this.LeftArrow.className=this.LeftArrowClass}}if(a){if(this.RightArrow.className!=this.RightArrowClassDisabled){this.RightArrow.className=this.RightArrowClassDisabled}}else{if(this.RightArrow.className!=this.RightArrowClass){this.RightArrow.className=this.RightArrowClass}}};RadControlsNamespace.Scroll.StartSmoothScroll=function(a){this.Stop();this.Direction=a;var b=this;var c=function(){b.ScrollBy(b.Direction*b.ScrollAmount)};c();this.scrollInterval=setInterval(c,10)};RadControlsNamespace.Scroll.prototype.ScrollTo=function(a){a=Math.max(a,this.MinScrollPosition);a=Math.min(a,this.MaxScrollPosition);a+=this.Offset;if(this.IsVertical){this.Element.style.top=a+"px"}else{this.Element.style.left=a+"px"}this.Owner.ScrollPosition=this.ScrollPosition=a-this.Offset;this.EvaluateArrowStatus()};RadControlsNamespace.Scroll.prototype.ScrollBy=function(a){var b=this.ScrollPosition;this.ScrollTo(b+a)};RadControlsNamespace.Scroll.StartPerTabScroll=function(a){this.Stop();var b=this.Element.getElementsByTagName("li");var c=this.CurrentTab-a;if(c<0||c>b.length){return}var d=a==-1?this.CurrentTab:c;this.CurrentTab=c;if(this.IsVertical){var f=b[d].offsetHeight}else{var f=b[d].offsetWidth}this.ScrollBy(f*a);this.EvaluateArrowStatus()};RadControlsNamespace.Scroll.prototype.ScrollNeeded=function(){return true;if(this.IsVertical){return this.Element.offsetHeight>this.Element.parentNode.offsetHeight}return this.Element.offsetWidth>this.Element.parentNode.offsetWidth};RadControlsNamespace.Scroll.StopSmoothScroll=function(a){if(this.OnScrollStop){this.OnScrollStop()}clearInterval(this.scrollInterval)};RadControlsNamespace.Scroll.StopPerTabScroll=function(a){if(this.OnScrollStop){this.OnScrollStop()}};if(typeof(Sys)!="undefined"){if(Sys.Application!=null&&Sys.Application.notifyScriptLoaded!=null){Sys.Application.notifyScriptLoaded()}}