function characterCounter($textarea,$max_characters,$target_id)
{
    var $remaining_chars = $max_characters- $textarea.value.length;

    if ($remaining_chars < 0) {
        $remaining_chars = 0;
        $textarea.value = $textarea.value.substr(0, $max_characters);
    }

    document.getElementById($target_id).innerHTML = '[Nog '+ $remaining_chars +' lettertekens over - inclusief spaties]';
}