function show_remaining_flag_count(count, player_guid)
{
	var bar = $$('#flags_left_' + player_guid + ' .bar')[0];
	
	if(count > 3)
	{
		bar.update('&nbsp;');
	}else if(count == 0){
		bar.update('<b class="green">Finished!</b>');
	}else
	{
		bar.update('<b>' + count + '</b> flags left');
	}
}
function show_progress(count, max, player_guid)
{
	var bar = $$('#flags_left_' + player_guid + ' .bar')[0];
	var lab = $$('#flags_left_' + player_guid + ' .progress')[0];
	if(count == 0)
	{
		bar.addClassName('none');
		lab.update('&nbsp;');
		bar.setStyle({'width': '0'});
	}else
	{
		lab.update('Progress:');
		bar.removeClassName('none');
		var new_width = bar.ancestors()[0].getWidth()/max*count - 8;
		if(new_width < 0){
			new_width = 0;
		}
		bar.setStyle({'width': '' + new_width + 'px'});
	}
}
function show_point_count(count, player_guid)
{
	var span = $('point_count_' + player_guid);
	if(count == 0){
		span.update('');
	}else
	{
		var str = '';
		if (count > 0){
			str = str + '+';
		}else{

		}
		str = str + count + ' points'
		span.update(str);
	}
}
function set_player_online_status(guid, is_online){
	var elem = $('player_li_' + guid);
	if(is_online == false)
	{
		elem.addClassName('offline');
	}else
	{
		elem.removeClassName('offline');
	}
}