SlideDuration = 100;if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof (window.MNS.Box) == "undefined" || typeof (window.MNS.Box.Version) == null || window.MNS.Box.Version<1){window.MNS.Box={Version:1,GetOuterWidth:function(_1){return _1.offsetWidth;},GetOuterHeight:function(_2){return _2.offsetHeight;},SetOuterHeight:function(_3,_4){if(_4<=0 || _4 == ""){_3.style.height="";}else{_3.style.height=_4 + "px";var _5=_3.offsetHeight-_4;var _6=_4-_5;if(_6>0){_3.style.height=_6 + "px";}else{_3.style.height="";}}},SetOuterWidth:function(_7,_8){if(_8 <= 0 || _8 == ""){_7.style.width = "";}else{_7.style.width=_8+"px";var _9=_7.offsetWidth-_8;var _a=_8-_9;if(_a>0){_7.style.width=_a+"px";}else{_7.style.width="";}}},GetPropertyValue:function(_b,_c){var _d=this.GetStyle(_b);return this.GetStyleValues(_d,_c);},GetStyle:function(_e){if(document.defaultView && document.defaultView.getComputedStyle){return document.defaultView.getComputedStyle(_e,null);}else{if(_e.currentStyle){return _e.currentStyle;}else{return _e.style;}}}};};if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof (window.MNS.Browser) == "undefined" || typeof (window.MNS.Browser.Version) == null || window.MNS.Browser.Version<1){window.MNS.Browser={Version:1};window.MNS.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.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);};MNS.Browser.ParseBrowserInfo();};if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof (window.MNS.DomEventMixin) == "undefined" || typeof (window.MNS.DomEventMixin.Version) == null || window.MNS.DomEventMixin.Version<2){MNS.DomEventMixin={Version:2,Initialize:function(Target){Target.CreateEventHandler = this.CreateEventHandler;Target.AttachDomEvent = this.AttachDomEvent;Target.DetachDomEvent = this.DetachDomEvent;Target.DisposeDomEventHandlers = this.DisposeDomEventHandlers;Target._domEventHandlingEnabled = true;Target.EnableDomEventHandling = this.EnableDomEventHandling;Target.DisableDomEventHandling = this.DisableDomEventHandling;Target.RemoveHandlerRegister = this.RemoveHandlerRegister;Target.GetHandlerRegister = this.GetHandlerRegister;Target.AddHandlerRegister = this.AddHandlerRegister;Target.handlerRegisters = [];},EnableDomEventHandling:function(){this._domEventHandlingEnabled=true;},DisableDomEventHandling:function(){this._domEventHandlingEnabled=false;},CreateEventHandler:function(HandlerFunction,_3){var this_copy = this;return function(e){if(!this_copy._domEventHandlingEnabled && !_3){return false;}return this_copy[HandlerFunction](e || window.event);};},AttachDomEvent:function(TargetObject,EventName,HandlerFunction,bValue){var new_handler = this.CreateEventHandler(HandlerFunction,bValue);var handler_register = this.GetHandlerRegister(TargetObject,EventName,HandlerFunction);if(handler_register != null){this.DetachDomEvent(handler_register.Element,handler_register.EventName,HandlerFunction);}var new_register = {"Element":TargetObject,"EventName":EventName,"HandlerName":HandlerFunction,"Handler":new_handler};this.AddHandlerRegister(new_register);if(TargetObject.addEventListener){TargetObject.addEventListener(EventName,new_handler,false);}else{if(TargetObject.attachEvent){TargetObject.attachEvent("on" + EventName,new_handler);}}},DetachDomEvent:function(TargetObject,EventName,HandlerFunction){var _10 = null;var _11 = "";if(typeof HandlerFunction == "string"){_11 = HandlerFunction;_10 = this.GetHandlerRegister(TargetObject,EventName,_11);if(_10 == null){return;}HandlerFunction = _10.Handler;}if(!TargetObject){return;}if(TargetObject.removeEventListener){TargetObject.removeEventListener(EventName,HandlerFunction,false);}else{if(TargetObject.detachEvent){TargetObject.detachEvent("on"+EventName,HandlerFunction);}}if(_10 != null && _11 != ""){this.RemoveHandlerRegister(_10);_10=null;}},DisposeDomEventHandlers:function(){for(var i = 0; i < this.handlerRegisters.length; i++){var _13 = this.handlerRegisters[i];if(_13 != null){this.DetachDomEvent(_13.Element,_13.EventName,_13.Handler);}}this.handlerRegisters=[];},RemoveHandlerRegister:function(_14){try{var _15=_14.index;for(var i in _14){_14[i]=null;}this.handlerRegisters[_15]=null;}catch(e){}},GetHandlerRegister:function(_17,_18,_19){for(var i=0;i<this.handlerRegisters.length;i++){var _1b=this.handlerRegisters[i];if(_1b != null && _1b.Element == _17 && _1b.EventName == _18 && _1b.HandlerName == _19){return this.handlerRegisters[i];}}return null;},AddHandlerRegister:function(_1c){_1c.index=this.handlerRegisters.length;this.handlerRegisters[this.handlerRegisters.length]=_1c;}};MNS.DomEvent={};MNS.DomEvent.PreventDefault=function(e){if(!e){return true;}if(e.preventDefault){e.preventDefault();}e.returnValue=false;return false;};MNS.DomEvent.StopPropagation=function(e){if(!e){return;}if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble = true;}};MNS.DomEvent.GetTarget=function(e){if(!e){return null;}return e.target || e.srcElement;};MNS.DomEvent.GetRelatedTarget=function(e){if(!e){return null;}return e.relatedTarget || (e.type == "mouseout" ? e.toElement : e.fromElement);};MNS.DomEvent.GetKeyCode=function(e){if(!e){return 0;}return e.which || e.keyCode;};};if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof (window.MNS.Ease) == "undefined" || typeof (window.MNS.Ease.Version) == null || window.MNS.Ease.Version<1.1){MNS.Ease=function(_1,_2,_3,_4,_5,_6){this.Element=_1;if(_6){this.Overlay = new MNS.Overlay(_1);}this.OffsetX=_3;this.OffsetY=_4;this.Invert=false;var _7=this.Element.parentNode;this.ExpandConfig=this.MergeConfig(_2.ExpandAnimation);this.CollapseConfig=this.MergeConfig(_2.CollapseAnimation);this.Ticker=new MNS.Ticker(this);this.Listener=_5;this.SlideParent=false;};MNS.Ease.Version=1.1;MNS.Ease.Coef=0;MNS.Ease.prototype={SetSide:function(_8){this.InitialSide = _8.charAt(0).toUpperCase() + _8.substr(1,_8.length-1);this.Invert = false;if(_8 == "right"){_8="left";this.Invert=true;}if(_8 == "bottom"){_8="top";this.Invert=true;}this.Side=_8;this.Horizontal=_8 == "left";},MergeConfig:function(_9){if(!_9.Type){_9.Type = "Linear";}if(!_9.Duration){_9.Duration = SlideDuration;}return _9;},GetSide:function(){return this.InitialSide;},ShowElements:function(){this.Element.parentNode.style.display="block";this.Element.style.display="block";this.Element.parentNode.style.overflow="hidden";},Dispose:function(){this.Ticker.Stop();this.Element=null;if(this.Overlay){this.Overlay.Dispose();}},ResetState:function(_a){this.ShowElements();if(_a){var _b=(this.Horizontal?this.Element.offsetWidth:this.Element.offsetHeight);if(!this.Invert){_b=-_b;}this.SetPosition(_b);}this.InitialPosition=this.GetPosition();},UpdateContainerSize:function(){if(!this.Element.parentNode){return;}if(!this.Element.offsetWidth || !this.Element.offsetHeight){return;}if(this.Invert){if(this.Side == "left"){this.Element.parentNode.style.height=this.Element.offsetHeight+"px";}else{if(this.Side == "top"){this.Element.parentNode.style.width=this.Element.offsetWidth+"px";}}return;}var _c=0;var _d=0;if(this.Element.style.top != ""){_c=Math.max(parseInt(this.Element.style.top),0);}if(this.Element.style.left != ""){_d=Math.max(parseInt(this.Element.style.left),0);}if(this.SlideParent){_c=parseInt(this.Element.style.top);if(isNaN(_c)){_c=0;}}if(typeof (PMenuItem) != "undefined" && this.Listener instanceof PMenuItem){if(this.Element.parentNode.style.height != this.Element.offsetHeight+_c+"px"){this.Element.parentNode.style.height=Math.max(this.Element.offsetHeight+_c,0)+"px";}if(this.Element.parentNode.style.width != (this.Element.offsetWidth+_d)+"px"){this.Element.parentNode.style.width=Math.max(this.Element.offsetWidth+_d,0)+"px";}}else{if(this.Element.parentNode.offsetHeight != this.Element.offsetHeight+_c){this.Element.parentNode.style.height=Math.max(this.Element.offsetHeight+_c,0)+"px";}if(this.Element.parentNode.offsetWidth != (this.Element.offsetWidth+_d)){this.Element.parentNode.style.width=Math.max(this.Element.offsetWidth+_d,0)+"px";}}},GetSize:function(){return this.Horizontal?this.Element.offsetWidth:this.Element.offsetHeight;},GetPosition:function(){if(!this.Element.style[this.Side]){return 0;}return parseInt(this.Element.style[this.Side]);},SetPosition:function(_e){this.Element.style[this.Side]=_e+"px";},Out:function(){this.ResetState();this.Direction=-1;if(this.Invert){this.Delta=this.GetSize()-this.GetPosition();}else{this.Delta=this.GetPosition()-this.GetSize();}this.Start(this.CollapseConfig);},In:function(){this.ResetState(true);this.Direction=1;this.Delta=-this.GetPosition();this.Start(this.ExpandConfig);},Start:function(_f){if(_f.Type == "None"){this.UpdateContainerSize();this.Ticker.Stop();this.ChangePosition(this.InitialPosition+this.Delta);if(this.Overlay){this.Overlay.Update();}this.UpdateContainerSize();this.OnTickEnd();return;}this.Tween=_f.Type;this.Ticker.Configure(_f);this.Ticker.Start();this.UpdateContainerSize();},ChangePosition:function(_10){if(isNaN(_10)){return;}var _11,_12,_13;if(this.Invert){if(this.Horizontal){_11=this.Element.offsetWidth;_12="width";_13=this.OffsetX;}else{_11=this.Element.offsetHeight;_12="height";_13=this.OffsetY;}this.SetPosition(0);var _14=Math.max(1,_11-_10)+"px";this.Element.parentNode.style[_12]=_14;this.Element.parentNode.style[this.Side]=((_11-_10+_13)*-1)+"px";}else{this.Element.style[this.Side]=_10+"px";}},OnTick:function(_15){var _16 = Math.round(Penner[this.Tween](_15,this.InitialPosition,this.Delta,this.Ticker.Duration));if(_16 == this.InitialPosition+this.Delta){this.Ticker.Stop();return;}this.ChangePosition(_16);this.UpdateContainerSize();if(this.Overlay){this.Overlay.Update();}},OnTickEnd:function(){try{if(this.Direction == 0){return;}this.ChangePosition(this.InitialPosition+this.Delta);if(this.Overlay){this.Overlay.Update();}if(this.Direction>0){this.Element.parentNode.style.overflow="visible";if(this.Listener && this.Listener.OnExpandComplete){this.Listener.OnExpandComplete();}}else{this.Element.parentNode.style.display="none";if(this.Listener){this.Listener.OnCollapseComplete();}}this.Direction=0;}catch(e){}}};};var Penner={};Penner.Linear = function(t , b,c,d){return c * t / d+b;};;if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof (window.MNS.EventMixin) == "undefined" || typeof (window.MNS.EventMixin.Version) == null || window.MNS.EventMixin.Version<2){MNS.EventMixin={Version:2,Initialize:function(_1){_1._listeners={};_1._eventsEnabled=true;_1.AttachEvent=this.AttachEvent;_1.DetachEvent=this.DetachEvent;_1.RaiseEvent=this.RaiseEvent;_1.EnableEvents=this.EnableEvents;_1.DisableEvents=this.DisableEvents;_1.DisposeEventHandlers=this.DisposeEventHandlers;},DisableEvents:function(){this._eventsEnabled=false;},EnableEvents:function(){this._eventsEnabled=true;},AttachEvent:function(_2,_3){if(!this._listeners[_2]){this._listeners[_2]=[];}this._listeners[_2][this._listeners[_2].length]=(MNS.EventMixin.ResolveFunction(_3));},DetachEvent:function(_4,_5){var _6=this._listeners[_4];if(!_6){return false;}var _7=MNS.EventMixin.ResolveFunction(_5);for(var i=0;i<_6.length;i++){if(_7 == _6[i]){_6.splice(i,1);return true;}}return false;},DisposeEventHandlers:function(){for(var _9 in this._listeners){var _a=null;if(this._listeners.hasOwnProperty(_9)){_a=this._listeners[_9];for(var i=0;i<_a.length;i++){_a[i]=null;}_a=null;}}},ResolveFunction:function(_c){if(typeof (_c) == "function"){return _c;}else{if(typeof (window[_c]) == "function"){return window[_c];}else{return new Function("var Sender = arguments[0]; var Arguments = arguments[1];"+_c);}}},RaiseEvent:function(_d,_e){if(!this._eventsEnabled){return true;}var _f=true;if(this[_d]){var _10=MNS.EventMixin.ResolveFunction(this[_d])(this,_e);if(typeof (_10) == "undefined"){_10=true;}_f = _f && _10;}if(!this._listeners[_d]){return _f;}for(var i=0;i<this._listeners[_d].length;i++){var _12=this._listeners[_d][i];var _10=_12(this,_e);if(typeof (_10) == "undefined"){_10=true;}_f=_f && _10;}return _f;}};};if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof (window.MNS.Overlay) == "undefined" || typeof (window.MNS.Overlay.Version) == null || window.MNS.Overlay.Version<1.1){window.MNS.Overlay=function(_1){if(!this.SupportsOverlay()){return;}this.Element=_1;this.Shim=document.createElement("IFRAME");this.Shim.src="javascript:'';";this.Element.parentNode.insertBefore(this.Shim,this.Element);if(_1.style.zIndex>0){this.Shim.style.zIndex=_1.style.zIndex-1;}this.Shim.style.position="absolute";this.Shim.style.border="0px";this.Shim.frameBorder=0;this.Shim.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";this.Shim.disabled="disabled";};window.MNS.Overlay.Version=1.1;MNS.Overlay.prototype.SupportsOverlay=function(){return MNS.Browser.IsIE;};MNS.Overlay.prototype.Update=function(){if(!this.SupportsOverlay()){return;}this.Shim.style.top = this.ToUnit(this.Element.style.top);this.Shim.style.left = this.ToUnit(this.Element.style.left);this.Shim.style.width = this.Element.offsetWidth+"px";this.Shim.style.height = this.Element.offsetHeight+"px";};MNS.Overlay.prototype.ToUnit=function(_2){if(!_2){return "0px";}return parseInt(_2) + "px";};MNS.Overlay.prototype.Dispose=function(){if(!this.SupportsOverlay()){return;}if(this.Shim.parentNode){this.Shim.parentNode.removeChild(this.Shim);}this.Element=null;this.Shim=null;};};if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof window.MNS == "undefined"){window.MNS={};}MNS.ItemFlow = {Vertical:0,Horizontal:1};MNS.ExpandDirection = {Auto:0,Up:1,Down:2,Left:3,Right:4};MNS.ExpandDirectionPropertyName = {"1":"bottom","2":"top","3":"right","4":"left"};function PMenu(_6){this.DomElement=_6;this.ChildItemList = PMenu.GetFirstChildByTagName(this.DomElement,"ul");this.StateField=document.getElementById(_6.id+"_Hidden");this.Items=[];this.AllItems=[];this.OpenedItem=null;this.LastExpandedItem=null;this.ExpandAnimation={};this.CollapseAnimation={};this.ID=_6.id;this.Skin="Default";this.RightToLeft=false;this.EnableScreenBoundaryDetection=true;this.InUpdate=false;this.Initialized=false;this.State={};this.ItemState={};this.CausesValidation=true;this.Flow=MNS.ItemFlow.Horizontal;this.ClickToOpen=false;this.Enabled=true;this.EnableAutoScroll=false;this.Clicked=false;this.OriginalZIndex=this.DomElement.style.zIndex;this.CollapseDelay=500;this.ExpandDelay=150;this.Attributes={};MNS.EventMixin.Initialize(this);MNS.DomEventMixin.Initialize(this);}PMenu.Create=function(){var _7=arguments[0];var _8=window[_7];if(_8 != null && _8.Dispose){_8.Dispose();}var _9=document.getElementById(_7);return new this(_9);};PMenu.GetFirstChildByTagName=function(_d,_e){var _f=_d.getElementsByTagName(_e)[0];if(_f && _f.parentNode == _d){return _f;}return null;};PMenu.prototype.RenderInProgress=function(){return this.DomElement.offsetWidth == 0;};PMenu.prototype.Detach=function(e){if(!(MNS.Browser.IsIE) || document.readyState == "complete"){document.forms[0].insertBefore(this.DomElement,document.forms[0].firstChild);this.DomElement.style.position = "absolute";this.Detached = true;}};PMenu.prototype.Show=function(e){if(!this.IsContext){return;}if(!this.RaiseEvent("OnClientContextShowing")){return MNS.DomEvent.PreventDefault(e);}for(var i in MNS.ContextMenus){MNS.ContextMenus[i].Hide();}var x = this.MouseEventX(e);var y = this.MouseEventY(e);if(this.RightToLeft){this.ShowAt(x,y);return this.ShowAt(x - this.ChildItemList.offsetWidth,y);}return this.ShowAt(x,y);};PMenu.prototype.ShowAt=function(x,y){if(!this.IsContext){return;}if(!this.Detached){this.Detach();}this.ShownAsContext=true;this.Ease.ShowElements();this.Ease.UpdateContainerSize();if(!this.WidthFixed){this.WidthFixed=true;this.FixItemWidth(this);}this.Position(x,y);this.Ease.In();this.RaiseEvent("OnClientContextShown",null);return false;};PMenu.prototype.Position=function(x,y){var _19 = MNS.Screen.GetViewPortSize();x = Math.min(x,_19.width - this.DomElement.offsetWidth);y = Math.min(y,_19.height - this.DomElement.offsetHeight);if(isNaN(x)){x = 0;}if(isNaN(y)){y = 0;}this.DomElement.style.left = x + "px";this.DomElement.style.top = y + "px";};PMenu.prototype.MouseEventX=function(e){if(e.pageX){return e.pageX;}else{if(e.clientX){if(MNS.Browser.StandardsMode){return (e.clientX+document.documentElement.scrollLeft);}return (e.clientX+document.body.scrollLeft);}}};PMenu.prototype.MouseEventY=function(e){if(e.pageY){return e.pageY;}else{if(e.clientY){if(MNS.Browser.StandardsMode){return (e.clientY+document.documentElement.scrollTop);}return (e.clientY+document.body.scrollTop);}}};PMenu.prototype.EventSource=function(e){return MNS.DomEvent.GetTarget(e);};PMenu.prototype.Hide=function(){if(this.ShownAsContext){this.Ease.Out();this.ShownAsContext = false;this.RaiseEvent("OnClientContextHidden",null);}};PMenu.prototype.Initialize=function(){this.LoadConfiguration({});this.ItemData = [];this.CreateControlHierarchy(this,0);if(this.Flow == MNS.ItemFlow.Vertical){this.FixRootItemWidth();}this.AttachEventHandlers();this.Initialized = true;this.RaiseEvent("OnClientLoad",null);};PMenu.prototype.AttachEventHandlers=function(){var _1f = this;this.DomElement.RadShow = function(){if(_1f.Flow == MNS.ItemFlow.Vertical){_1f.FixRootItemWidth();}};this.AttachDomEvent(window,"unload","Dispose");if(!this.ClickToOpen){this.AttachDomEvent(document,"mouseout","MouseOutHandler");}if(this.ClickToOpen){this.AttachDomEvent(document,"click","CloseOpenedItems");}this.AttachDomEvent(window,"resize","RefreshPosition");};PMenu.prototype.RefreshPosition=function(e){this.DomElement.style.cssText=this.DomElement.style.cssText;};PMenu.prototype.MouseOutHandler=function(e){var _22 = MNS.DomEvent.GetRelatedTarget(e);if(!_22){var _23 = this;setTimeout(function(){_23.Close();},this.CollapseDelay);}};PMenu.prototype.CloseOpenedItems=function(e){var _25 = this.EventSource(e);if(!this.IsChildOf(this.DomElement,_25)){this.Close();}};PMenu.prototype.IsChildOf=function(_29,_2a){if(_2a == _29){return false;}while(_2a && (_2a != document.body)){if(_2a == _29){return true;}try{_2a=_2a.parentNode;}catch(e){return false;}}return false;};PMenu.prototype.Focus=function(){this.DomElement.focus();};PMenu.prototype.Dispose=function(){if(this.Disposed){return;}this.Disposed=true;for(var i=0;i<this.AllItems.length;i++){this.AllItems[i].Dispose();}if(this.Detached && this.DomElement){if(this.DomElement.parentNode){this.DomElement.parentNode.removeChild(this.DomElement);}}if(this.DomElement){this.DomElement.RadShow=null;}this.DomElement = null;this.ChildItemList = null;this.StateField = null;this.DisposeDomEventHandlers();if(this.IsContext && MNS.ContextMenus){MNS.ContextMenus[this.ID] = null;}};PMenu.prototype.CreateMenuItem=function(ParentMenu,ChildNode){var new_item = new PMenuItem(ChildNode);this.AddItemToParent(ParentMenu,new_item);return new_item;};PMenu.prototype.AddItemToParent=function(ParentMenu,NewItem){NewItem.Index = ParentMenu.Items.length;ParentMenu.Items[ParentMenu.Items.length] = NewItem;NewItem.GlobalIndex = this.AllItems.length;this.AllItems[this.AllItems.length] = NewItem;NewItem.Parent = ParentMenu;NewItem.Menu = this;};PMenu.prototype.CreateControlHierarchy=function(MenuControl,MenuLevel){MenuControl.Level = MenuLevel;var children = MenuControl.ChildItemList;if(!children){return;}for(var i = 0; i < children.childNodes.length; i++){var child = children.childNodes[i];if(child.nodeType == 3){continue;}var new_item = this.CreateMenuItem(MenuControl,child);new_item.Initialize();if(MenuLevel == 0){new_item.PostInitialize();}this.CreateControlHierarchy(new_item,MenuLevel + 1);}};PMenu.prototype.FixItemWidth=function(_45){var _46 = 0;var ul = _45.ChildItemList;var _48=null;for(var i=0;i<ul.childNodes.length;i++){var li=ul.childNodes[i];if(li.nodeType == 3){continue;}var _4b=PMenu.GetFirstChildByTagName(li,"a");if(!_4b){_4b=PMenu.GetFirstChildByTagName(li,"div");if(!_4b){continue;}}if(this.RightToLeft){var _4c=_4b.getElementsByTagName("img")[0];if(_4c){_4c.style.styleFloat="left";}}var _4d=MNS.Box.GetOuterWidth(_4b);if(isNaN(_4d)){continue;}if(_4d>_46){_46=_4d;_48=li;}if(this.RightToLeft){var _4c=_4b.getElementsByTagName("img")[0];if(_4c){_4c.style.styleFloat="right";}}}for(var i=0;i<ul.childNodes.length;i++){var li=ul.childNodes[i];if(li.nodeType == 3){continue;}if(MNS.Browser.IsOpera){li.style.cssFloat="none";}var a=PMenu.GetFirstChildByTagName(li,"a");if(a){var _4f=!PMenu.GetFirstChildByTagName(a,"span").firstChild;if(!MNS.Browser.IsIE || !_4f){if(a.style.display != "none"){MNS.Box.SetOuterWidth(a,_46);}}}else{li.style.width=_46+"px";}}if(MNS.Browser.IsSafari){if(_48){ul.style.width=_48.offsetWidth+"px";}}};PMenu.prototype.FixRootItemWidth=function(){var _50 = this;var _51 = function(){_50.FixItemWidth(_50);};if(this.RenderInProgress() || MNS.Browser.IsOpera || MNS.Browser.IsSafari){if(window.addEventListener){window.addEventListener("load",_51,false);}else{window.attachEvent("onload",_51);}}else{_51();}};PMenu.prototype.FixListWidth=function(_52){if(this.RightToLeft){this.FixItemWidth(_52);}var _53 = 0;var ul = _52.ChildItemList;for(var i = 0; i < ul.childNodes.length; i++){var _56 = ul.childNodes[i];if(_56.nodeType == 3){continue;}_53 += _56.offsetWidth;_56.style.clear = "none";}ul.style.width = _53 + "px";};PMenu.prototype.LoadConfiguration=function(MenuConfig){for(var ConfigItem in MenuConfig){this[ConfigItem] = MenuConfig[ConfigItem];}if(!this.DefaultGroupSettings){this.DefaultGroupSettings = {};}if(typeof this.DefaultGroupSettings.Flow == "undefined"){this.DefaultGroupSettings.Flow = MNS.ItemFlow.Vertical;}if(typeof this.DefaultGroupSettings.ExpandDirection == "undefined"){this.DefaultGroupSettings.ExpandDirection = MNS.ExpandDirection.Auto;}if(typeof this.DefaultGroupSettings.OffsetX == "undefined"){this.DefaultGroupSettings.OffsetX = 0;}if(typeof this.DefaultGroupSettings.OffsetY == "undefined"){this.DefaultGroupSettings.OffsetY = 0;}};PMenu.prototype.Close=function(Value){if(this.OpenedItem){this.OpenedItem.Close();}};PMenu.prototype.FindItemById=function(id){for(var i=0;i<this.AllItems.length;i++){if(this.AllItems[i].ID == id){return this.AllItems[i];}}return null;};PMenu.prototype.SetAttribute=function(_68,_69){this.Attributes[_68]=_69;};PMenu.prototype.GetAttribute=function(_6a){return this.Attributes[_6a];};PMenu.CreateChildItemContainer=function(_6b){var _6c=document.createElement("div");_6c.className="slide";_6b.DomElement.appendChild(_6c);var _6d=document.createElement("ul");if(_6b.Flow == MNS.ItemFlow.Horizontal){_6d.className="horizontal group level"+_6b.Level;}else{_6d.className="vertical group level"+_6b.Level;}_6c.appendChild(_6d);};PMenu.prototype.AddItem=function(_6e){var _6f=document.createElement("li");_6f.className="item last";var _70=document.createElement("a");_70.className="link";var _71=document.createElement("span");_71.className="text";_70.appendChild(_71);_6f.appendChild(_70);_6e.SetDomElement(_6f);var _72=this.Menu || this;if(_72 != this && this.Items.length == 0){PMenu.CreateChildItemContainer(this);this.InitializeDomElements();this.InitializeAnimation();}this.ChildItemList.appendChild(_6f);_72.AddItemToParent(this,_6e);_6e.Level=this.Level+1;var _73=_6e.Text;_6e.Text="";_6e.ID=this.ID+"_m"+(this.Items.length-1);_6e.Initialize();_6e.SetText(_73);if(this.Menu){_6e.ParentClientID=this.ID;}_70.href="#";if(this.Items.length>1){var _74=this.Items[this.Items.length-2].DomElement;_74.className=_74.className.replace(" last","");}};;function PMenuItem(ItemElement){if(ItemElement){this.SetDomElement(ItemElement);}else{this.ClientSide=true;}this.IsSeparator=false;this.AnimationContainer=null;this.OpenedItem=null;this.FocusedItem=null;this.Items=[];this.Attributes={};this.Index=-1;this.Level=-1;this.Parent=null;this.Menu=null;this.GroupSettings={};this.TimeoutPointer=null;this.Templated=false;this.NavigateAfterClick=true;this.FocusedCssClass="focused";this.ClickedCssClass="clicked";this.ExpandedCssClass="expanded";this.DisabledCssClass="disabled";this.CssClass="";this.State=MnuState.Closed;this.Focused=false;this.Clicked=false;this.Enabled=true;this.Initialized=false;}PMenuItem.prototype.SetDomElement=function(ItemElement){this.DomElement = ItemElement;this.LinkElement = PMenu.GetFirstChildByTagName(this.DomElement,"a");if(this.LinkElement == null){this.ID = this.DomElement.id;this.TextElement = PMenu.GetFirstChildByTagName(this.DomElement,"span");this.NavigateUrl = "";}else{this.ID = this.LinkElement.id;this.TextElement = PMenu.GetFirstChildByTagName(this.LinkElement,"span");this.NavigateUrl = this.LinkElement.href;if(this.NavigateUrl.charAt(this.NavigateUrl.length - 1) == "/"){this.NavigateUrl = "";}}};PMenuItem.prototype.PostInitializeItems=function(){for(var i=0;i<this.Items.length;i++){this.Items[i].PostInitialize();}};PMenuItem.prototype.SetText=function(_4){this.PostInitialize();this.TextElement.innerHTML=_4;this.Text=_4;};PMenuItem.prototype.SetNavigateUrl=function(_5){this.PostInitialize();this.LinkElement.setAttribute("href",_5);this.NavigateUrl=_5;};PMenuItem.prototype.SetValue=function(_6){this.PostInitialize();this.Value=_6;};PMenuItem.prototype.InitializeDomElements=function(){if(!this.Templated){this.AnimationContainer = PMenu.GetFirstChildByTagName(this.DomElement,"div");this.ImageElement = PMenu.GetFirstChildByTagName(this.LinkElement || this.DomElement,"img");if(this.ImageElement){this.ImageUrl = this.ImageElement.src;}}else{this.TextElement = PMenu.GetFirstChildByTagName(this.DomElement,"div");this.AnimationContainer = this.TextElement.nextSibling;}if(this.AnimationContainer){var ul = this.AnimationContainer.getElementsByTagName("ul")[0];this.ChildItemList = ul;}};PMenuItem.prototype.InitializeAnimation=function(){this.DetermineExpandDirection();if(!this.AnimationContainer){return;}this.Ease=new MNS.Ease(this.ScrollWrap || this.ChildItemList,this.Menu,this.GroupSettings.OffsetX,this.GroupSettings.OffsetY,this,true);var _8=this.GroupSettings.ExpandDirection;var _9=MNS.ExpandDirectionPropertyName[_8];this.Ease.SetSide(_9);this.TextElement.className="text expand"+this.Ease.GetSide();this.AnimationContainer.style.zIndex=this.GlobalIndex+10;this.ChildItemList.style.zIndex=this.GlobalIndex+10;};PMenuItem.prototype.Initialize=function(){MNS.DomEventMixin.Initialize(this);this.LoadConfiguration();this.InitializeDomElements();if(this.TextElement && this.TextElement.firstChild){this.Text = this.TextElement.firstChild.nodeValue;}this.OriginalZIndex = Math.max(this.DomElement.style.zIndex,this.Menu.OriginalZIndex);};PMenuItem.prototype.PostInitialize=function(){if(this.Initialized){return;}this.InitializeAnimation();this.AttachEventHandlers();this.RenderAccessKey();this.UpdateCssClass();this.Initialized = true;};PMenuItem.prototype.RenderAccessKey=function(){if(this.IsSeparator || this.Templated){return;}var _a = this.LinkElement.accessKey.toLowerCase();if(!_a){return;}var _b = this.TextElement.firstChild.nodeValue;var _c = _b.toLowerCase().indexOf(_a);if(_c == -1){return;}this.TextElement.innerHTML = _b.substr(0,_c) + "<u>" + _b.substr(_c,1) + "</u>" + _b.substr(_c + 1,_b.length);};PMenuItem.prototype.Dispose=function(){if(!this.Initialized){return;}this.DisposeDomEventHandlers();if(this.Ease){this.Ease.Dispose();}this.DomElement=null;this.LinkElement=null;this.AnimationContainer=null;};PMenuItem.prototype.Focus=function(){if(!this.CanFocus()){return;}this.PostInitializeItems();if(this.Parent.OpenedItem && this.Parent.OpenedItem != this){this.Parent.OpenedItem.Close();}if(this.Parent.State != MnuState.Open && this.Parent.Open){this.Parent.Open();}this.Parent.FocusedItem=this;if(!this.Focused && this.LinkElement){this.LinkElement.focus();}this.CancelMenuClose();this.UpdateCssClass();this.RaiseEvent("OnClientItemFocus");};PMenuItem.prototype.Hide=function(){if(this.LinkElement){this.LinkElement.style.display="none";}else{this.TextElement.style.display="none";}if(this.Parent.Flow == MNS.ItemFlow.Vertical){var _11=this.Parent.Items;for(var i=0;i<_11.length;i++){if(_11[i] != this){if(_11[i].LinkElement){_11[i].LinkElement.style.width="auto";}}}if(MNS.Browser.IsSafari){this.Parent.ChildItemList.style.width="auto";}this.Menu.WidthFixed=false;if(this.Parent.DomElement.offsetWidth>0){this.Menu.FixItemWidth(this.Parent);}}};PMenuItem.prototype.IsVisible=function(){if(!this.LinkElement){return this.TextElement.style.display != "none";}return this.LinkElement.style.display != "none";};PMenuItem.prototype.Show=function(){if(this.LinkElement){this.LinkElement.style.display="";}else{this.TextElement.style.display="";}if(this.Parent.Flow == MNS.ItemFlow.Vertical){this.Menu.WidthFixed=false;if(this.Parent.DomElement.offsetWidth>0){this.Menu.FixItemWidth(this.Parent);}}};PMenuItem.prototype.Blur=function(){if(this.IsSeparator){return;}if(this.Focused){this.LinkElement.blur();}this.Parent.FocusedItem=null;this.UpdateCssClass();this.RaiseEvent("OnClientItemBlur");};PMenuItem.prototype.Open=function(){this.PostInitializeItems();this.Menu.AboutToCollapse=false;if(this.Parent != this.Menu && this.Parent.State != MnuState.Open){this.Parent.Open();}this.Parent.OpenedItem=this;clearTimeout(this.TimeoutPointer);if(!this.AnimationContainer){return;}this.State=MnuState.Open;var _13=MNS.Screen.GetViewPortSize();this.ChildItemList.style.display="block";this.Ease.ShowElements();if(this.GroupSettings.Flow == MNS.ItemFlow.Vertical){this.Menu.FixItemWidth(this);}else{this.Menu.FixListWidth(this);}this.Ease.SetSide(this.GetEaseSide());this.Ease.UpdateContainerSize();this.PositionChildContainer(_13);this.Ease.In();this.UpdateCssClass();this.DomElement.style.zIndex=this.OriginalZIndex+1000;if(!MNS.Browser.IsNetscape){this.Menu.DomElement.style.zIndex=this.Menu.OriginalZIndex+1000;}this.CancelMenuClose();this.RaiseEvent("OnClientItemOpen");};PMenuItem.prototype.GetEaseSide=function(){var _14=this.GroupSettings.ExpandDirection;return MNS.ExpandDirectionPropertyName[_14];};PMenuItem.prototype.RaiseEvent=function(_15){return this.Menu.RaiseEvent(_15,{Item:this});};PMenuItem.prototype.UpdateCssClass=function(){if(this.IsSeparator || this.Templated){return;}var new_css_class = "link " + this.CssClass;if(this.Focused){new_css_class = new_css_class + " " + this.FocusedCssClass;}if(this.State == MnuState.Open){new_css_class = new_css_class + " " + this.ExpandedCssClass;}if(this.Clicked){new_css_class = new_css_class + " " + this.ClickedCssClass;}if(!this.Enabled){new_css_class = new_css_class + " " + this.DisabledCssClass;}this.LinkElement.className = new_css_class;};PMenuItem.prototype.Enable=function(){if(this.IsSeparator || this.Templated){return;}this.LinkElement.disabled="";if(this.ImageElement){this.ImageElement.disabled="";}this.Enabled=true;this.EnableDomEventHandling();this.UpdateCssClass();};PMenuItem.prototype.Close=function(){if(this.IsSeparator){return;}if(this.State == MnuState.Closed){return;}if(this.OpenedItem){this.OpenedItem.Close();}this.Parent.OpenedItem=null;clearTimeout(this.TimeoutPointer);if(!this.AnimationContainer){return;}this.State=MnuState.Closed;if(this.Level == 1){this.Menu.AboutToCollapse=true;}this.Ease.Out();this.UpdateCssClass();this.DomElement.style.zIndex=this.OriginalZIndex;if(!MNS.Browser.IsNetscape){if(this.Level == 1){this.Menu.DomElement.style.zIndex=this.Menu.OriginalZIndex;}}this.HideChildren();};PMenuItem.prototype.OnCollapseComplete=function(){this.RaiseEvent("OnClientItemClose");};PMenuItem.prototype.HideChildren=function(){for(var i=0;i<this.Items.length;i++){if(this.Items[i].AnimationContainer){this.Items[i].AnimationContainer.style.display="none";}}};PMenuItem.prototype.AttachEventHandlers=function(){this.AttachDomEvent(this.DomElement,"mouseover","MouseOverHandler");this.AttachDomEvent(this.DomElement,"mouseout","MouseOutHandler");if(this.IsSeparator || this.Templated){return;}this.AttachDomEvent(this.LinkElement,"click","ClickHandler",true);this.AttachDomEvent(this.LinkElement,"mouseout","HRefMouseOutHandler");this.AttachDomEvent(this.LinkElement,"mouseover","HRefMouseOverHandler");this.AttachDomEvent(this.LinkElement,"mousedown","MouseDownHandler");this.AttachDomEvent(this.LinkElement,"mouseup","MouseUpHandler");this.AttachDomEvent(this.LinkElement,"blur","BlurHandler");this.AttachDomEvent(this.LinkElement,"focus","FocusHandler");this.AttachDomEvent(this.LinkElement,"keydown","KeyDownHandler");};PMenuItem.prototype.MouseDownHandler=function(e){this.Clicked=true;this.UpdateCssClass();};PMenuItem.prototype.MouseUpHandler=function(e){this.Clicked=false;this.UpdateCssClass();};PMenuItem.prototype.HRefMouseOutHandler=function(e){var to=MNS.DomEvent.GetRelatedTarget(e);if(this.Menu.IsChildOf(this.LinkElement,to) || to == this.LinkElement){return;}this.Hovered=false;this.RaiseEvent("OnClientMouseOut");};PMenuItem.prototype.HRefMouseOverHandler=function(e){var _1e=MNS.DomEvent.GetRelatedTarget(e);if(this.Menu.IsChildOf(this.LinkElement,_1e) || this.LinkElement == _1e){return;}this.Hovered=true;this.RaiseEvent("OnClientMouseOver");};PMenuItem.prototype.KeyDownHandler=function(e){var _20={left:37,up:38,right:39,down:40,esc:27};var _21=MNS.DomEvent.GetKeyCode(e);if(_21 == _20.right){if(this.Menu.RightToLeft){this.HandleLeftArrow();}else{this.HandleRightArrow();}}else{if(_21 == _20.left){if(this.Menu.RightToLeft){this.HandleRightArrow();}else{this.HandleLeftArrow();}}else{if(_21 == _20.up){this.HandleUpArrow();}else{if(_21 == _20.down){this.HandleDownArrow();}else{if(_21 == _20.esc){if(this.Parent == this.Menu){this.Blur();}else{this.Parent.Close();this.Parent.Focus();}}else{return;}}}}}MNS.DomEvent.PreventDefault(e);};PMenuItem.prototype.FocusHandler=function(e){this.Focused=true;this.Focus();};PMenuItem.prototype.ScheduleMenuClose=function(_23){var _24=this.Menu;clearTimeout(this.Menu.CloseTimeout);this.Menu.CloseTimeout=setTimeout(function(){_24.Close();_24.Clicked=false;},_23);};PMenuItem.prototype.CancelMenuClose=function(){clearTimeout(this.Menu.CloseTimeout);};PMenuItem.prototype.BlurHandler=function(e){this.Focused=false;this.Blur();};PMenuItem.prototype.NavigatesToURL=function(){if(location.href+"#" == this.NavigateUrl || location.href == this.NavigateUrl){return false;}return (new RegExp("//")).test(this.LinkElement.href);};PMenuItem.prototype.Validate=function(){if(!this.Menu.CausesValidation || this.NavigatesToURL()){return true;}if(typeof (Page_ClientValidate) != "function"){return true;}return Page_ClientValidate(this.Menu.ValidationGroup);};PMenuItem.prototype.ClickHandler=function(e){if(!this.Enabled || this.NavigateUrl == ""){this.Blur();return MNS.DomEvent.PreventDefault(e);}if(!this.RaiseEvent("OnClientItemClicking")){return MNS.DomEvent.PreventDefault(e);}if(!this.Validate()){return MNS.DomEvent.PreventDefault(e);}var _27 = true;if(!this.Menu.ClickToOpen){_27 = true;}else{if(this.Level > 1){_27 = true;}else{if(!this.Menu.Clicked){this.Open();}else{this.Close();}this.Menu.Clicked = !this.Menu.Clicked;}}this.RaiseEvent("OnClientItemClicked");if(!this.NavigateAfterClick || !_27){MNS.DomEvent.PreventDefault(e);}};PMenuItem.prototype.MouseOverHandler=function(e){var _29 = MNS.DomEvent.GetRelatedTarget(e);if(this.Menu.IsChildOf(this.DomElement,_29) || this.DomElement == _29){return;}if(this.Menu.ClickToOpen && !this.Menu.Clicked){return;}if(this.State == MnuState.Open || this.State == MnuState.AboutToOpen){return;}this.Menu.LastOpenedItem = this;if(this.State == MnuState.AboutToClose){clearTimeout(this.TimeoutPointer);this.State = MnuState.Open;return;}if(this.Parent.OpenedItem){this.Parent.OpenedItem.Close();}this.Parent.OpenedItem = this;this.State = MnuState.AboutToOpen;var _2a = this;var _2b = function(){_2a.Open();};this.TimeoutPointer = setTimeout(_2b,this.Menu.ExpandDelay);};PMenuItem.prototype.MouseOutHandler=function(e){var to = MNS.DomEvent.GetRelatedTarget(e);if((!to) || this.Menu.IsChildOf(this.DomElement,to) || to == this.DomElement){return;}else{try{var _2e = to.parentNode;}catch(e){return;}}if(this.State == MnuState.Closed || this.State == MnuState.AboutToClose){return;}if(this.State == MnuState.AboutToOpen){clearTimeout(this.TimeoutPointer);this.State = MnuState.Closed;this.Parent.OpenedItem = null;return;}if(this.Menu.ClickToOpen){return;}this.State=MnuState.AboutToClose;var _2f = this;var _30 = function(){_2f.Close();};this.TimeoutPointer=setTimeout(_30,this.Menu.CollapseDelay);};PMenuItem.prototype.PositionChildContainer=function(_31){var top=0;var _33=0;var _34=this.GroupSettings.ExpandDirection;var _35=MNS.ExpandDirectionPropertyName[_34];var _36=this.DomElement;var _37=MNS.Box.GetOuterHeight(_36);var _38=MNS.Box.GetOuterWidth(_36);var _39=this.AnimationContainer;var _3a=MNS.Box.GetOuterHeight(_39);var _3b=MNS.Box.GetOuterWidth(_39);if(_34 == MNS.ExpandDirection.Down){top=_37;}else{if(_34 == MNS.ExpandDirection.Right){_33=_38;}}this.SetContainerPosition(_33,top);var _3c=MNS.Screen.GetElementPosition(_39);if(this.Menu.RightToLeft){_33 = _38 - _3b;}if(!this.Menu.EnableScreenBoundaryDetection){this.Ease.SetSide(_35);this.TextElement.className="text expand"+this.Ease.GetSide();return;}if(MNS.Screen.ElementOverflowsRight(_31,_39) && _34 == MNS.ExpandDirection.Right){_34 = MNS.ExpandDirection.Left;_35 = "right";_33 = 0;}else{if(_3c.x-_3b<0 && _34 == MNS.ExpandDirection.Left){_34=MNS.ExpandDirection.Right;_35="left";_33=_38;}else{if(_3c.y-_3a<0 && _34 == MNS.ExpandDirection.Up){_34=MNS.ExpandDirection.Down;_35="top";top=_37;}else{if(MNS.Screen.ElementOverflowsBottom(_31,_39) && _34 == MNS.ExpandDirection.Down){var _39 = MNS.Screen.GetElementPosition(this.DomElement);if(_39.y > this.AnimationContainer.offsetHeight){_34 = MNS.ExpandDirection.Up;_35 = "bottom";top = _37;}}}}}if(MNS.Screen.ElementOverflowsRight(_31,_39) && (_34 == MNS.ExpandDirection.Down || _34 == MNS.ExpandDirection.Up)){if(!this.Menu.RightToLeft){_33=_31.width-(_3c.x+_3b);}}else{if(MNS.Screen.ElementOverflowsBottom(_31,_39)){if(_34 == MNS.ExpandDirection.Left || _34 == MNS.ExpandDirection.Right){top=_31.height-(_3c.y+_3a);}}}this.SetContainerPosition(_33,top);this.Ease.SetSide(_35);this.TextElement.className="text expand"+this.Ease.GetSide();};PMenuItem.prototype.SetContainerPosition=function(_3d,top){var y=top+this.GroupSettings.OffsetY;this.AnimationContainer.style.top=y+"px";this.AnimationContainer.style.left=(_3d+this.GroupSettings.OffsetX)+"px";};PMenuItem.prototype.SetAttribute=function(_40,_41){this.PostInitialize();this.Attributes[_40]=_41;};PMenuItem.prototype.GetAttribute=function(_44){return this.Attributes[_44];};PMenuItem.prototype.DetermineExpandDirection=function(){if(this.GroupSettings.ExpandDirection != MNS.ExpandDirection.Auto){return;}if(this.Parent.Flow == MNS.ItemFlow.Vertical){if(this.Menu.RightToLeft){this.GroupSettings.ExpandDirection=MNS.ExpandDirection.Left;}else{this.GroupSettings.ExpandDirection=MNS.ExpandDirection.Right;}}else{this.GroupSettings.ExpandDirection=MNS.ExpandDirection.Down;}};PMenuItem.prototype.LoadConfiguration=function(){if(this.Menu.ItemData[this.ID]){for(var _45 in this.Menu.ItemData[this.ID]){this[_45] = this.Menu.ItemData[this.ID][_45];}}var _46 = this.Menu.DefaultGroupSettings;if(typeof this.GroupSettings.Flow == "undefined"){this.GroupSettings.Flow = _46.Flow;}this.Flow = this.GroupSettings.Flow;if(typeof this.GroupSettings.ExpandDirection == "undefined"){this.GroupSettings.ExpandDirection = _46.ExpandDirection;}if(typeof this.GroupSettings.OffsetX == "undefined"){this.GroupSettings.OffsetX = _46.OffsetX;}if(typeof this.GroupSettings.OffsetY == "undefined"){this.GroupSettings.OffsetY = _46.OffsetY;}};PMenuItem.prototype.HandleRightArrow=function(){if(this.Parent.Flow == MNS.ItemFlow.Horizontal){this.FocusNextItem();}else{if(this.Items.length && this.GroupSettings.ExpandDirection == MNS.ExpandDirection.Right){this.FocusFirstChild();}else{if(this.Parent.GroupSettings && this.Parent.GroupSettings.ExpandDirection == MNS.ExpandDirection.Left){this.Parent.Focus();}else{if(this.Menu.OpenedItem){this.Menu.OpenedItem.GetNextItem().Focus();}}}}};PMenuItem.prototype.HandleLeftArrow=function(){if(this.Parent.Flow == MNS.ItemFlow.Horizontal){this.FocusPreviousItem();}else{if(this.Items.length && this.GroupSettings.ExpandDirection == MNS.ExpandDirection.Left){this.FocusFirstChild();}else{if(this.Parent.GroupSettings && this.Parent.GroupSettings.ExpandDirection == MNS.ExpandDirection.Right){this.Parent.Focus();}else{if(this.Menu.OpenedItem){this.Menu.OpenedItem.GetPreviousItem().Focus();}}}}};PMenuItem.prototype.HandleUpArrow=function(){if(this.Parent.Flow == MNS.ItemFlow.Vertical){this.FocusPreviousItem();}else{this.FocusLastChild();}};PMenuItem.prototype.HandleDownArrow=function(){if(this.Parent.Flow == MNS.ItemFlow.Vertical){this.FocusNextItem();}else{this.FocusFirstChild();}};PMenuItem.prototype.GetNextItem=function(){if(this.Index == this.Parent.Items.length-1){return this.Parent.Items[0];}return this.Parent.Items[this.Index+1];};PMenuItem.prototype.GetPreviousItem=function(){if(this.Index == 0){return this.Parent.Items[this.Parent.Items.length-1];}return this.Parent.Items[this.Index-1];};PMenuItem.prototype.CanFocus=function(){return (!this.IsSeparator) && this.Enabled;};PMenuItem.prototype.FocusFirstChild=function(){if(!this.Items.length){return;}var _47=this.Items[0];while(!_47.CanFocus()){_47=_47.GetNextItem();if(_47 == this.Items[0]){return;}}_47.Focus();};PMenuItem.prototype.FocusLastChild=function(){if(!this.Items.length){return;}var _48=this.Items[this.Items.length-1];while(!_48.CanFocus()){_48=_48.GetPreviousItem();if(this.Items.length-1){return;}}_48.Focus();};PMenuItem.prototype.FocusNextItem=function(){var _49=this.GetNextItem();while(!_49.CanFocus()){_49=_49.GetNextItem();}_49.Focus();};PMenuItem.prototype.FocusPreviousItem=function(){var _4a=this.GetPreviousItem();while(!_4a.CanFocus()){_4a=_4a.GetPreviousItem();}_4a.Focus();};PMenuItem.prototype.AddItem=function(){this.Menu.AddItem.apply(this,arguments);this.Menu.FixItemWidth(this);};;function MnuState(){}MnuState={Closed:0,Open:1,AboutToClose:2,AboutToOpen:3};;if(typeof window.MNS == "undefined"){window.MNS={};}if(typeof (window.MNS.Screen) == "undefined" || typeof (window.MNS.Screen.Version) == null || window.MNS.Screen.Version<1.1){window.MNS.Screen={Version:1.1,GetViewPortSize:function(){var _1=0;var _2=0;var _3=document.body;if(MNS.Browser.StandardsMode && !MNS.Browser.IsSafari){_3=document.documentElement;}if(MNS.Browser.IsMozilla && document.compatMode != "CSS1Compat"){_3=document.body;}if(window.innerWidth){_1=window.innerWidth;_2=window.innerHeight;}else{_1=_3.clientWidth;_2=_3.clientHeight;}_1+=_3.scrollLeft;_2+=_3.scrollTop;return {width:_1-6,height:_2-6};},GetElementPosition:function(el){var _5=null;var _6={x:0,y:0};var _7;if(el.getBoundingClientRect){_7=el.getBoundingClientRect();var _8=document.documentElement.scrollTop || document.body.scrollTop;var _9=document.documentElement.scrollLeft || document.body.scrollLeft;_6.x=_7.left+_9-2;_6.y=_7.top+_8-2;return _6;}else{if(document.getBoxObjectFor){try{_7=document.getBoxObjectFor(el);_6.x=_7.x-2;_6.y=_7.y-2;}catch(e){}}else{_6.x=el.offsetLeft;_6.y=el.offsetTop;_5=el.offsetParent;if(_5 != el){while(_5){_6.x+=_5.offsetLeft;_6.y+=_5.offsetTop;_5=_5.offsetParent;}}}}if(window.opera){_5=el.offsetParent;while(_5 && _5.tagName != "BODY" && _5.tagName != "HTML"){_6.x-=_5.scrollLeft;_6.y-=_5.scrollTop;_5=_5.offsetParent;}}else{_5=el.parentNode;while(_5 && _5.tagName != "BODY" && _5.tagName != "HTML"){_6.x-=_5.scrollLeft;_6.y-=_5.scrollTop;_5=_5.parentNode;}}return _6;},ElementOverflowsTop:function(_a){return this.GetElementPosition(_a).y<0;},ElementOverflowsLeft:function(_b){return this.GetElementPosition(_b).x<0;},ElementOverflowsBottom:function(_c,_d){var _e=this.GetElementPosition(_d).y+MNS.Box.GetOuterHeight(_d);return _e>_c.height;},ElementOverflowsRight:function(_f,_10){var _11=this.GetElementPosition(_10).x+MNS.Box.GetOuterWidth(_10);return _11>_f.width;}};};if(typeof window.MNS == "undefined"){window.MNS={};}MNS.ScrollButtonsPosition={Left:0,Middle:1,Right:2};if(typeof window.MNS == "undefined"){window.MNS={};}MNS.Ticker=function(_1){this.Listener=_1;this.IntervalPointer=null;};MNS.Ticker.prototype={Configure:function(_2){this.Duration=_2.Duration;this.Interval=16;},Start:function(){clearInterval(this.IntervalPointer);this.TimeElapsed=0;var _3=this;var _4=function(){_3.Tick();};this.Tick();this.IntervalPointer=setInterval(_4,this.Interval);},Tick:function(){this.TimeElapsed += this.Interval;this.Listener.OnTick(this.TimeElapsed);if(this.TimeElapsed >= this.Duration){this.Stop();}},Stop:function(){if(this.IntervalPointer){this.Listener.OnTickEnd();clearInterval(this.IntervalPointer);this.IntervalPointer = null;}}};;function trace(msg) {var ele = document.getElementById("trace");ele.value = msg + "\n" + ele.value;}