// Check the length of text in the named textarea and truncate
// if necessary. Label is the display name for informing the user.

function textlimit(label, name, limit) {
	    var textArea;
		if (document.all)
			textArea = document.all[''+name+'']
		else if (document.getElementById)
			textArea = document.getElementById(''+name+'')

		if (textArea.value.length > limit) {
	    	alert('Sorry, '+label+' field is limited to '+limit+' characters.')
			textArea.value = textArea.value.substr(0, limit)
		}
}
