function LoadSidebarNav() {
	// http://dev.jqueryui.com/ticket/3613
	// jQuery UI Development & Planning Wiki, Accordion: 
	// http://jqueryui.pbwiki.com/Accordion
	$(function() { 
		var accordion = $("#sidebar-accordion");
		var index = $.cookie("sidebar-accordion");
		var active;
		if (index !== null) {
			active = accordion.find("h4:eq(" + index + ")");
		} else {
			active = 0
		}
		accordion.accordion({
			header: "h4",
			event: "click",
			active: active,
			change: function(event, ui) {
				var index = $(this).find("h4").index ( ui.newHeader[0] );
				$.cookie("sidebar-accordion", index, {
					path: "/"
				});
			},
			autoHeight: false
		});
	}); 
}

function ExpandDiv(inDiv, inAnchor){
	$(("#" + inDiv)).show();
}
function ShowDiv(inDiv){
	// find and show inDiv
	$(("#" + inDiv)).show();
	// show the element
	//document.getElementById(inDiv).style.display = 'block';
}
function HideDiv(inDiv){
	// find and hide inDiv
	$(("#" + inDiv)).hide();
	//document.getElementById(inDiv).style.display = 'none';
}
function GoToDiv(inDiv){
	document.getElementById(inDiv).style.display = 'block';
}

function toggleDiv(inDiv){
	try {
		$("div#"+inDiv).slideToggle('fast');	  
	}
	catch(e) {
		alert('error:' + e);
	}
	return false;	
}

function goTo(inDiv) {
	//alert('goTo(inDiv) called with: ' + inDiv);
	$(inDiv).show();
}

function ExpandAllClasses(inClassName) {
	$(inClassName).show();
}
function CollapseAllClasses(inClassName) {
	$(inClassName).hide();
}
