function quote(element_id, textarea_id)
    {
        var textarea = null;
        var comment = null;
        
        if (document.getElementById)
            {
                textarea = document.getElementById(textarea_id);
                comment = document.getElementById(element_id).innerHTML;
            }
        else if (document.all)
            {
                textarea = document.all[textarea_id];
                comment = document.all[element_id].innerHTML;
            }
        else if (document.layers)
            {
                textarea = document.layers[textarea_id];
                comment = document.layers[element_id].innerHTML;
            }
        
        if (textarea)
            {
                textarea.focus();
                var text = textarea.value + " " + "[quote]" + comment + "[/quote]";
                textarea.value = text.stripHTML();
                textarea.focus();
            }
    }
String.prototype.stripHTML = function()
{
        // What a tag looks like
        var matchTag = /<(?:.|\s)*?>/g;
        // Replace the tag
        return this.replace(matchTag, " ");
};