function toggleMenu(id){

}

function loadState(id){
}

function getNextState(state, town){
	div_id = state;
	url = state;

	if (state.indexOf('/') > -1) {
		// this is an exit key for this dungeon, the incoming state is like next_town/start, so just seperate
		// that with an underscore.
		div_id = state.replace('/', "_");
		url = "/" + state;
	} else {
		// if it is not an exit key, we need to append the town to the div id
		if (town){
			div_id = town + "_" + div_id;
			url = "/" + town + "/" + state;
		}
	}
	
	$.get(url + '/', 
			function(data){ 
				$('#dungeon').prepend(data);
				$('#' + div_id).slideDown('fast');
			}
	);
	return false;
}