  function AddToText(str)
  {
     d= document.getElementById('textbody');
     d.value = d.value + str;
     d.focus();
     return;
  }
  
  function AddTagWithText(tag)
  {
    str = '['+tag+ ']';
    inText = window.prompt('Enter text to appear inside the tag:','');
    if(inText!=null)
    {
      str = str + inText+'[/'+tag+']';
      AddToText(str);
    }
  }
  
  function AddURL()
  {
    str = '[URL';
    href = window.prompt('Enter address to link to:','http://');
    if(href!=null)
    {
      str = str+ ' href=\"'+href+'\"]';
      name = window.prompt('Text to display for link:',href);
      if(name!=null)
      {
        str = str+name+'[/URL]';
        AddToText(str);
      }  
    }
  }
  
function AddList()
{
  str = '[UL]\n [*]\n[/UL]';
  AddToText(str);
}

