// source: http://javascript.about.com/library/blcount.htm

function cnt(w)
{
	var y=w.value;
	var r = 0;
	
	a=y.replace(/\s/g,' ');
	a=a.split(' ');
	
	for (z=0; z<a.length; z++)
	{
		if (a[z].length > 0) r++;
	}
	
	document.getElementById("word_count").innerHTML = (200 - r);
}
