DOM alphabetical insert
<p>This function inserts a DOM element ('a') into a div (Bb1c).  I want to update it so that it does an alphabetical insert based upon the the name of the bookmark (c[1].value).  Bb1c basically conatins a list of bookmarks and when I add one I want it inserted alphabetically.</p>

<p>The already inserted links are in aphabetical order already by means of the mysql query (ORDER BY ASC) so a refresh puts the links in order but I want it inserted in the correct order dynamically as well.</p>

<p>Google pulls up the document.body.insertBefore() method but I'm not sure this is the correct direction.</p>

<pre><code>function d0()
  {
  var a=document.getElementById('Bb1c'),
  b=document.createElement('a'),
  c=document.forms['f3'].elements;  
  b.href=c[2].value;
  b.name="a1";    
  b.className ="b";
  b.innerHTML = c[1].value; 
  a.appendChild(b);
  return 1;
  }
</code></pre>
