$(function()
{
	/*$('#competition_story').keypress(function()
	{
		check_chars_left();
	});*/
	$('#competition_story').keyup(function()
	{
		check_chars_left();
	});
});


function check_chars_left()
{
	$(function()
{
	var chars_left = 200 - removeNL($('#competition_story').val()).length;
	if (chars_left>=0)
		$('#chars_left').text(chars_left);
	else
		$('#chars_left').text("0");	
	if (chars_left <= 0) 
	{
		$('#competition_story').val( $('#competition_story').val().substring(0, 200) );
		return false;
	}
	else 
	{
		return true;
	}
	});
}

