function toggleFilter(type, f)
{
	if (type != 'mob' && type != 'item')
		type = 'zone';

	if (f == 1)
	{
		nospells = !nospells;
	}
	else if (f == 2)
	{
		norecipes = !norecipes;
	}
	else if (f == 3)
	{
		nopages = !nopages;
	}

	var filterstr = '';
	var URL = '/eq2/' + type + '/' + escape(eval(type));

	if (nospells)
		filterstr += 'spells';
	if (norecipes)
		filterstr += 'recipes';
	if (nopages)
		filterstr += 'pages';

	if (filterstr != '')
		URL = URL + '/no' + filterstr + '/';

	document.location.href = URL;
}