function toggleMenu(id) {
	closeInvalidOpenLists(id);
	
	var curEnt = $('li#menu' + id); 
	var curList = curEnt.children('ul');
	if (curList.size() == 1) {
		if (curEnt.children('ul').css('display') == 'none') {
			curEnt.children('span').children('span.arrow').text(getDownArrow());
			curList.slideDown("slow");
		}
		else {
			curEnt.children('span').children('span.arrow').text(getRightArrow());
			curList.slideUp("slow");
		}
	}
	return true;
}

function closeInvalidOpenLists(id) {
	$('li.parent').filter(function() {
		return ! $(this).find('li#menu' + id).size();
	}).filter(function() {
		return $(this).attr('id') != 'menu' + 	id;
	}).filter(function() {
		return $(this).children('ul').css('display') != 'none';
	}).each(function() {
		$(this).find('span.arrow').text(getRightArrow());
		$(this).children('ul').slideUp("slow");
	});
}

function getRightArrow() {
	return String.fromCharCode(9658);
}
function getDownArrow() {
	return String.fromCharCode(9660);
}

$(document).ready(function() {
	$("li.otherpath span.arrow").text(getRightArrow());
	$("li.otherpath ul").hide();
});      