function dynamic_character_count(element_to_observe, count_element, maxchars){
	var xlen = 0;
	var text = document.getElementById(element_to_observe).value;
	var txt1 = text;
	txt1 = txt1.replace(/[\\\/\"\']/g, "ZyXw"); // the four characters to be escaped count as two
	x = txt1.match(/ZyXw/g);
	if (x) {
		xlen = x.length;  // how many?
	}
	var remaining = maxchars - text.length - xlen;
	document.getElementById(count_element).innerHTML = remaining;
}