ASPxClientTabControlBase=_aspxCreateClass(ASPxClientControl,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.activeTabIndex=0;this.callBackCount=0;this.cookieName="";this.emptyHeight=false;this.emptyWidth=false;this.tabAlign="Left";this.tabPosition="Top";this.tabCount=0;this.tabs=[];this.TabClick=new ASPxClientEvent();this.ActiveTabChanged=new ASPxClientEvent();this.ActiveTabChanging=new ASPxClientEvent();this.InitializeOnResize();},Initialize:function(){this.CorrrectCellsBounds();this.constructor.prototype.Initialize.call(this);},InitializeCallBackData:function(){var element=this.GetContentElement(this.activeTabIndex);if(element!=null)element.loaded=true;},InitializeOnResize:function(){var element=this.GetMainElement();if(_aspxIsExists(element))element.onresize=new Function("aspxTCResize(\""+this.name+"\");");},GetTabsCell:function(){return this.GetChild("_TC");},GetTabElement:function(index){return this.GetChild("_T"+index);},GetActiveTabElement:function(index){return this.GetChild("_AT"+index);},GetContentsCell:function(){return this.GetChild("_CC");},GetContentElement:function(index){return this.GetChild("_C"+index);},GetLeftAlignCellElement:function(){return this.GetChild("_LAC");},GetRightAlignCellElement:function(){return this.GetChild("_RAC");},GetTabLayoutElement:function(element){if(!this.IsTopBottomTabPosition())return _aspxGetParentNode(element);return element;},GetLoadingPanelElement:function(){return _aspxGetElementById(this.name+"_LP");},GetActiveTabIndexInputElement:function(index){return _aspxGetElementById(this.name+"ATI");},IsTopBottomTabPosition:function(){return(this.tabPosition=="Top"||this.tabPosition=="Bottom");},CorrrectCellsBounds:function(){var mainElement=this.GetMainElement();if(mainElement==null||mainElement.offsetWidth==0||mainElement.offsetHeight==0)return;mainElement.corrected=true;if(__aspxIE&&!this.emptyHeight&&this.tabAlign!="Justify"){if(this.IsTopBottomTabPosition())this.CorrectContentCellHeight();else this.CorrectAlignCellsHeight();}if(this.emptyHeight&&!this.IsTopBottomTabPosition()){this.CorrectTabsCellHeight();if(__aspxIE)this.CorrectAlignCellsHeight();}if(this.emptyWidth&&this.IsTopBottomTabPosition()&&this.tabAlign!="Justify")this.CorrectTabsCellWidth();this.CorrectOperaTabsCellAlignment();this.CorrectOperaTabCellsAlignment();},CorrectTabsCellHeight:function(){var mainElement=this.GetMainElement();var tabsCell=this.GetTabsCell();if(mainElement!=null&&tabsCell){var leftAlignCell=this.GetLeftAlignCellElement();if(leftAlignCell!=null)leftAlignCell.style.height="auto";var rightAlignCell=this.GetRightAlignCellElement();if(rightAlignCell!=null)rightAlignCell.style.height="auto";tabsCell.style.height="auto";tabsCell.style.height=mainElement.offsetHeight+"px";if(leftAlignCell!=null&&rightAlignCell==null)leftAlignCell.style.height="100%";if(leftAlignCell==null&&rightAlignCell!=null)rightAlignCell.style.height="100%";if(leftAlignCell!=null&&rightAlignCell!=null){leftAlignCell.style.height="50%";rightAlignCell.style.height="50%";}}},CorrectTabsCellWidth:function(){var mainElement=this.GetMainElement();var tabsCell=this.GetTabsCell();if(mainElement!=null&&tabsCell){var leftAlignCell=this.GetLeftAlignCellElement();if(leftAlignCell!=null)leftAlignCell.style.width="auto";var rightAlignCell=this.GetRightAlignCellElement();if(rightAlignCell!=null)rightAlignCell.style.width="auto";tabsCell.style.width="auto";tabsCell.style.width=mainElement.clientWidth;if(leftAlignCell!=null&&rightAlignCell==null)leftAlignCell.style.width="100%";if(leftAlignCell==null&&rightAlignCell!=null)rightAlignCell.style.width="100%";if(leftAlignCell!=null&&rightAlignCell!=null){leftAlignCell.style.width="50%";rightAlignCell.style.width="50%";}}},CorrectContentCellHeight:function(){var mainElement=this.GetMainElement();var tabsCell=this.GetTabsCell();var contentsCell=this.GetContentsCell();if(mainElement!=null&&tabsCell!=null&&contentsCell!=null){var tabsHeight=tabsCell.offsetHeight;tabsCell.style.height=tabsHeight+"px";contentsCell.style.height="auto";contentsCell.style.height=(mainElement.clientHeight-tabsHeight)+"px";}},CorrectAlignCellsHeight:function(){var mainElement=this.GetMainElement();var tabsCell=this.GetTabsCell();if(mainElement!=null&&tabsCell!=null){var leftAlignCell=this.GetLeftAlignCellElement();var rightAlignCell=this.GetRightAlignCellElement();var tabsTable=tabsCell.firstChild;if(tabsTable!=null){if(leftAlignCell!=null||rightAlignCell!=null){var tabsHeight=0;for(var i=0;i-1){var callBackTabIndex=parseInt(result.substr(0,pos));var element=this.GetContentElement(callBackTabIndex);if(element!=null){result=result.substring(pos+__aspxCallBackSeparator.length);if(result!=""){element.loaded=true;element.loading=false;element.innerHTML=result;this.callBackCount--;if(this.callBackCount==0){this.UnfixControlSize();this.CorrrectCellsBounds();this.CorrectOperaTabCellsAlignment();}if(!isError&&_aspxIsExists(this.RaiseActiveTabChanged))this.RaiseActiveTabChanged(callBackTabIndex);}else this.SendPostBack("");}}},OnCallback:function(result){this.OnCallbackInternal(result,false);},OnCallbackError:function(result){this.OnCallbackInternal(result,true);}});ASPxClientTabControl=_aspxCreateClass(ASPxClientTabControlBase,{});ASPxClientPageControl=_aspxCreateClass(ASPxClientTabControlBase,{});function aspxTCResize(name){var tc=aspxGetControlCollection().Get(name);if(tc!=null)tc.OnResize();} function aspxTCTClick(evt,name,index){var tc=aspxGetControlCollection().Get(name);if(tc!=null)tc.OnTabClick(evt,index);} function aspxTCTLClick(evt,name,index,tabName){var tc=aspxGetControlCollection().Get(name);if(tc!=null)tc.OnTabLinkClick(index,evt);evt.cancelBubble=true;}