/*
Summary:	This script will limit the text input on a text area and provide
			feedback to the user as to howmany characters they have left.
			
Parameters:	sender 		This is the text area element in the html page this must be the object
						and not a text reference to it
						
			maxlength	This is the maximum length the field may be.
			
			response	This is the name of element in which you want to provide the response text.
						This element must support the innerHTML property.
						
Added by:	Werner Weber

Date:		23 February 2007

*/
function limitText(sender, maxlength, response){
			
		if(sender.value.length>=maxlength){
			sender.value = sender.value.substring(0,maxlength);
		}
		
		if(response!=''){
			document.getElementById(response).innerHTML = 'You have ' + (maxlength - sender.value.length) + ' characters left';;
		}
	
	}