function showNav (whichDiv) {
	
	var d = $(whichDiv);

var dir = $('sidebar-dir');
var act = $('sidebar-act');
var writ = $('sidebar-writ');

var open;

(d.style.display != "none") ? open = 1 : open = 0;

(dir.style.display != "none") ? Effect.BlindUp(dir, {duration: .5} ) : null;

(act.style.display != "none") ? Effect.BlindUp(act, {duration: .5} ) : null;

(writ.style.display != "none") ? Effect.BlindUp(writ, {duration: .5} ) : null;


	if (d.style.display == "none" && open == 0) {
		Effect.BlindDown(whichDiv, {duration: .5} );
	}
	
	else {
		Effect.BlindUp(whichDiv, {duration: .5} );
	}


	if (d != 'caitlin-sub' && $('innerContent') && d.style.display == "none") {
		var loc = window.location.href;
		if (loc.match("caitlin")) {
			var url = "http://www.caitlinbrubacher.ca/" + whichDiv + ".html";
		}
		else { var url = "http://www.makingfacetheatre.ca/" + whichDiv + ".html";
		}
		
		
		var myAjax = new Ajax.Updater(
			{success: 'innerContent'}, 
			url, 
			{
				method: 'get', 
				onFailure: reportError
			});
	}

	return true;
}

function showTopNav (whichDiv) {
	
	var d = $(whichDiv);
	
	var csub = $('caitlin-sub');
	
	var open;
	
	(d.style.display != "none") ? open = 1 : open = 0;
	(csub.style.display != "none") ? Effect.BlindUp(csub, {duration: .5} ) : null;


	if (d.style.display == "none" && open == 0) {
		Effect.BlindDown(whichDiv, {duration: .5} );
	}
	
	else {
		Effect.BlindUp(whichDiv, {duration: .5} );
	}

	return true;
}



function reportError(request) {
	alert('Sorry. There was an error.');
}
