//Characters Left Script
//Javascript
//Eli Moulton 20080611

//Put this in an onkeyup event in an input box.
function charsleft(inputelem,maxchars,outputdiv)
{
	text = document.getElementById(inputelem);
	output = document.getElementById(outputdiv);
	
	var left = maxchars - text.value.length;
	
	if (left < 0)
	{
		text.value = text.value.substr(0,250);
		output.innerHTML = "0";
	}
	else
	{
		output.innerHTML = "" + left;
		//output.innerHTML = "TEST";
	}
}