﻿// Copyright (c) ComponentOne L.L.C., All rights reserved.
Type.registerNamespace("C1.Web.UI.Controls.C1Menu");C1.Web.UI.Controls.C1Menu.C1MenuItemsOrientation=function(){};C1.Web.UI.Controls.C1Menu.C1MenuItemsOrientation.prototype={auto:0,vertical:1,horizontal:2};C1.Web.UI.Controls.C1Menu.C1MenuItemsOrientation.registerEnum("C1.Web.UI.Controls.C1Menu.C1MenuItemsOrientation",false);C1.Web.UI.Controls.C1Menu.C1SubMenuExpandDirection=function(){};C1.Web.UI.Controls.C1Menu.C1SubMenuExpandDirection.prototype={auto:0,center:2,topLeft:3,topRight:4,topCenter:5,rightTop:6,rightBottom:7,rightMiddle:8,bottomLeft:9,bottomRight:10,bottomCenter:11,leftTop:12,leftBottom:13,leftMiddle:14};C1.Web.UI.Controls.C1Menu.C1SubMenuExpandDirection.registerEnum("C1.Web.UI.Controls.C1Menu.C1SubMenuExpandDirection",false);C1.Web.UI.Controls.C1Menu.HeaderType=function(){};C1.Web.UI.Controls.C1Menu.HeaderType.prototype={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};C1.Web.UI.Controls.C1Menu.HeaderType.registerEnum("C1.Web.UI.Controls.C1Menu.HeaderType",false);C1.Web.UI.Controls.C1Menu.ImagePosition=function(){};C1.Web.UI.Controls.C1Menu.ImagePosition.prototype={left:0,right:1};C1.Web.UI.Controls.C1Menu.ImagePosition.registerEnum("C1.Web.UI.Controls.C1Menu.ImagePosition",false);C1.Web.UI.Controls.C1Menu.C1Menu=function(a){this._currentMenuPath=new Array(0);C1.Web.UI.Controls.C1Menu.C1Menu.initializeBase(this,[a]);this.nestedGroupContainer=a;this.$3_1A=new C1.Web.UI.SerializablePrimitives.C1ItemsCollection(this)};C1.Web.UI.Controls.C1Menu.C1Menu.$3_2A=function(b){var a=b.element.parentNode;if(a){return C1.Web.UI.FlowPanel.determineOrientation(a)}return 0};C1.Web.UI.Controls.C1Menu.C1Menu.$3_2C=function(c){var b=1;var a=c.childNodes;for(var d=0;d<a.length;d++){if(a[d].tagName==="UL"){b=C1.Web.UI.FlowPanel.determineOrientation(a[d]);break}}return b};C1.Web.UI.Controls.C1Menu.C1Menu.prototype={$3_1:null,$3_2:0,$3_3:false,$3_4:false,$3_5:false,$3_6:false,$3_7:null,$3_8:null,$3_9:null,$3_A:null,$3_B:null,$3_C:null,$3_D:null,$3_E:null,$3_F:null,$3_10:null,$3_11:null,$3_12:null,$3_13:null,$3_14:null,$3_15:null,$3_16:false,$3_17:null,$3_18:false,$3_19:null,$3_1A:null,$3_1B:null,$3_1C:null,$3_1D:null,$3_1E:null,$3_1F:null,$3_20:null,$3_21:null,$3_22:null,$3_23:null,nestedGroupContainer:null,scrollContainer:null,get_enabled:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.Enabled))?true:this._propertiesState.Enabled},set_enabled:function(a){this.get_element().disabled=!a;this._propertiesState.Enabled=a;this.saveState();return a},get_orientation:function(){this.internalInitialize();if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.Orientation)){var a=this.$3_2B();if(a===1){return 1}else{return 2}}return this._propertiesState.Orientation},set_orientation:function(a){this.internalInitialize();if(a===2){this.$3_2D(0)}else{if(a===1){this.$3_2D(1)}}this._propertiesState.Orientation=a;return a},get_scrollBehavior:function(){if(!this.$3_1&&this.nestedGroupContainer&&this.scrollContainer){this.$3_1=new C1.Web.UI.DOMScrollBehavior(this.scrollContainer);var a=this._propertiesState.ScrollSettings;if(!C1.Web.UI.Utils.Common.testIsNull(a)){this.$3_44(a);this.$3_1.assignPropertiesUsingHash(a)}this.$3_1.initialize()}return this.$3_1},get_flowRight:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.FlowRight))?false:this._propertiesState.FlowRight},set_flowRight:function(a){this._propertiesState.FlowRight=a;this.saveState();return a},get_accessKey:function(){return this.get_propertiesState()["AccessKey"]},set_accessKey:function(a){this.get_propertiesState()["AccessKey"]=a;return a},get_contextMenu:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ContextMenu)){return false}return this._propertiesState.ContextMenu},set_contextMenu:function(a){this._propertiesState.ContextMenu=a;this.$3_37();return a},get_contextElementID:function(){return(!this._propertiesState.ContextElementID)?"":this._propertiesState.ContextElementID},set_contextElementID:function(a){this._propertiesState.ContextElementID=a;this.$3_37();return a},get_hoverElementID:function(){return(!this._propertiesState.HoverElementID)?"":this._propertiesState.HoverElementID},set_hoverElementID:function(a){this._propertiesState.HoverElementID=a;this.$3_38();return a},get_collapseAnimation:function(){return(!this.get_propertiesState()["CollapseAnimation"])?0:this.get_propertiesState()["CollapseAnimation"]},set_collapseAnimation:function(a){this.get_propertiesState()["CollapseAnimation"]=a;return a},get_collapseDelay:function(){return(C1.Web.UI.Utils.Common.testIsNull(this.get_propertiesState()["CollapseDelay"]))?100:this.get_propertiesState()["CollapseDelay"]},set_collapseDelay:function(a){if(a<0){return}this.get_propertiesState()["CollapseDelay"]=a;return a},get_collapseDuration:function(){return(!this.get_propertiesState()["CollapseDuration"])?500:this.get_propertiesState()["CollapseDuration"]},set_collapseDuration:function(a){if(a<0){return}this.get_propertiesState()["CollapseDuration"]=a;return a},get_expandAnimation:function(){return(!this.get_propertiesState()["ExpandAnimation"])?0:this.get_propertiesState()["ExpandAnimation"]},set_expandAnimation:function(a){this.get_propertiesState()["ExpandAnimation"]=a;return a},get_expandDelay:function(){return(C1.Web.UI.Utils.Common.testIsNull(this.get_propertiesState()["ExpandDelay"]))?100:this.get_propertiesState()["ExpandDelay"]},set_expandDelay:function(a){if(a<0){return}this.get_propertiesState()["ExpandDelay"]=a;return a},get_expandDuration:function(){return(!this.get_propertiesState()["ExpandDuration"])?500:this.get_propertiesState()["ExpandDuration"]},set_expandDuration:function(a){if(a<0){return}this.get_propertiesState()["ExpandDuration"]=a;return a},get_expandEasing:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ExpandEasing))?31:this._propertiesState.ExpandEasing},set_expandEasing:function(a){this._propertiesState.ExpandEasing=a;return a},get_collapseEasing:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.CollapseEasing))?31:this._propertiesState.CollapseEasing},set_collapseEasing:function(a){this._propertiesState.CollapseEasing=a;return a},get_clickToOpen:function(){return(C1.Web.UI.Utils.Common.testIsNull(this.get_propertiesState()["ClickToOpen"]))?false:this.get_propertiesState()["ClickToOpen"]},set_clickToOpen:function(a){this.get_propertiesState()["ClickToOpen"]=a;return a},get_windowCollisionDetection:function(){return(C1.Web.UI.Utils.Common.testIsNull(this.get_propertiesState()["WindowCollisionDetection"]))?false:this.get_propertiesState()["WindowCollisionDetection"]},set_windowCollisionDetection:function(a){this.get_propertiesState()["WindowCollisionDetection"]=a;return a},add_scrollBehaviorInit:function(a){this.get_events().addHandler("ScrollBehaviorInit",a)},remove_scrollBehaviorInit:function(a){this.get_events().removeHandler("ScrollBehaviorInit",a)},add_showing:function(a){this.get_events().addHandler("showing",a)},remove_showing:function(a){this.get_events().removeHandler("showing",a)},add_shown:function(a){this.get_events().addHandler("shown",a)},remove_shown:function(a){this.get_events().removeHandler("shown",a)},add_hidden:function(a){this.get_events().addHandler("hidden",a)},remove_hidden:function(a){this.get_events().removeHandler("hidden",a)},add_hiding:function(a){this.get_events().addHandler("hiding",a)},remove_hiding:function(a){this.get_events().removeHandler("hiding",a)},add_itemBlur:function(a){this.get_events().addHandler(this.get_id()+"_ItemBlur",a)},remove_itemBlur:function(a){this.get_events().removeHandler(this.get_id()+"_ItemBlur",a)},add_itemClick:function(a){this.get_events().addHandler(this.get_id()+"_ItemClick",a)},remove_itemClick:function(a){this.get_events().removeHandler(this.get_id()+"_ItemClick",a)},add_itemFocus:function(a){this.get_events().addHandler(this.get_id()+"_ItemFocus",a)},remove_itemFocus:function(a){this.get_events().removeHandler(this.get_id()+"_ItemFocus",a)},add_itemMouseDown:function(a){this.get_events().addHandler(this.get_id()+"_ItemMouseDown",a)},remove_itemMouseDown:function(a){this.get_events().removeHandler(this.get_id()+"_ItemMouseDown",a)},add_itemMouseOut:function(a){this.get_events().addHandler(this.get_id()+"_ItemMouseOut",a)},remove_itemMouseOut:function(a){this.get_events().removeHandler(this.get_id()+"_ItemMouseOut",a)},add_itemMouseOver:function(a){this.get_events().addHandler(this.get_id()+"_ItemMouseOver",a)},remove_itemMouseOver:function(a){this.get_events().removeHandler(this.get_id()+"_ItemMouseOver",a)},add_itemMouseUp:function(a){this.get_events().addHandler(this.get_id()+"_ItemMouseUp",a)},remove_itemMouseUp:function(a){this.get_events().removeHandler(this.get_id()+"_ItemMouseUp",a)},add_itemChecked:function(a){this.get_events().addHandler(this.get_id()+"_ItemChecked",a)},remove_itemChecked:function(a){this.get_events().removeHandler(this.get_id()+"_ItemChecked",a)},add_itemUnChecked:function(a){this.get_events().addHandler(this.get_id()+"_ItemUnChecked",a)},remove_itemUnChecked:function(a){this.get_events().removeHandler(this.get_id()+"_ItemUnChecked",a)},$3_24:function(b){var a=this.get_events().getHandler("showing");if(a){a(this,b)}},$3_25:function(b){var a=this.get_events().getHandler("shown");if(a){a(this,b)}},$3_26:function(b){var a=this.get_events().getHandler("hiding");if(a){a(this,b)}},$3_27:function(b){var a=this.get_events().getHandler("hidden");if(a){a(this,b)}},$3_28:function(b){var a=this.get_events().getHandler("ScrollBehaviorInit");if(a){a(this,b)}},initialize:function(){C1.Web.UI.Controls.C1Menu.C1Menu.callBaseMethod(this,"initialize");this.$3_7=Function.createDelegate(this,this.onMouseOver);this.$3_D=Function.createDelegate(this,this.onFocus);C1.Web.UI.Utils.RawEvent.addHandler(this.get_element(),"mouseover",this.$3_7);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){C1.Web.UI.Utils.RawEvent.addHandler(this.get_element(),"focusin",this.$3_D)}else{C1.Web.UI.Utils.RawEvent.addHandler(this.get_element(),"focus",this.$3_D)}this.$3_37();this.$3_38()},dispose:function(){if(!this.$3_3){C1.Web.UI.Controls.C1Menu.C1Menu.callBaseMethod(this,"dispose");return}this.$3_3=false;if(this.$3_7){try{C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"mouseover",this.$3_7);C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"mouseout",this.$3_8);C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"mousedown",this.$3_9);C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"mouseup",this.$3_A);C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"click",this.$3_B);C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"keydown",this.$3_C);C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"focus",this.$3_D);C1.Web.UI.Utils.RawEvent.removeHandler(this.get_element(),"blur",this.$3_E);C1.Web.UI.Utils.RawEvent.removeHandler(window.document,"mousedown",this.$3_F);this.$3_7=null;this.$3_8=null;this.$3_9=null;this.$3_A=null;this.$3_B=null;this.$3_F=null}catch(a){this.$3_7=null;this.$3_8=null;this.$3_9=null;this.$3_A=null;this.$3_B=null;this.$3_F=null}}this.$3_39();C1.Web.UI.Controls.C1Menu.C1Menu.callBaseMethod(this,"dispose")},findItemByValue:function(c){this.internalInitialize();var b=this.get_items();for(var a=0;a<b.get_count();a++){var d=this.$3_34(c,b.get_item(a));if(d){return d}}return null},findItemByText:function(c){this.internalInitialize();var b=this.get_items();for(var a=0;a<b.get_count();a++){var d=this.$3_35(b.get_item(a),c);if(d){return d}}return null},showAt:function(b,a){this.$3_30();if(!this.$3_17){this.$3_17=new C1.Web.UI.PopupBehavior(this.get_element(),1,0,0,null);this.$3_17.set_windowCollisionDetection(this.get_windowCollisionDetection());this.$3_17.add_setupPopupDone(Function.createDelegate(this,this._popupBehavior_SetupPopupDone));this.$3_17.add_showing(Function.createDelegate(this,this.$3_3C));this.$3_17.add_hiding(Function.createDelegate(this,this.$3_3E));this.$3_17.add_shown(Function.createDelegate(this,this.$3_3D));this.$3_17.add_hidden(Function.createDelegate(this,this.$3_3F))}this.$3_17.showAt(b)},hideInactiveItems:function(e){if(this.$3_16||this.$3_6&&!e){this.hide()}this.$3_16=false;this.$3_21=e;this.$3_2F();if(C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenuId!==""&&C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenuId!==this.get_id()){if(!C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenuId.indexOf(this.get_id())){return}}var b=null;if(e){b=e.get_owner()}if(!e||!b||!e.get_level()){for(var a=this._currentMenuPath.length-1;a>=0;a--){var f=this._currentMenuPath[a];this.$3_45(f);(f).hideSubMenu();this._currentMenuPath.splice(a,1)}return}for(var d=this._currentMenuPath.length-1;d>=0;d--){var c=this._currentMenuPath[d];if(c.get_items().contains(e)){return}else{if(b.UID===c.UID){return}this.$3_45(c);(c).hideSubMenu();this._currentMenuPath.splice(d,1)}}},hide:function(){this.$3_6=false;this.$3_16=false;if(this.$3_17){this.$3_17.hide()}},highlightMenuPath:function(b){this.$3_30();this.$3_2F();this.$3_16=false;if(this._currentMenuPath.length>0&&(this._currentMenuPath[this._currentMenuPath.length-1]).UID===b.UID){return}this.hideInactiveItems(b);var a=b;this._currentMenuPath=new Array(0);while(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){this._currentMenuPath.splice(0,0,a);this.$3_46(a);(a).displaySubMenu();a=(a).get_owner()}},getVisualStyleCssClassName:function(){var a=this._propertiesState.VisualStyle;if(!a||a===""){a="C1Menu_Default"}else{a="C1Menu_"+a}return a},onMouseOver:function(c){this.internalInitialize();if(!this.get_enabled()){return true}var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){if(this.$3_6&&(b.id===this.get_id())){this.$3_2F();this.$3_16=false}b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){this.$3_2F();if((a).get_enabled()){if(!this.get_clickToOpen()){(a).activateMenuItem(false)}a.onMouseOver(c)}this.raiseClientItemMouseOver(a,c)}}return true},onMouseOut:function(c){if(!this.get_enabled()){return true}var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){if(!this.get_clickToOpen()){this.$3_31(null)}b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){this.raiseClientItemMouseOut(a,c);a.onMouseOut(c)}}return true},onMouseDown:function(c){if(!this.get_enabled()){return C1.Web.UI.Utils.RawEvent.cancelBrowserResponse(c)}var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){this.raiseClientItemMouseDown(a,c);if((a).get_enabled()){if(this.get_clickToOpen()){this.highlightMenuPath(a)}if(a.get_navigateUrl()===""){a.get_propertiesState()["_postbackEvent_ItemClick"]=true}a.set_checked(!a.get_checked());a.onMouseDown(c);this.saveState()}}}return true},onMouseUp:function(c){if(!this.get_enabled()){return C1.Web.UI.Utils.RawEvent.cancelBrowserResponse(c)}var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){this.raiseClientItemMouseUp(a,c);a.onMouseUp(c)}}return true},onBlur:function(c){var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){a.removeItemCssClass("C1Focus");this.raiseClientItemBlur(a,c)}}return true},onClick:function(c){if(!this.get_enabled()){return C1.Web.UI.Utils.RawEvent.cancelBrowserResponse(c)}var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){this.raiseClientItemClick(a,c);a.onClick(c);this.saveState()}this.$3_31(null)}return true},onKeyDown:function(d){if(!this.get_enabled()){return true}var b=C1.Web.UI.Utils.RawEvent.getTarget(d);if(b){b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){var g=C1.Web.UI.Controls.C1Menu.C1Menu.$3_2A(a);var f=this.$3_2B();switch(d.keyCode){case 38:if(g===0){if(!a.focusParent()){a.toggleDisplaySubMenu()}}else{a.focusPrev()}break;case 39:if(g===0){a.focusNext()}else{if(!a.focusFirstChild()){if(f===0){var c=this.$3_29(a);c.focusNext()}}}break;case 40:if(g===0){a.displaySubMenu();a.focusFirstChild()}else{a.focusNext()}break;case 37:if(g===0){a.focusPrev()}else{if(!a.focusParent()){a.toggleDisplaySubMenu()}}break}}}return true},onFocus:function(c){if(!this.get_enabled()){return true}this.internalInitialize();var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){if(a.get_enabled()){a.addItemCssClass("C1Focus");if(this._currentMenuPath.length>0){var d=this._currentMenuPath[this._currentMenuPath.length-1];if(d.UID!==a.UID){this.highlightMenuPath(a)}}else{this.highlightMenuPath(a)}var f=a.get_owner();if(C1.Web.UI.Controls.C1Menu.C1Menu.isInstanceOfType(f)&&(f).get_scrollBehavior()){(f).get_scrollBehavior().updateButtonsState(10)}else{if(C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(f)&&(f).get_scrollBehavior()){(f).get_scrollBehavior().updateButtonsState(10)}}}else{return C1.Web.UI.Utils.RawEvent.cancelBrowserResponse(c)}this.raiseClientItemFocus(a,c)}}return true},onDocumentMouseDown:function(c){var b=C1.Web.UI.Utils.RawEvent.getTarget(c);if(b){b=this.retargetToParentIfNeeded(b);var a=C1.Web.UI.UIElement.all[(b)["__c1uid"]];if(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)&&a.get_menu().get_id()===this.get_id()){}else{if(this.get_contextMenu()){this.$3_16=true}this.$3_31(null)}}else{if(this.get_contextMenu()){this.$3_16=true}this.$3_31(null)}return true},onContextElementMouseUp:function(b){if(b.button===2){if(!this.$3_20){this.$3_20=Function.createDelegate(this,this.$3_42)}this.$3_1E=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$3_1E);var a=C1.Web.UI.Utils.RawEvent.getTarget(b);if(a){if((a)["__c1ctxtshown_flag"]){return true}(a)["__c1ctxtshown_flag"]=true}this.$3_14=C1.Web.UI.Utils.Measurement.getMousePointerPosition(b);this.$3_15=a;this.$3_1E=window.setTimeout(this.$3_20,this.get_expandDelay()+5)}return true},onHoverElementMouseOver:function(a){if(!this.$3_20){this.$3_20=Function.createDelegate(this,this.$3_42)}if(this.$3_6){this.$3_2F();this.$3_16=false;return true}this.$3_41();this.$3_40(true,(a)["target"],a);return true},onHoverElementMouseOut:function(a){this.$3_41();this.$3_1E=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$3_1E);this.$3_31(null);return true},retargetToParentIfNeeded:function(a){if(a.parentNode&&C1.Web.UI.Utils.Common.testIsNull((a)["__c1uid"])&&!C1.Web.UI.Utils.Common.testIsNull((a.parentNode)["__c1uid"])){a=a.parentNode}return a},$3_29:function(b){var a=b;while(a){if(a.get_owner()&&C1.Web.UI.Controls.C1Menu.C1Menu.isInstanceOfType(a.get_owner())){return a}a=a.get_owner()}return null},$3_2B:function(){if(C1.Web.UI.Utils.Common.testIsNull(this.$3_2)){this.$3_2=C1.Web.UI.Controls.C1Menu.C1Menu.$3_2C(this.scrollContainer)}return this.$3_2},$3_2D:function(c){this.$3_2=c;var b=this.scrollContainer.childNodes;for(var a=0;a<b.length;a++){if(b[a].tagName==="UL"){C1.Web.UI.FlowPanel.setFlowPanelOrientation(b[a],c,this.get_flowRight());break}}this.$3_2E()},$3_2E:function(){var b=this.getVisualStyleCssClassName();var a="";if(b!==""){if(this.get_contextMenu()){if(a!==""){a+=" "}a+=b+"-C1Context"}if(this.$3_2===0){if(a!==""){a+=" "}a+=b+"-C1Horizontal"}else{if(this.$3_2===1){if(a!==""){a+=" "}a+=b+"-C1Vertical"}}}var d=""+this.get_element().className+"";var c=new RegExp("\\s*"+b+"-*\\S*(-C1Horizontal|-C1Vertical)");this.get_element().className=d.replace(c,"");Sys.UI.DomElement.addCssClass(this.get_element(),a)},$3_2F:function(){this.$3_1D=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$3_1D)},$3_30:function(){if(C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu){if(C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu.get_id()!==this.get_id()){if(!this.get_id().indexOf(C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu.get_id())){}else{if(C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu.get_contextMenu()){C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu.hide()}C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu.$3_31(null)}}}C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu=this;C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenuId=this.get_id()},$3_31:function(a){this.$3_21=a;if(!this.$3_1F){this.$3_1F=Function.createDelegate(this,this.$3_32)}this.$3_2F();if(a){this.$3_16=false}this.$3_1D=window.setTimeout(this.$3_1F,this.get_collapseDelay()+5)},$3_32:function(){this.hideInactiveItems(this.$3_21)},hideSubMenu:function(){this.hideInactiveItems(null)},invalidate:function(){C1.Web.UI.Controls.C1Menu.C1Menu.callBaseMethod(this,"invalidate");this.internalInitialize();if(!this.$3_19){this.$3_19=document.createElement("div");this.$3_19.style.width="0px";this.$3_19.style.height="0px";this.$3_19.style.overflow="hidden"}this.nestedGroupContainer.appendChild(this.$3_19);this.nestedGroupContainer.removeChild(this.$3_19);if(this.$3_1){if(Sys.Browser.agent!==Sys.Browser.Firefox&&Sys.Browser.agent!==Sys.Browser.InternetExplorer&&Sys.Browser.agent!==Sys.Browser.Opera){for(var a=0;a<4;a++){window.setInterval(Function.createDelegate(this,this.$3_33),500)}}this.$3_33()}},$3_33:function(){this.$3_1.invalidate()},initializeItems:function(){if(this.$3_18){return}this.$3_18=true;var b=this._propertiesState.Items;var a=this.get_items();if(b){for(var f=0;f<b.length;f++){var e=b[f];var d=$get(e.ClientID);if(d){var c=this.createInstance(d);c.assignPropertiesState(e);a.add(c);c.initialize()}else{throw Error.create("(CE101205)Child UIElement with Client ID "+e.ClientID+" can not be initialized. DOMElement not found.")}}}},get_items:function(){this.internalInitialize();return this.$3_1A},get_owner:function(){return null},createInstance:function(a){return new C1.Web.UI.Controls.C1Menu.C1MenuItem(a)},$3_34:function(d,c){if(c.get_value()===d){return c}var b=c.get_items();for(var a=0;a<b.get_count();a++){var e=this.$3_34(d,b.get_item(a));if(e){return e}}return null},$3_35:function(d,c){if(d.get_text()===c){return d}var b=d.get_items();for(var a=0;a<b.get_count();a++){var e=this.$3_35(b.get_item(a),c);if(e){return e}}return null},internalInitialize:function(){if(this.$3_3){return}this.$3_3=true;if(this.nestedGroupContainer){var b=this.nestedGroupContainer.childNodes;for(var a=0;a<b.length;a++){if(b[a].tagName==="DIV"){if(b[a].className.indexOf("C1ScrollContainer")!==-1){this.scrollContainer=b[a];break}}}}this.$3_3B(this.get_element(),false);this.$3_F=Function.createDelegate(this,this.onDocumentMouseDown);C1.Web.UI.Utils.RawEvent.addHandler(window.document,"mousedown",this.$3_F);this.initializeItems();this.$3_36()},$3_36:function(){var a=this.get_scrollBehavior();a=null;this.$3_28(new Sys.EventArgs())},$3_37:function(){this.$3_39();if(!this.get_contextMenu()){return}this.$3_4=true;if(!this.$3_11){this.$3_11=Function.createDelegate(this,this.onContextElementMouseUp)}var a=this.get_contextElementID();this.$3_1B=null;if(a&&a!==""){if(a==="document"){this.$3_1B=window.document}else{this.$3_1B=$get(a)}}if(this.$3_1B){C1.Web.UI.Utils.RawEvent.addHandler(this.$3_1B,"mouseup",this.$3_11);this.$3_10=Function.createDelegate(this,this.$3_43);(this.$3_1B)["oncontextmenu"]=this.$3_10}},$3_38:function(){this.$3_3A();if(!this.get_contextMenu()){return}this.$3_5=true;if(!this.$3_12){this.$3_12=Function.createDelegate(this,this.onHoverElementMouseOver)}if(!this.$3_13){this.$3_13=Function.createDelegate(this,this.onHoverElementMouseOut)}var a=this.get_hoverElementID();if(a&&a!==""){this.$3_1C=$get(a)}if(this.$3_1C){C1.Web.UI.Utils.RawEvent.addHandler(this.$3_1C,"mouseover",this.$3_12);C1.Web.UI.Utils.RawEvent.addHandler(this.$3_1C,"mouseout",this.$3_13)}},$3_39:function(){if(!this.$3_4){return}this.$3_4=false;if(this.$3_1B){try{if(!C1.Web.UI.Utils.Common.testIsNull(this.$3_15)&&!C1.Web.UI.Utils.Common.testIsNull((this.$3_15)["__c1ctxtshown_flag"])){(this.$3_15)["__c1ctxtshown_flag"]=null}C1.Web.UI.Utils.RawEvent.removeHandler(this.$3_1B,"mouseup",this.$3_11)}catch(a){}}this.$3_1B=null;this.$3_11=null},$3_3A:function(){if(!this.$3_5){return}this.$3_5=false;if(this.$3_1C){try{C1.Web.UI.Utils.RawEvent.removeHandler(this.$3_1C,"mouseover",this.$3_12);C1.Web.UI.Utils.RawEvent.removeHandler(this.$3_1C,"mouseout",this.$3_13)}catch(a){}}this.$3_1C=null;this.$3_12=null;this.$3_13=null},$3_3B:function(b,a){if(!this.$3_8){this.$3_8=Function.createDelegate(this,this.onMouseOut);this.$3_9=Function.createDelegate(this,this.onMouseDown);this.$3_A=Function.createDelegate(this,this.onMouseUp);this.$3_B=Function.createDelegate(this,this.onClick);this.$3_C=Function.createDelegate(this,this.onKeyDown);this.$3_E=Function.createDelegate(this,this.onBlur)}if(a){if(!this.$3_7){this.$3_7=Function.createDelegate(this,this.onMouseOver);this.$3_D=Function.createDelegate(this,this.onFocus)}C1.Web.UI.Utils.RawEvent.addHandler(b,"mouseover",this.$3_7);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){C1.Web.UI.Utils.RawEvent.addHandler(b,"focusin",this.$3_D)}else{C1.Web.UI.Utils.RawEvent.addHandler(b,"focus",this.$3_D)}}C1.Web.UI.Utils.RawEvent.addHandler(b,"mouseout",this.$3_8);C1.Web.UI.Utils.RawEvent.addHandler(b,"mousedown",this.$3_9);C1.Web.UI.Utils.RawEvent.addHandler(b,"mouseup",this.$3_A);C1.Web.UI.Utils.RawEvent.addHandler(b,"click",this.$3_B);C1.Web.UI.Utils.RawEvent.addHandler(b,"keydown",this.$3_C);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){C1.Web.UI.Utils.RawEvent.addHandler(b,"focusout",this.$3_E)}else{C1.Web.UI.Utils.RawEvent.addHandler(b,"blur",this.$3_E)}},_popupBehavior_SetupPopupDone:function(a,b){this.$3_22=C1.Web.UI.Behavior.AnimationEffects.createAnimationByType(this.get_expandAnimation(),this.nestedGroupContainer,this.get_expandDuration(),this.get_expandEasing(),null,null,false,false,true,true);if(this.$3_22){this.$3_17.set_showAnimation(this.$3_22)}},$3_3C:function(b,a){this.$3_24(new Sys.EventArgs())},$3_3D:function(b,a){this.$3_25(new Sys.EventArgs())},$3_3E:function(b,a){this.$3_26(new Sys.EventArgs());this.$3_23=C1.Web.UI.Behavior.AnimationEffects.createAnimationByType(this.get_collapseAnimation(),this.nestedGroupContainer,this.get_collapseDuration(),this.get_collapseEasing(),null,null,false,false,true,false);if(this.$3_23){this.$3_17.set_hideAnimation(this.$3_23)}},$3_3F:function(b,a){this.$3_27(new Sys.EventArgs())},$3_40:function(c,b,a){this.$3_6=c;if(b){if((b)["__c1ctxtshown_flag"]){return}(b)["__c1ctxtshown_flag"]=true}this.$3_14=C1.Web.UI.Utils.Measurement.getMousePointerPosition(a);this.$3_15=b;this.$3_1E=window.setTimeout(this.$3_20,this.get_expandDelay()+5)},$3_41:function(){this.$3_1E=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$3_1E);if(!this.$3_17||!this.$3_17.get_visible()){this.$3_6=false;if(!C1.Web.UI.Utils.Common.testIsNull(this.$3_15)&&!C1.Web.UI.Utils.Common.testIsNull((this.$3_15)["__c1ctxtshown_flag"])){(this.$3_15)["__c1ctxtshown_flag"]=null}}},$3_42:function(){if(this.$3_15){(this.$3_15)["__c1ctxtshown_flag"]=null}this.showAt(this.$3_14,this.$3_15)},$3_43:function(){return false},$3_44:function(c){var b=c.CssStyle;var a=this.getVisualStyleCssClassName();if(!C1.Web.UI.Utils.Common.testIsNull(b.TopButtonCssClass)){c.TopButtonCssClass=b.TopButtonCssClass}else{c.TopButtonCssClass=a+"_ScrollButtonTop"}if(!C1.Web.UI.Utils.Common.testIsNull(b.TopButtonActiveCssClass)){c.TopButtonActiveCssClass=b.TopButtonActiveCssClass}else{c.TopButtonActiveCssClass=a+"_ScrollButtonActiveTop"}if(!C1.Web.UI.Utils.Common.testIsNull(b.TopButtonDisabledCssClass)){c.TopButtonDisabledCssClass=b.TopButtonDisabledCssClass}else{c.TopButtonDisabledCssClass=a+"_ScrollButtonDisabledTop"}if(!C1.Web.UI.Utils.Common.testIsNull(b.RightButtonCssClass)){c.RightButtonCssClass=b.RightButtonCssClass}else{c.RightButtonCssClass=a+"_ScrollButtonRight"}if(!C1.Web.UI.Utils.Common.testIsNull(b.RightButtonActiveCssClass)){c.RightButtonActiveCssClass=b.RightButtonActiveCssClass}else{c.RightButtonActiveCssClass=a+"_ScrollButtonActiveRight"}if(!C1.Web.UI.Utils.Common.testIsNull(b.RightButtonDisabledCssClass)){c.RightButtonDisabledCssClass=b.RightButtonDisabledCssClass}else{c.RightButtonDisabledCssClass=a+"_ScrollButtonDisabledRight"}if(!C1.Web.UI.Utils.Common.testIsNull(b.BottomButtonCssClass)){c.BottomButtonCssClass=b.BottomButtonCssClass}else{c.BottomButtonCssClass=a+"_ScrollButtonBottom"}if(!C1.Web.UI.Utils.Common.testIsNull(b.BottomButtonActiveCssClass)){c.BottomButtonActiveCssClass=b.BottomButtonActiveCssClass}else{c.BottomButtonActiveCssClass=a+"_ScrollButtonActiveBottom"}if(!C1.Web.UI.Utils.Common.testIsNull(b.BottomButtonDisabledCssClass)){c.BottomButtonDisabledCssClass=b.BottomButtonDisabledCssClass}else{c.BottomButtonDisabledCssClass=a+"_ScrollButtonDisabledBottom"}if(!C1.Web.UI.Utils.Common.testIsNull(b.LeftButtonCssClass)){c.LeftButtonCssClass=b.LeftButtonCssClass}else{c.LeftButtonCssClass=a+"_ScrollButtonLeft"}if(!C1.Web.UI.Utils.Common.testIsNull(b.LeftButtonActiveCssClass)){c.LeftButtonActiveCssClass=b.LeftButtonActiveCssClass}else{c.LeftButtonActiveCssClass=a+"_ScrollButtonActiveLeft"}if(!C1.Web.UI.Utils.Common.testIsNull(b.LeftButtonDisabledCssClass)){c.LeftButtonDisabledCssClass=b.LeftButtonDisabledCssClass}else{c.LeftButtonDisabledCssClass=a+"_ScrollButtonDisabledLeft"}},$3_45:function(a){if(!a.get_enabled()||a.get_header()||a.get_separator()||a.get_group()){return}a.removeItemCssClass("C1Opened");if(a.hasMenuItems()){a.addItemCssClass("C1Closed")}},$3_46:function(a){if(!a.get_enabled()||a.get_header()||a.get_separator()||a.get_group()){return}a.removeItemCssClass("C1Closed");if(a.hasMenuItems()){a.addItemCssClass("C1Opened")}},raiseClientItemFocus:function(d,c){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemFocus)){var a=this._propertiesState.OnClientItemFocus;var e=(((window)[a]));if(e){e(d,c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemFocus");if(b){b(d,c)}},raiseClientItemBlur:function(d,c){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemBlur)){var a=this._propertiesState.OnClientItemBlur;var e=(((window)[a]));if(e){e(d,c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemBlur");if(b){b(d,c)}},raiseClientItemMouseOver:function(d,c){if(d.isSelectableItem()){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemMouseOver)){var a=this._propertiesState.OnClientItemMouseOver;var e=(((window)[a]));if(e){e(d,c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemMouseOver");if(b){b(d,c)}}},raiseClientItemMouseOut:function(d,c){if(d.isSelectableItem()){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemMouseOut)){var a=this._propertiesState.OnClientItemMouseOut;var e=(((window)[a]));if(e){e(d,c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemMouseOut");if(b){b(d,c)}}},raiseClientItemMouseDown:function(d,c){if(d.isSelectableItem()){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemMouseDown)){var a=this._propertiesState.OnClientItemMouseDown;var e=(((window)[a]));if(e){e(d,c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemMouseDown");if(b){b(d,c)}}},raiseClientItemMouseUp:function(d,c){if(d.isSelectableItem()){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemMouseUp)){var a=this._propertiesState.OnClientItemMouseUp;var e=(((window)[a]));if(e){e(d,c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemMouseUp");if(b){b(d,c)}}},raiseClientItemClick:function(d,c){if(d.isSelectableItem()){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemClick)){var a=this._propertiesState.OnClientItemClick;var e=(((window)[a]));if(e){e(d,c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemClick");if(b){b(d,c)}}},$3_47:function(c){if(c.isSelectableItem()){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemChecked)){var a=this._propertiesState.OnClientItemChecked;var d=(((window)[a]));if(d){d(c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemChecked");if(b){b(c)}}},$3_48:function(c){if(!C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.OnClientItemUnChecked)){var a=this._propertiesState.OnClientItemUnChecked;var d=(((window)[a]));if(d){d(c)}}var b=this.get_events().getHandler(this.get_id()+"_ItemUnChecked");if(b){b(c)}}};C1.Web.UI.Controls.C1Menu.C1MenuBase=function(a){C1.Web.UI.Controls.C1Menu.C1MenuBase.initializeBase(this,[a])};C1.Web.UI.Controls.C1Menu.C1MenuBase.$3_0=function(c){var b=c.childNodes;for(var a=0;a<b.length;a++){if(b[a].className&&(Sys.UI.DomElement.containsCssClass(b[a],"C1SubMenu")||Sys.UI.DomElement.containsCssClass(b[a],"C1SubGroup"))){return b[a]}}return null};C1.Web.UI.Controls.C1Menu.C1MenuItem=function(a){C1.Web.UI.Controls.C1Menu.C1MenuItem.initializeBase(this,[a])};C1.Web.UI.Controls.C1Menu.C1MenuItem.prototype={$2_1:false,$2_2:false,$2_3:0,$2_4:0,_PopupBehavior:null,$2_5:false,_internalInitialized:false,get_firstSibling:function(){if(this.get_owner()){return this.get_owner().get_items().get_item(0)}return null},get_lastSibling:function(){if(this.get_owner()&&this.get_owner().get_items().get_count()-2>=this.get_index()){return this.get_owner().get_items().get_item(this.get_index()+1)}return null},get_nextSibling:function(){if(this.get_owner()&&this.get_owner().get_items().get_count()-2>=this.get_index()){return this.get_owner().get_items().get_item(this.get_index()+1)}return null},get_prevSibling:function(){if(this.get_owner()&&this.get_index()>0){return this.get_owner().get_items().get_item(this.get_index()-1)}return null},get_items:function(){this.internalInitialize();return C1.Web.UI.Controls.C1Menu.C1MenuItem.callBaseMethod(this,"get_items")},get_subMenuExpandDirection:function(){return((C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.SubMenuExpandDirection))?0:this._propertiesState.SubMenuExpandDirection)},set_subMenuExpandDirection:function(a){this._propertiesState.SubMenuExpandDirection=a;this.$2_0("SubMenuExpandDirection",a);return a},get_nestedGroupWidth:function(){return((C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.NestedGroupWidth))?"":this._propertiesState.NestedGroupWidth)},set_nestedGroupWidth:function(a){this._propertiesState.NestedGroupWidth=a;this.$2_6();this.$2_0("NestedGroupWidth",a);return a},get_nestedGroupHeight:function(){return((C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.NestedGroupHeight))?"":this._propertiesState.NestedGroupHeight)},set_nestedGroupHeight:function(a){this._propertiesState.NestedGroupHeight=a;this.$2_6();this.$2_0("NestedGroupHeight",a);return a},$2_6:function(){var b=this.get_nestedGroupWidth();var a=this.get_nestedGroupHeight();if(this.nestedGroupContainer){this.nestedGroupContainer.style.width=b}if(this.scrollContainer){this.scrollContainer.style.width=b}if(this.nestedGroupContainer){this.nestedGroupContainer.style.height=a}if(this.scrollContainer){this.scrollContainer.style.height=a}if(b!==""||a!==""){}},get_separator:function(){return(!this._propertiesState.Separator)?false:this._propertiesState.Separator},set_separator:function(a){this._propertiesState.Separator=a;return a},get_header:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.Header))?false:this._propertiesState.Header},set_header:function(a){this._propertiesState.Header=a;return a},get_group:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.Group))?false:this._propertiesState.Group},set_group:function(a){this._propertiesState.Group=a;return a},get_headerType:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.HeaderType))?3:this._propertiesState.HeaderType},set_headerType:function(a){this._propertiesState.HeaderType=a;this.$2_0("HeaderType",a);return a},get_navigateUrl:function(){return(!this._propertiesState.NavigateUrl)?"":this._propertiesState.NavigateUrl},set_navigateUrl:function(a){this._propertiesState.NavigateUrl=a;this.$2_0("NavigateUrl",a);return a},get_target:function(){return this._propertiesState.Target},set_target:function(a){this._propertiesState.Target=a;this.$2_0("Target",a);return a},get_value:function(){return(this._propertiesState.Value)},set_value:function(a){this._propertiesState.Value=a;this.$2_0("Value",a);return a},get_toolTip:function(){return this._propertiesState.ToolTip},set_toolTip:function(a){this._propertiesState.ToolTip=a;this.element.title=a;this.$2_0("ToolTip",a);return a},get_mouseOverImageUrl:function(){return((C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.MouseOverImageUrl))?"":this._propertiesState.MouseOverImageUrl)},set_mouseOverImageUrl:function(a){this._propertiesState.MouseOverImageUrl=a;this.$2_0("MouseOverImageUrl",a);return a},$2_7:null,get_menu:function(){if(this.$2_7){return this.$2_7}var a=this.get_owner();while(a&&a.get_owner()){a=a.get_owner()}this.$2_7=a;return a},get_expandAnimation:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ExpandAnimation)){return this.get_menu().get_expandAnimation()}else{return this._propertiesState.ExpandAnimation}},set_expandAnimation:function(a){this._propertiesState.ExpandAnimation=a;return a},get_expandDuration:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ExpandDuration)){return this.get_menu().get_expandDuration()}else{return this._propertiesState.ExpandDuration}},set_expandDuration:function(a){if(a<1){return}this._propertiesState.ExpandDuration=a;return a},get_expandDelay:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ExpandDelay)){return this.get_menu().get_expandDelay()}else{return this._propertiesState.ExpandDelay}},set_expandDelay:function(a){if(a<0){return}this._propertiesState.ExpandDelay=a;return a},get_collapseAnimation:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.CollapseAnimation)){return this.get_menu().get_collapseAnimation()}else{return this._propertiesState.CollapseAnimation}},set_collapseAnimation:function(a){this._propertiesState.CollapseAnimation=a;return a},get_collapseDuration:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.CollapseDuration)){return this.get_menu().get_collapseDuration()}else{return this._propertiesState.CollapseDuration}},set_collapseDuration:function(a){if(a<1){return}this._propertiesState.CollapseDuration=a;return a},get_collapseDelay:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.CollapseDelay)){return this.get_menu().get_collapseDelay()}else{return this._propertiesState.CollapseDelay}},set_collapseDelay:function(a){if(a<0){return}this._propertiesState.CollapseDelay=a;return a},get_expandEasing:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ExpandEasing)){return this.get_menu().get_expandEasing()}else{return this._propertiesState.ExpandEasing}},set_expandEasing:function(a){this._propertiesState.ExpandEasing=a;return a},get_collapseEasing:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.CollapseEasing)){return this.get_menu().get_collapseEasing()}else{return this._propertiesState.CollapseEasing}},set_collapseEasing:function(a){this._propertiesState.CollapseEasing=a;return a},internalInitialize:function(){this.initialize();if(this._internalInitialized){return}this._internalInitialized=true;this.initializeItems()},initialize:function(){if(this.$2_5){return}this.$2_5=true;C1.Web.UI.Controls.C1Menu.C1MenuItem.callBaseMethod(this,"initialize");this.nestedGroupContainer=C1.Web.UI.Controls.C1Menu.C1MenuBase.$3_0(this.element);if(this.nestedGroupContainer){var f=this.nestedGroupContainer.childNodes;for(var e=0;e<f.length;e++){if(f[e].tagName==="DIV"){if(f[e].className.indexOf("C1ScrollContainer")!==-1){this.scrollContainer=f[e];(this.scrollContainer)["__c1uid"]=this.UID;(this.scrollContainer.getElementsByTagName("ul")[0])["__c1uid"]=this.UID;break}}}}else{}var b=this.get_enabled();var a=this.element.childNodes;for(var d=0;d<a.length;d++){if(a[d].tagName){if(!this.menuItemElement){this.menuItemElement=a[d]}if(!b){a[d].disabled=true}this.$2_8(a[d],b)}}if(this.get_group()){this.initializeItems();var c=this.get_owner();if(C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(c)){(c).add_shown(Function.createDelegate(this,this.parentScrollBehaviorInitialized))}if(C1.Web.UI.Controls.C1Menu.C1Menu.isInstanceOfType(c)){(c).add_scrollBehaviorInit(Function.createDelegate(this,this.parentScrollBehaviorInitialized))}}},$2_8:function(d,c){if(d.tagName){if(!c){d.disabled=true}(d)["__c1uid"]=this.UID;var b=""+d.className+"";if(b.indexOf("C1TextNode")!==-1){this.textElement=d}if(d.tagName==="IMG"){if(b.indexOf("C1LeftImage")!==-1||b.indexOf("C1RightImage")!==-1){this.imgElement=d}}if(b.indexOf("C1SubMenu")!==-1||b.indexOf("C1SubGroup")!==-1){return}var a=d.childNodes;for(var e=0;e<a.length;e++){if(a[e].tagName){this.$2_8(a[e],c)}}}},$2_9:function(d,c){if(d.tagName){d.disabled=!c;var b=""+d.className+"";if(b.indexOf("C1SubMenu")!==-1||b.indexOf("C1SubGroup")!==-1){return}var a=d.childNodes;for(var e=0;e<a.length;e++){if(a[e].tagName){this.$2_9(a[e],c)}}}},parentScrollBehaviorInitialized:function(a,b){this.$2_A()},initializeItems:function(){if(this.$2_1){return}this.$2_1=true;C1.Web.UI.Controls.C1Menu.C1MenuItem.callBaseMethod(this,"initializeItems")},$2_A:function(){var a=this.get_scrollBehavior();if(a){a.invalidate()}a=null},get_scrollBehavior:function(){if(!this.$2_B&&this.nestedGroupContainer&&this.scrollContainer){var a=this._propertiesState.ScrollSettings;if(C1.Web.UI.Utils.Common.testIsNull(a)||C1.Web.UI.Utils.Common.testIsNull(a.ScrollMode)||a.ScrollMode===1){return null}this.$2_B=new C1.Web.UI.DOMScrollBehavior(this.scrollContainer);this.$2_B.buttonsMarkerHash={__c1uid:this.UID};this.get_menu().$3_44(a);this.$2_B.assignPropertiesUsingHash(a);this.$2_B.initialize()}return this.$2_B},$2_B:null,createInstance:function(a){return new C1.Web.UI.Controls.C1Menu.C1MenuItem(a)},$2_C:false,displaySubMenu:function(){this.$2_19=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$2_19);this.internalInitialize();if(this.$2_2||this.get_group()){return}this.$2_2=true;if(this.nestedGroupContainer){this.$2_D();var a=this.get_expandDelay();if(a>0){this.$2_18=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$2_18);this.$2_18=window.setTimeout(Function.createDelegate(this,this.$2_1A),a)}else{this.$2_1A()}}},$2_D:function(){if(!this.$2_C){var b=false;var a=this.get_owner();while(a&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)&&(a).get_group()){if(!b){b=this.$2_F((a))}a=a.get_owner()}if(a){if(C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){if(!b){b=this.$2_F((a))}if(b){this.nestedGroupContainer.parentNode.removeChild(this.nestedGroupContainer);(a).nestedGroupContainer.appendChild(this.nestedGroupContainer)}}else{if(C1.Web.UI.Controls.C1Menu.C1Menu.isInstanceOfType(a)){if(!b){b=this.$2_E((a))}if(b){this.nestedGroupContainer.parentNode.removeChild(this.nestedGroupContainer);(a).nestedGroupContainer.appendChild(this.nestedGroupContainer)}}}}this.$2_C=true}},$2_E:function(b){var a=(b.scrollContainer)?b.scrollContainer.style.overflow:"";if(a==="auto"||a==="hidden"){return true}return false},$2_F:function(b){var a=(b.scrollContainer)?b.scrollContainer.style.overflow:"";if(a==="auto"||a==="hidden"){return true}return false},hideSubMenu:function(){this.$2_18=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$2_18);if(!this.$2_2){return}this.$2_2=false;if(this._PopupBehavior){var a=this.get_collapseDelay();if(a>0){this.$2_19=C1.Web.UI.Utils.Common.clearPendingTimeout(this.$2_19);this.$2_19=window.setTimeout(Function.createDelegate(this,this.$2_1B),a)}else{this.$2_1B()}}},$2_10:0,get_popupBehavior:function(){var b=C1.Web.UI.Controls.C1Menu.C1Menu.$3_2A(this);var a=9;if(!this.get_subMenuExpandDirection()){if(!b){a=9}else{a=6}}else{a=this.get_subMenuExpandDirection()}if(this._PopupBehavior){if(this._PopupBehavior.get_positionMode()!==a){this._PopupBehavior.set_positionMode(a)}}this.$2_10=b;if(!this._PopupBehavior){var c=this.get_menu();this._PopupBehavior=new C1.Web.UI.PopupBehavior(this.nestedGroupContainer,a,0,0,this.element);this._PopupBehavior.set_windowCollisionDetection(c.get_windowCollisionDetection());this._PopupBehavior.add_setupPopupDone(Function.createDelegate(this,this._PopupBehavior_SetupPopupDone));this._PopupBehavior.add_showing(Function.createDelegate(this,this._PopupBehavior_Showing));this._PopupBehavior.add_hiding(Function.createDelegate(this,this._PopupBehavior_Hiding));this._PopupBehavior.add_shown(Function.createDelegate(this,this.$2_1C));this._PopupBehavior.add_hidden(Function.createDelegate(this,this.popupBehavior_Hidden))}return this._PopupBehavior},_expandAnimation:null,_collapseAnimation:null,toggleDisplaySubMenu:function(){if(this.$2_2){this.hideSubMenu()}else{this.displaySubMenu()}},nestedGroupContainer:null,scrollContainer:null,get_flowRight:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.FlowRight))?false:this._propertiesState.FlowRight},set_flowRight:function(a){this._propertiesState.FlowRight=a;return a},get_checked:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.Checked))?false:this._propertiesState.Checked},set_checked:function(a){if(this.get_checked()!==a){this._propertiesState.Checked=a;if(a){if(this.get_enabled()&&!this.get_separator()&&!this.get_header()&&!this.get_group()){this.addItemCssClass("C1Checked");this.get_menu().$3_47(this)}}else{if(this.get_enabled()&&!this.get_separator()&&!this.get_header()&&!this.get_group()){this.removeItemCssClass("C1Checked");this.get_menu().$3_48(this)}}this.$2_0("Checked",a)}return a},get_displayVisible:function(){return((C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.DisplayVisible))?true:this._propertiesState.DisplayVisible)},set_displayVisible:function(a){this._propertiesState.DisplayVisible=a;C1.Web.UI.Utils.Common.setVisible(this.element,a);this.$2_0("DisplayVisible",a);return a},get_accessKey:function(){return this._propertiesState.AccessKey},set_accessKey:function(a){this._propertiesState.AccessKey=a;this.$2_0("AccessKey",a);return a},get_nestedGroupOrientation:function(){this.internalInitialize();if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.NestedGroupOrientation)){var a=C1.Web.UI.Controls.C1Menu.C1Menu.$3_2C(this.scrollContainer);if(a===1){return 1}else{return 2}}return this._propertiesState.NestedGroupOrientation},set_nestedGroupOrientation:function(a){this.internalInitialize();if(a===2){this.$2_11(0)}else{if(a===1){this.$2_11(1)}}this._propertiesState.NestedGroupOrientation=a;this.$2_0("NestedGroupOrientation",a);return a},$2_11:function(c){if(!this.nestedGroupContainer){return}var b=this.scrollContainer.childNodes;for(var a=0;a<b.length;a++){if(b[a].tagName==="UL"){C1.Web.UI.FlowPanel.setFlowPanelOrientation(b[a],c,this.get_flowRight());break}}this.$2_12(c)},$2_12:function(d){var b=((this.get_group())?"C1SubGroup":"C1SubMenu");var a=b;if(!d){a+="-C1Horizontal"}else{if(d===1){a+="-C1Vertical"}}var e=""+this.nestedGroupContainer.className+"";var c=new RegExp("\\s*(C1SubGroup|C1SubMenu)-*\\S*(-C1Horizontal|-C1Vertical)");this.nestedGroupContainer.className=e.replace(c,"");Sys.UI.DomElement.addCssClass(this.nestedGroupContainer,a)},get_enabled:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.Enabled))?true:this._propertiesState.Enabled},set_enabled:function(c){if(this._propertiesState.Enabled!==c){this._propertiesState.Enabled=c;var b=c;this.element.disabled=!b;var a=this.element.childNodes;for(var d=0;d<a.length;d++){if(a[d].tagName){a[d].disabled=!b;this.$2_9(a[d],b)}}this.$2_0("Enabled",c);this.get_menu().saveState()}return c},get_level:function(){return this.calculateCurrentLevel()},calculateCurrentLevel:function(){if(this._owner&&C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(this._owner)){return(this._owner).calculateCurrentLevel()+(((this._owner).get_group())?0:1)}else{return 0}},add_hidden:function(a){this.events.addHandler("hidden",a)},remove_hidden:function(a){this.events.removeHandler("hidden",a)},add_hiding:function(a){this.events.addHandler("hiding",a)},remove_hiding:function(a){this.events.removeHandler("hiding",a)},add_showing:function(a){this.events.addHandler("showing",a)},remove_showing:function(a){this.events.removeHandler("showing",a)},add_shown:function(a){this.events.addHandler("shown",a)},remove_shown:function(a){this.events.removeHandler("shown",a)},$2_13:function(b){var a=this.events.getHandler("hidden");if(a){a(this,b)}},$2_14:function(b){var a=this.events.getHandler("showing");if(a){a(this,b)}},$2_15:function(b){var a=this.events.getHandler("shown");if(a){a(this,b)}},$2_16:function(b){var a=this.events.getHandler("hiding");if(a){a(this,b)}},addItemCssClass:function(b){var a=this.menuItemElement.className;if(!a){a=""}if(a.indexOf(b)===-1){a=a+((a==="")?"":" ")+b;this.menuItemElement.className=a}},removeItemCssClass:function(c){var b=this.menuItemElement.className;if(!b){b=""}if(b.indexOf(c)!==-1){var a=new RegExp(c,"g");b=b.replace(a,"");this.menuItemElement.className=b}},getPrevFocusableItem:function(){var b=this.get_owner().get_items();var a=this.get_index()-1;var e=b.get_length();while(a>=0){var d=b.get_item(a);if(d.get_enabled()&&!d.get_separator()&&!d.get_header()&&!d.get_group()){return d}a--}a=e-1;while(a>=0){var c=b.get_item(a);if(c.get_enabled()&&!c.get_separator()&&!c.get_header()&&!c.get_group()){return c}a--}return this},$2_17:function(){var b=this.get_owner().get_items();var a=this.get_index()+1;var e=b.get_length();while(a<e){var d=b.get_item(a);if(d.get_enabled()&&!d.get_separator()&&!d.get_header()&&!d.get_group()){return d}a++}a=0;while(a<e){var c=b.get_item(a);if(c.get_enabled()&&!c.get_separator()&&!c.get_header()&&!c.get_group()){return c}a++}return this},getFirstChildFocusableItem:function(){var b=this.get_items();var a=0;var d=b.get_length();while(a<d){var c=b.get_item(a);if(c.get_enabled()&&!c.get_separator()&&!c.get_header()&&!c.get_group()){return c}a++}return null},activateMenuItem:function(b){this.internalInitialize();if(this.get_enabled()){this.get_menu().highlightMenuPath(this);if(b){try{this.menuItemElement.focus()}catch(a){}}}},focusParent:function(){var a=this.get_owner();if(a){if(C1.Web.UI.Controls.C1Menu.C1MenuItem.isInstanceOfType(a)){(a).activateMenuItem(true);return true}}return false},focusPrev:function(){var a=this.getPrevFocusableItem();a.activateMenuItem(true)},focusNext:function(){var a=this.$2_17();a.activateMenuItem(true)},focusFirstChild:function(){var a=this.getFirstChildFocusableItem();if(a){a.activateMenuItem(true);return true}return false},onMouseOver:function(a){if(this.get_enabled()&&!this.get_separator()&&!this.get_header()&&!this.get_group()){this.addItemCssClass("C1Hover");if(this.imgElement&&this.get_imageUrl()!==""){if(this.get_mouseOverImageUrl()!==""){this.imgElement.src=this.get_mouseOverImageUrl()}}}},onMouseOut:function(a){if(this.get_enabled()&&!this.get_separator()&&!this.get_header()&&!this.get_group()){this.removeItemCssClass("C1Hover");this.removeItemCssClass("C1Active");if(this.imgElement&&this.get_imageUrl()!==""){this.imgElement.src=this.get_imageUrl()}}},onMouseDown:function(a){if(this.isSelectableItem()){this.addItemCssClass("C1Active")}},onMouseUp:function(a){if(this.get_enabled()&&!this.get_separator()&&!this.get_header()&&!this.get_group()){this.removeItemCssClass("C1Active")}},onClick:function(a){},$2_18:null,$2_19:null,$2_1A:function(){this.get_popupBehavior().show()},$2_1B:function(){this.get_popupBehavior().hide()},_PopupBehavior_SetupPopupDone:function(a,b){this.$2_4=this.get_expandAnimation();this._expandAnimation=C1.Web.UI.Behavior.AnimationEffects.createAnimationByType(this.$2_4,this.nestedGroupContainer,this.get_expandDuration(),this.get_expandEasing(),null,null,false,false,true,true);if(this._expandAnimation){this._PopupBehavior.set_showAnimation(this._expandAnimation)}},_PopupBehavior_Showing:function(a,b){this.$2_14(new Sys.EventArgs())},$2_1C:function(b,a){if(this.get_items().get_count()>0){this.removeItemCssClass("C1Closed");this.addItemCssClass("C1Opened")}this.$2_A();this.$2_15(new Sys.EventArgs())},_PopupBehavior_Hiding:function(a,b){this.$2_16(new Sys.EventArgs());this.$2_3=this.get_collapseAnimation();this._collapseAnimation=C1.Web.UI.Behavior.AnimationEffects.createAnimationByType(this.$2_3,this.nestedGroupContainer,this.get_collapseDuration(),this.get_collapseEasing(),null,null,false,false,true,false);if(this._collapseAnimation){this._PopupBehavior.set_hideAnimation(this._collapseAnimation)}},popupBehavior_Hidden:function(a,b){if(this.get_items().get_count()>0){this.removeItemCssClass("C1Opened");this.addItemCssClass("C1Closed")}this.$2_13(new Sys.EventArgs())},hasMenuItems:function(){return(this.get_items().get_count()>0)},isSelectableItem:function(){return(!this.get_group()&&!this.get_separator()&&!this.get_header()&&this.get_enabled())}};C1.Web.UI.Controls.C1Menu.C1MenuItemBase=function(a){C1.Web.UI.Controls.C1Menu.C1MenuItemBase.initializeBase(this,[a]);this.events=new Sys.EventHandlerList()};C1.Web.UI.Controls.C1Menu.C1MenuItemBase.prototype={menuItemElement:null,textElement:null,imgElement:null,events:null,get_text:function(){if(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.Text)){var b=this.textElement.innerHTML;try{var a=new RegExp("<([A-Z][A-Z0-9]*)[^>]*>(.*?)</\\1>|</*([A-Z][A-Z0-9]*)[^>]*>","gi");b=b.replace(a,"")}catch(c){}this._propertiesState.Text=b}return(this._propertiesState.Text)},set_text:function(b){this._propertiesState.Text=b;if(this.textElement){var a="";if(this.get_imageUrl()!==""&&!this.get_imagePosition()){a+="<IMG src="+this.get_imageUrl()+' class="C1LeftImage" align="middle">'}a+=b;if(this.get_imageUrl()!==""&&this.get_imagePosition()===1){a+="<IMG src="+this.get_imageUrl()+' class="C1RightImage" align="middle">'}this.textElement.innerHTML=a}this.$2_0("Text",b);return b},$2_0:function(b,a){this.get_propertiesState()["_postbackEvent_PropertyChanged_"+b]=a},get_imagePosition:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ImagePosition))?0:this._propertiesState.ImagePosition},set_imagePosition:function(a){this._propertiesState.ImagePosition=a;this.$2_0("ImagePosition",a);return a},get_imageUrl:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.ImageUrl))?"":(this._propertiesState.ImageUrl)},set_imageUrl:function(a){this._propertiesState.ImageUrl=a;this.$2_0("ImageUrl",a);return a},get_disabledImageUrl:function(){return(C1.Web.UI.Utils.Common.testIsNull(this._propertiesState.DisabledImageUrl))?"":this._propertiesState.DisabledImageUrl},set_disabledImageUrl:function(a){this._propertiesState.DisabledImageUrl=a;this.$2_0("DisabledImageUrl",a);return a}};C1.Web.UI.Controls.C1Menu.C1MenuBase.registerClass("C1.Web.UI.Controls.C1Menu.C1MenuBase",C1.Web.UI.C1ThemeableControlBase);C1.Web.UI.Controls.C1Menu.C1Menu.registerClass("C1.Web.UI.Controls.C1Menu.C1Menu",C1.Web.UI.Controls.C1Menu.C1MenuBase,C1.Web.UI.SerializablePrimitives.IC1ItemsOwner);C1.Web.UI.Controls.C1Menu.C1MenuItemBase.registerClass("C1.Web.UI.Controls.C1Menu.C1MenuItemBase",C1.Web.UI.SerializablePrimitives.C1Item,C1.Web.UI.SerializablePrimitives.IC1ItemsOwner);C1.Web.UI.Controls.C1Menu.C1MenuItem.registerClass("C1.Web.UI.Controls.C1Menu.C1MenuItem",C1.Web.UI.Controls.C1Menu.C1MenuItemBase);C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenu=null;C1.Web.UI.Controls.C1Menu.C1Menu.__CurrentActiveMenuId="";
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();