function truncate(target,length,title) {
  val=target.value;
  tl=val.length;
  if(tl>length) {
	target.value=val.substring(0,length);
	alert(title+" can only be " + length + " characters long.  Your text has been cut off after that.");
  }
}
