if (typeof (closedtags)=='undefined')
{
	var closedtags;
}
if (typeof (colorfultags)=='undefined')
{
	var colorfultags;
}
function forumhottag_callback(data)
{
	var hottag_html = '';
	for (var i in data)
	{
	    if(typeof(data[i].tagname)!='undefined')
	    {	        
		    if (!in_array(data[i].tagid, closedtags))
		    {
    		
			    hottag_html += '<li><a href="tags.aspx?t=' + data[i].tagname + '&tagid=' + data[i].tagid + '" target="_blank"';
			    if (colorfultags && colorfultags[data[i].tagid])
			    {
				     hottag_html += ' style="color: #' + colorfultags[data[i].tagid].color + '"';
			    }
			    hottag_html +='>' + data[i].tagname + '</a><em>(' + data[i].fcount + ')</em></li>';
		    }	
		}	
	}
	$('forumhottags').innerHTML = hottag_html;
}

function spacehottag_callback(data)
{
	var hottag_html = '';
	for (var i in data)
	{
		if (!in_array(data[i].tagid, closedtags))
		{
			hottag_html += '<li><a href="tags.aspx?t=spacepost&tagid=' + data[i].tagid + '" target="_blank"';
			if (colorfultags && colorfultags[data[i].tagid])
			{
				 hottag_html += ' style="color: #' + colorfultags[data[i].tagid].color + '"';
			}
			hottag_html +='>' + data[i].tagname + '</a>(' + data[i].scount + ')</li>';
		}		
	}
	$('spacehottags').innerHTML = hottag_html;
}

function photohottag_callback(data)
{
	var hottag_html = '';
	for (var i in data)
	{
		if (!in_array(data[i].tagid, closedtags))
		{
			hottag_html += '<li><a href="tags.aspx?t=photo&tagid=' + data[i].tagid + '" target="_blank"';
			if (colorfultags && colorfultags[data[i].tagid])
			{
				 hottag_html += ' style="color: #' + colorfultags[data[i].tagid].color + '"';
			}
			hottag_html +='>' + data[i].tagname + '</a>(' + data[i].pcount + ')</li>';
		}		
	}
	$('photohottags').innerHTML = hottag_html;
}

function getajaxforumhottags()
{
	_sendRequest('tools/ajax.aspx?t=getforumhottags', function(d){
		try{
		eval("(" + d + ")");}catch(e){};
	});
}

function getajaxspacehottags()
{
	_sendRequest('tools/ajax.aspx?t=getspacehottags', function(d){
		try{
		eval("(" + d + ")");}catch(e){};
	});
}

function getajaxphotohottags()
{
	_sendRequest('tools/ajax.aspx?t=getphotohottags', function(d){
		try{
		eval("(" + d + ")");}catch(e){};
	});
}