function trimLength(textarea, maxChars){ if(textarea.value.length <= maxChars) return; textarea.value = textarea.value.substr(0, maxChars)}