
function wordcount(this_field) {
	var char_count = this_field.value.length;
	var fullStr = this_field.value + " ";
	var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
	var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
	var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
	var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
	var splitString = cleanedStr.split(" ");
	var word_count = splitString.length -1;
	return word_count;
}

function showHide(shid) {
	if (document.getElementById(shid).style.display == 'none') {
		document.getElementById(shid).style.display = 'block';
	} else {
		document.getElementById(shid).style.display = 'none';
	}
}
