title: Javascript Toggle based on Value
body: <p>I have an element:</p>
  
  <pre><code>&lt;a href="#" type="link" class="button send" classAct="button send" classSel="button send pressed" label="encrypt" title="sendmessage" onclick="add_encryption();"&gt;Encrypt&lt;/a&gt;
  </code></pre>
  
  <p>that when toggles via the below javascript, I want it to display as:</p>
  
  <pre><code>&lt;a href="#" type="link" class="button send" classAct="button send" classSel="button send pressed" label="decrypt" title="sendmessage" onclick="add_encryption();"&gt;Decrypt&lt;/a&gt;
  
  &lt;script type="text/javascript"&gt;
  
  function add_encryption() {
      document.getElementById('compose-subject').value = "[encrypt]";
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem is I don't know how to write the toggle for it.</p>