﻿function ShowSubMenu(mnu){
    //hide currentMenu first:
    Sys.UI.DomElement.removeCssClass($get('menuitem'+hotMenuItem),'showsub');
    Sys.UI.DomElement.addCssClass($get('submenu'+hotMenuItem),'hidden');
    
    //now show the new current menu (and save as currentMenu)
    Sys.UI.DomElement.addCssClass($get('menuitem'+mnu),'showsub');
    Sys.UI.DomElement.removeCssClass($get('submenu'+mnu),'hidden');
    hotMenuItem = mnu;
}

function pageLoad(){
    //make default menu active based on the current page - use hotMenuItem as value;
    //Sys.UI.DomElement.addCssClass($get('menuitem'+hotMenuItem),'showsub');
    //Sys.UI.DomElement.removeCssClass($get('submenu'+hotMenuItem),'hidden');
    /*
    $(document).ready(function(){
        $(".hiddenNavSection").removeClass("hiddenNavSection");
    });
    */
    //Sys.UI.DomElement.addCssClass($get('navLoader'),'hidden');
     
}

function loadAccordion(hotMnu){
    jQuery().ready(function(){
		jQuery('#navigation').accordion({header: '.head', event: 'click'});
		var accordion = jQuery('#navigation');
	    
	    accordion.activate(hotMnu);
	    
	    $("#navLoader").addClass("hidden");  
	});
}

function popup(url,name,w,h) {
	newwindow=window.open(url,name,'height=' + h + ',width=' + w);
	if (window.focus) {newwindow.focus()}
	return false;
}

function toggleView(objSrc){
    Sys.UI.DomElement.toggleCssClass($get(objSrc),'hidden');
}
