﻿if(!Array.prototype.forEach){Array.prototype.forEach=function(fn,thisObject){for(var i=0,len=this.length;i<len;i++){fn.call(thisObject,this[i],i,this)}}};function hasClass(el,cls){return el.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'))}function addClass(el,cls){if(!this.hasClass(el,cls)){el.className+=" "+cls}}function removeClass(el,cls){if(hasClass(el,cls)){var reg=new RegExp('(\\s|^)'+cls+'(\\s|$)');el.className=el.className.replace(reg,' ')}}addDOMLoadEvent=(function(){var load_events=[],load_timer,script,done,exec,old_onload,init=function(){done=true;clearInterval(load_timer);while(exec=load_events.shift())exec();if(script)script.onreadystatechange=''};return function(func){if(done)return func();if(!load_events[0]){if(document.addEventListener)document.addEventListener("DOMContentLoaded",init,false);/*@cc_on@*//*@if(@_win32)document.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");script=document.getElementById("__ie_onload");script.onreadystatechange=function(){if(this.readyState=="complete")init()};/*@end@*/if(/WebKit/i.test(navigator.userAgent)){load_timer=setInterval(function(){if(/loaded|complete/.test(document.readyState))init()},10)}old_onload=window.onload;window.onload=function(){init();if(old_onload)old_onload()}}load_events.push(func)}})();function ToggleNodeStyle(node){if(node.Parent!=null){return}node.TreeView.Nodes.forEach(function(element,index,array){var el=document.getElementById(element.ClientID);removeClass(el,'activesection')});var el=document.getElementById(node.ClientID);if(node.Expanded){addClass(el,'activesection')}else{removeClass(el,'activesection')}}addDOMLoadEvent(function(){ctl00_ctl00_SiteNavTree.Nodes.forEach(function(node,index,array){var el=document.getElementById(node.ClientID);if(node.Expanded){addClass(el,'activesection')}else{removeClass(el,'activesection')}})});function HybridAccordionHandler(node,args){if(node.Parent==null){if(node.Expanded==false){node.Expand()}else{node.Collapse()}ToggleNodeStyle(node);return false}return true}