function show_reply_form(comment_id, url, person_name, depth) {
    var reply_form = '<div style="clear:both;"></div><div id="reply-to-'+comment_id+'" class="formcontainer formcontainer-reply depth-'+depth+'" style="margin-bottom: 1em; display:none;"><form method="post" action="'+url+'" id="commentform"><p id="comment-notes" style="font-weight:bold;">Reply to '+person_name+':</p><div class="form-section"><div class="form-label"><label for="id_name">Name</label><span class="required">*</span></div><div class="form-input"><input id="id_name" type="text" name="name" maxlength="128" /></div></div><div class="form-section"><div class="form-label"><label for="id_email">E-mail address</label><span class="required">*</span></div><div class="form-input"><input id="id_email" type="text" name="email" maxlength="75" /></div></div><div class="form-section"><div class="form-label"><label for="id_website">Website</label></div><div class="form-input"><input id="id_website" type="text" name="website" maxlength="200" /></div></div><div class="form-section"><div class="form-label"><label for="id_comment">Comment</label><span class="required">*</span></div><div class="form-input"><textarea id="id_comment" rows="10" cols="40" name="comment"></textarea></div></div><div class="form-section" id="form-allowed-tags"><p><span>You may use <a href="http://daringfireball.net/projects/markdown/syntax" target="_blank" title="Learn Markdown">Markdown syntax</a>.</span></p></div><div class="form-submit"><input type="submit" value="Post Comment" name="submit" id="submit" class="submit"></input><input type="submit" value="Preview" name="preview" class="submit"/></input></div></form></div>'
    var comment_reply = $('#comment-' + comment_id);
    $('.formcontainer-reply').slideUp()
    $('div#respond').slideUp();
    comment_reply.after(reply_form);
    $('#reply-to-'+comment_id).slideDown();
    var reply_anchor = $('#comment-reply-'+comment_id)
    reply_anchor.attr('href', 'javascript:hide_reply_form(\''+comment_id+'\', \''+url+'\', \''+person_name+'\', \''+depth+'\')');
    reply_anchor.html('Cancel Reply')
}

function hide_reply_form(comment_id, url, person_name, depth) {
    var reply_form = $('#reply-to-'+comment_id);
    reply_form.slideUp();
    $('div#respond').slideDown();
    var reply_anchor = $('#comment-reply-'+comment_id)
    reply_anchor.attr('href', 'javascript:show_reply_form(\''+comment_id+'\', \''+url+'\', \''+person_name+'\', \''+depth+'\')');
    reply_anchor.html('Reply')
}
