<form method="POST" name="form_mur" id="form_mur"
      action="<?php echo v('url_mur'); ?>">
    <div class="mur-message-avatar">
        <?php echo zk_aff_logo_j(s('JOU_CLE'), array('class' => 'murs-avatar')); ?>
    </div>
    <div class="mur-message-histoire">
        <p>
            <textarea rows="3" cols="35" name="message" onkeyup="updateNbCharacteres()"></textarea>
        </p>
    </div>

    <div class="action_bar">
        <input type="submit" name="submit_mur" class="btn btn-primary btn-small pull-right" id="submit_mur" value="post" disabled="disabled"/>
        <div class="pull-right" id="char_count">200</div>
    </div>
</form>
<script type="text/javascript">
    function updateNbCharacteres() {
        f = document.form_mur;
        if (f.message.value.trim().length > 0) {
            f.submit_mur.disabled = false;
        } else {
            f.submit_mur.disabled = true;
        }
        if (f.message.value.length > 200) {
            alert("Message limité à 200 caractères");
            f.message.value = f.message.value.substr(0, 200);
        }
        document.getElementById("char_count").innerHTML = 200 - f.message.value.length;
    }
</script>