function character_count(user, element, counter, limit)
{
	var count = $(element).getValue().length;
	var str = user + "_submit";
	$(counter).update(limit - count);
	
	if((limit - count) <= 10)
	{
		$(counter).setStyle({ color: '#dd0000' });
		if((limit - count) < 0) {
			$(str).disabled = true;
		}
	} 
	
	if (count <= limit) {
		$(str).disabled = false;
	}
	
	if (count <= (limit - 10))
	{
		$(counter).setStyle({ color: '#000000' });
	}
}