﻿function maxLength(textArea, countLabel, maxChars) {
    if (textArea.val().length > maxChars) {
        textArea.val(textArea.val().substring(0, maxChars));
    } else {
        countLabel.html(maxChars - textArea.val().length);
    }
} function show(id, tabId) {
    if (document.getElementById(id)) {
        document.getElementById(id).style.display = '';
    }
    if (document.getElementById(tabId)) {
        document.getElementById(tabId).className = 'TabOn';
    }
}
function hide(id, tabId) {
    if (document.getElementById(id)) {
        document.getElementById(id).style.display = 'none';
    }
    if (document.getElementById(tabId)) {
        document.getElementById(tabId).className = 'TabOff';
    }
}
