 ASPxClientNavBar.prototype.CreateGroups=function(groupsProperties){for(var i=0;i<groupsProperties.length;i++){var group=new ASPxClientNavBarGroup(this,i,groupsProperties[i][0]);_aspxArrayPush(this.groups,group);group.CreateItems(groupsProperties[i][1]);}}
ASPxClientNavBar.prototype.RaiseItemClick=function(groupIndex,itemIndex,htmlEvent){var processOnServer=this.autoPostBack||this.IsServerEventAssigned("ItemClick");if(!this.ItemClick.IsEmpty()){var htmlElement=this.GetItemElement(groupIndex,itemIndex);var args=new ASPxClientNavBarItemEventArgs(processOnServer,this.GetGroup(groupIndex).GetItem(itemIndex),htmlElement,htmlEvent);this.ItemClick.FireEvent(this,args);processOnServer=args.processOnServer;}return processOnServer;}
ASPxClientNavBar.prototype.RaiseExpandedChanged=function(groupIndex){if(!this.ExpandedChanged.IsEmpty()){var args=new ASPxClientNavBarGroupEventArgs(this.GetGroup(groupIndex));this.ExpandedChanged.FireEvent(this,args);}}
ASPxClientNavBar.prototype.RaiseExpandedChanging=function(groupIndex){var processingMode=this.autoPostBack?"Server":"Client";if(!this.ExpandedChanging.IsEmpty()){var args=new ASPxClientNavBarGroupCancelEventArgs(processingMode=="Server",this.GetGroup(groupIndex));this.ExpandedChanging.FireEvent(this,args);if(args.cancel)processingMode="Handled";else processingMode=args.processOnServer?"Server":"Client";}return processingMode;}
ASPxClientNavBar.prototype.RaiseHeaderClick=function(groupIndex,htmlEvent){var processingMode=this.autoPostBack||this.IsServerEventAssigned("HeaderClick")?"Server":"Client";if(!this.HeaderClick.IsEmpty()){var htmlElement=this.GetClickableGroupHeaderElement(groupIndex);var args=new ASPxClientNavBarGroupClickEventArgs(processingMode=="Server",this.GetGroup(groupIndex),htmlElement,htmlEvent);this.HeaderClick.FireEvent(this,args);if(args.cancel)processingMode="Handled";else processingMode=args.processOnServer?"Server":"Client";}return processingMode;}
ASPxClientNavBar.prototype.GetGroupCount=function(){return this.groups.length;}
ASPxClientNavBar.prototype.GetGroup=function(index){return(0<=index&&index<this.groups.length)?this.groups[index]:null;}
ASPxClientNavBar.prototype.GetGroupByName=function(name){for(var i=0;i<this.groups.length;i++)if(this.groups[i].name==name)return this.groups[i];return null;}
ASPxClientNavBar.prototype.GetActiveGroup=function(){if(this.autoCollapse){for(var i=0;i<this.groups.length;i++){if(this.groups[i].GetExpanded())return this.groups[i];}}return null;}
ASPxClientNavBar.prototype.SetActiveGroup=function(group){if(this.autoCollapse&&group!=null)group.SetExpanded(true);}
ASPxClientNavBar.prototype.GetItemByName=function(name){for(var i=0;i<this.groups.length;i++){var item=this.groups[i].GetItemByName(name);if(item!=null)return item;}return null;}
ASPxClientNavBar.prototype.GetSelectedItem=function(){var inputElement=this.GetSelectedItemInputElement();if(inputElement!=null&&inputElement.value!=""){var groupIndex=this.GetGroupIndex(inputElement.value);var itemIndex=this.GetItemIndex(inputElement.value);if(groupIndex>-1&&itemIndex>-1)return this.GetGroup(groupIndex).GetItem(itemIndex);}return null;}
ASPxClientNavBar.prototype.SetSelectedItem=function(item){var groupIndex=(item!=null)?item.group.index:-1;var itemIndex=(item!=null)?item.index:-1;this.SetSelectedItemInternal(groupIndex,itemIndex,false);}
ASPxClientNavBar.prototype.CollapseAll=function(){for(var i=0;i<this.groupsExpanding.length;i++){if(this.groupsExpanding[i])this.SetExpandedInternal(i,false);}}
ASPxClientNavBar.prototype.ExpandAll=function(){for(var i=0;i<this.groupsExpanding.length;i++){if(!this.groupsExpanding[i])this.SetExpandedInternal(i,true);}}
ASPxClientNavBar.prototype.CheckSelectedItem=function(groupIndex,itemIndex){var selectedItem=this.GetSelectedItem();if(selectedItem!=null&&selectedItem.group.index==groupIndex&&selectedItem.index==itemIndex)this.SetSelectedItem(null);}
ASPxClientNavBar.prototype.ChangeEnabledAttributes=function(groupIndex,itemIndex,method,styleMethod){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var itemElement=this.GetItemElement(groupIndex,itemIndex);if(_aspxIsExists(itemElement))method(itemElement,"onclick");var imageElement=this.GetItemImageElementByIndexPath(indexPath);if(_aspxIsExists(imageElement)){method(imageElement,"onclick");styleMethod(imageElement,"cursor");var link=_aspxGetChildByTagName(imageElement,"A",0);if(link!=null){method(link,"onclick");method(link,"href");}}
var textElement=this.GetItemTextElementByIndexPath(indexPath);if(_aspxIsExists(textElement)){method(textElement,"onclick");styleMethod(textElement,"cursor");var link=_aspxGetChildByTagName(textElement,"A",0);if(link!=null){method(link,"onclick");method(link,"href");}
link=_aspxGetChildByTagName(textElement,"A",1);if(link!=null){method(link,"onclick");method(link,"href");}}}
ASPxClientNavBar.prototype.GetItemEnabled=function(groupIndex,itemIndex){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemTextElementByIndexPath(indexPath);if(element==null)element=this.GetItemImageElementByIndexPath(indexPath);if(element!=null)return!_aspxIsExists(element.enabled)||element.enabled;return true;}
ASPxClientNavBar.prototype.SetItemEnabled=function(groupIndex,itemIndex,enabled){if(this.GetItemEnabled(groupIndex,itemIndex)==enabled)return;var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemTextElementByIndexPath(indexPath);if(element==null)element=this.GetItemImageElementByIndexPath(indexPath);if(element!=null){element.enabled=enabled;if(enabled){aspxGetStateController().EnableElement(element);this.ChangeEnabledAttributes(groupIndex,itemIndex,_aspxRestoreAttribute,_aspxRestoreStyleAttribute);}else{this.CheckSelectedItem(groupIndex,itemIndex);aspxGetStateController().DisableElement(element);this.ChangeEnabledAttributes(groupIndex,itemIndex,_aspxResetAttribute,_aspxResetStyleAttribute);}}}
ASPxClientNavBar.prototype.GetItemImageUrl=function(groupIndex,itemIndex){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemImageElementByIndexPath(indexPath);if(element!=null){var img=_aspxGetChildByTagName(element,"IMG",0);if(img!=null)return img.src;}
element=this.GetItemTextElementByIndexPath(indexPath);if(element!=null){var img=_aspxGetChildByTagName(element,"IMG",0);if(img!=null)return img.src;}return "";}
ASPxClientNavBar.prototype.SetItemImageUrl=function(groupIndex,itemIndex,url){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemImageElementByIndexPath(indexPath);if(element!=null){var img=_aspxGetChildByTagName(element,"IMG",0);if(img!=null)img.src=url;}
element=this.GetItemTextElementByIndexPath(indexPath);if(element!=null){var img=_aspxGetChildByTagName(element,"IMG",0);if(img!=null)img.src=url;}}
ASPxClientNavBar.prototype.GetItemNavigateUrl=function(groupIndex,itemIndex){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemTextElementByIndexPath(indexPath);if(element!=null){var link=_aspxGetChildByTagName(element,"A",0);if(link!=null)return link.href;}
element=this.GetItemImageElementByIndexPath(indexPath);if(element!=null){var link=_aspxGetChildByTagName(element,"A",0);if(link!=null)return link.href;}return "";}
ASPxClientNavBar.prototype.SetItemNavigateUrl=function(groupIndex,itemIndex,url){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemTextElementByIndexPath(indexPath);if(element!=null){var link=_aspxGetChildByTagName(element,"A",0);if(link!=null)link.href=url;link=_aspxGetChildByTagName(element,"A",1);if(link!=null)link.href=url;}
var element=this.GetItemImageElementByIndexPath(indexPath);if(element!=null){var link=_aspxGetChildByTagName(element,"A",0);if(link!=null)link.href=url;}}
ASPxClientNavBar.prototype.GetItemText=function(groupIndex,itemIndex){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemTextElementByIndexPath(indexPath);if(element!=null){var textNode=_aspxGetChildTextNode(element,0);if(textNode!=null)return textNode.nodeValue;}return "";}
ASPxClientNavBar.prototype.SetItemText=function(groupIndex,itemIndex,text){var indexPath=this.GetIndexPath(groupIndex,itemIndex);var element=this.GetItemTextElementByIndexPath(indexPath);if(element!=null){var textNode=_aspxGetChildTextNode(element,0);if(textNode!=null)textNode.nodeValue=text;}}
ASPxClientNavBar.prototype.GetItemVisible=function(groupIndex,itemIndex){var element=this.GetItemElement(groupIndex,itemIndex);return(element!=null)?_aspxGetElementDisplay(element):false;}
ASPxClientNavBar.prototype.SetItemVisible=function(groupIndex,itemIndex,visible){if(!visible)this.CheckSelectedItem(groupIndex,itemIndex);var element=this.GetItemElement(groupIndex,itemIndex);if(element!=null)_aspxSetElementDisplay(element,visible);}
ASPxClientNavBarGroup=_aspxCreateClass(null,{constructor:function(navBar,index,name){this.navBar=navBar;this.index=index;this.name=name;this.items=[];},CreateItems:function(itemsProperties){for(var i=0;i<itemsProperties.length;i++){var item=new ASPxClientNavBarItem(this.navBar,this,i,itemsProperties[i][0]);_aspxArrayPush(this.items,item);}},GetExpanded:function(){return this.navBar.groupsExpanding[this.index];},SetExpanded:function(value){this.navBar.SetExpandedInternal(this.index,value);},GetItemCount:function(groupIndex){return this.items.length;},GetItem:function(index){return(0<=index&&index<this.items.length)?this.items[index]:null;},GetItemByName:function(name){for(var i=0;i<this.items.length;i++)if(this.items[i].name==name)return this.items[i];return null;}});ASPxClientNavBarItem=_aspxCreateClass(null,{constructor:function(navBar,group,index,name){this.navBar=navBar;this.group=group;this.index=index;this.name=name;},GetEnabled:function(){return this.navBar.GetItemEnabled(this.group.index,this.index);},SetEnabled:function(value){this.navBar.SetItemEnabled(this.group.index,this.index,value);},GetImageUrl:function(){return this.navBar.GetItemImageUrl(this.group.index,this.index);},SetImageUrl:function(value){this.navBar.SetItemImageUrl(this.group.index,this.index,value);},GetNavigateUrl:function(){return this.navBar.GetItemNavigateUrl(this.group.index,this.index);},SetNavigateUrl:function(value){this.navBar.SetItemNavigateUrl(this.group.index,this.index,value);},GetText:function(){return this.navBar.GetItemText(this.group.index,this.index);},SetText:function(value){this.navBar.SetItemText(this.group.index,this.index,value);},GetVisible:function(){return this.navBar.GetItemVisible(this.group.index,this.index);},SetVisible:function(value){this.navBar.SetItemVisible(this.group.index,this.index,value);}});ASPxClientNavBarItemEventArgs=_aspxCreateClass(ASPxClientProcessingModeEventArgs,{constructor:function(processOnServer,item,htmlElement,htmlEvent){this.constructor.prototype.constructor.call(this,processOnServer);this.item=item;this.htmlElement=htmlElement;this.htmlEvent=htmlEvent;}});ASPxClientNavBarGroupEventArgs=_aspxCreateClass(ASPxClientEventArgs,{constructor:function(group){this.group=group;}});ASPxClientNavBarGroupCancelEventArgs=_aspxCreateClass(ASPxClientCancelEventArgs,{constructor:function(processOnServer,group){this.constructor.prototype.constructor.call(this,processOnServer);this.group=group;}});ASPxClientNavBarGroupClickEventArgs=_aspxCreateClass(ASPxClientNavBarGroupCancelEventArgs,{constructor:function(processOnServer,group,htmlElement,htmlEvent){this.constructor.prototype.constructor.call(this,processOnServer,group);this.htmlElement=htmlElement;this.htmlEvent=htmlEvent;}});