function checkMaxLength(e, textArea, maxLength) {
    if (maxLength != "") {
        if (textArea.value.length > maxLength) {
     	    textArea.value = textArea.value.substring(0,maxLength);
        }
    }
}
