/* wait a bit before refreshging tags */
var timeout = null;
function tagRefresh()
{
	if (timeout)
		clearTimeout(timeout);

	timeout = setTimeout("tagSync()",750);
}

/* toggle listed tags as visable */
function tagSync()
{
	search = $F('tags');
	/* don't hide tags if filter is too short */
	if (search.length < 2 && search.length != 0)
		return false;

	if (search.length == 0)
		new Ajax.Updater('cloud', '/ajax_tagcloud.php');
	else
		new Ajax.Updater('cloud', '/ajax_tagcloud.php', { method: 'post', parameters: 'tags='+search } );
}
