var TimerOn=0;
function CountChars_Summary(f) {
	var max=3999;  		// Max chars
	var txt=f.requiredsummary.value;
	var nb=txt.length;
	if (nb>max) { 
		alert("You cannot input more than "+max+" characters in summary field.");
		f.requiredsummary.value=txt.substring(0,max);
		nb=max;
	}
	lblCharsCount.innerHTML="Maximum 3999 characters in this field. You have "+nb+" character(s).";
	if (TimerOn==0)
	{
		TimerOn=1;
		setTimeout("timer()",100);
	}
}

function CountChars_Bio(f) {
	var max=1999;  		// Max chars
	var txt=f.bio.value;
	var nb=txt.length;
	if (nb>max) { 
		alert("You cannot input more than "+max+" characters in summary field.");
		f.bio.value=txt.substring(0,max);
		nb=max;
	}
	lblCharsCount2.innerHTML="Maximum 1999 characters in this field. You have "+nb+" character(s).";
	if (TimerOn==0)
	{
		TimerOn=1;
		setTimeout("timer()",100);
	}
}

function timer()
{
	setTimeout("timer()",100);
	CountChars_Summary(document.forms["frmSend"]);
	CountChars_Bio(document.forms["frmSend"]);
}
