Event.observe(window, 'load', SetSelectChange);

var URIParts = window.location.href.split('/');

function SetSelectChange()
{
	$('Category').onchange = SpiritChanged;
}

function SpiritChanged(evt)
{
	if ($('Category').value)
	{
		if (URIParts[4] == 'popup')
		{
			window.location.href = '/index.php/popup/' + URIParts[5] + '/' + URIParts[6] + '/' + $('Category').value + '/index.html';
		}
		else
		{
			window.location.href = '/index.php/' + URIParts[4] + '/' + URIParts[5] + '/' + $('Category').value + '/index.html';
		}
	}
}
