function goToCategory( cat )
{
	//If we are in categories.html, tell VizzlSearch.swf to load the correct categories
	
	function thisMovie( movieName ) {
		if (navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName];
		} else {
			return document[movieName];
		}
	}
	
	var url = document.URL;
	
	//Work out the position of the last slash. This varies between local and online files, and IE and Firefox.
	var lastSlash = url.lastIndexOf("\\");
	if ( lastSlash == -1 )
	{
		lastSlash = url.lastIndexOf("\/");
	}
	
	//Work out the name of this file.
	var thisPage = url.substring( lastSlash + 1, url.indexOf("\#") );
	//alert("this page:"+ thisPage);
	
	if ( thisPage == 'categories.html' )
	{
		//alert("contact vizzlsearch.swf");
		thisMovie("VizzlSearch").vizzlUpdateFragment( "category=" + cat );
	}
	else
	{
		//Otherwise, go to categories.html
		//alert("go to categories.html");
		var catURL = url.substring( 0, lastSlash );
		catURL = catURL + '/categories.html#category=' + cat;
		window.location = catURL;
	}
}