function browse(to)
{
	switch(to)
	{
		case -1:
			return false;
			break;
		case 0:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=-1&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=0&orderorder=0&search=menu';
			break;
		case 1:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=-1&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=1&orderorder=0&search=menu';
			break;
		case 2:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=-1&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=2&orderorder=0&search=menu';
			break;
		case 3:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=-1&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=3&orderorder=0&search=menu';
			break;
		case 4:
			top.location.href='http://themes.gaiatools.com/pending/';
			break;
		case 5:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=0&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=1&orderorder=0&search=menu';
			break;
		case 6:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=1&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=1&orderorder=0&search=menu';
			break;
		case 7:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=2&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=1&orderorder=0&search=menu';
			break;
		case 8:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=3&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=1&orderorder=0&search=menu';
			break;
		case 9:
			top.location.href='http://themes.gaiatools.com/search/search/?keywords=&keywordopt=0&advanced=checkbox&category=4&featured=-1&ratingmin=0&ratingmax=5&shownoratings=checkbox&hearted=-1&public=1&screenshot=-1&base=-1&approved=1&order=1&orderorder=0&search=menu';
			break;
		case 10:
			top.location.href='http://themes.gaiatools.com/hearted/';
			break;
		case 11:
			top.location.href='http://themes.gaiatools.com/featured/';
			break;
		default:
			return false;
	}
}
// Thanks nate for this snippet.
function xmlhttp()
{
	var http=false;
	try
	{
		http=(window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
	}
	catch(e)
	{
		try
		{
			var MSxmlHttpRequest=new Array('Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP');
			var success=false;
			for (var i=0;i<MSxmlHttpRequest.length && !success;i++)
			{
				try
				{
					http=new ActiveXObject(MSxmlHttpRequest[i]);
					success=true;
				}
				catch(e)
				{
					/* empty */
				}
			}
		}
		catch(e)
		{
			http=false;
		}
	}
	if(!http)
	{
		if(confirm('You are using a browser that does not support XMLHttpRequests.\nPlease get a decent browser like Firefox. Download it at http://getfirefox.com/. Want to go there ?'))
		{
			top.location.href='http://www.spreadfirefox.com/?q=affiliates&id=78201&t=216';
		}
	}
	return http;
}
var tehtimeout2=15000; // 15 seconds.
var inprogress2='A request is alerady in progress. Please wait before it finishes or times out.';
function heart(id)
{
	var http=xmlhttp();
	http.open('get','/heart/?id='+id);
	http.onreadystatechange=function(){
		if(http.readyState==4)
		{
			eval(http.responseText);
		}
	};
	http.send(null);
	document.getElementById('heart'+id).innerHTML='<img src="/hearting.gif" alt="Please wait..." title="Please wait..." width="16" height="16"/>';
}
var dontload=false;
function toggleadvanced(status)
{
	if(status)
	{
		var sty='inline';
	}
	else
	{
		var sty='none';
	}
	for(var i=1;i<20;i++)
	{
		document.getElementById('advanced'+i).style.display=sty;
	}
}