function ThisSubmit() {
	document.getElementById('commentform').submit();
}

function AddComment() {
	$(".blog_comment_post_add_sub_bg").remove();
    $(".blog_comment_post_add_sub").remove();
    //$(".blog_comment_post_add .buttons a, .blog_comment_post_add input").css('position', 'relative');
    $(".blog_comment_post_add_bg").show();
    $(".blog_comment_post_add").show();
    $(".blog_comment_post_add form").attr("name", "commentform");
    $(".blog_comment_post_add form").attr("id", "commentform");
}

function HideComment() {
    $(".blog_comment_post_add_bg").hide();
    $(".blog_comment_post_add").hide();
    $(".blog_comment_post_add_sub_bg").remove();
    $(".blog_comment_post_add_sub").remove();
}

function ShowAnswer(number, parentid, reload) {
    if (!reload) {
        $(".blog_comment_post_add script").remove();
        $(".blog_comment_post_add .form_error").remove();
        $(".blog_comment_post_add .textarea").css("height", "110px");
    }
    $(".blog_comment_post_add form").attr("name", "dcommentform");
    $(".blog_comment_post_add form").attr("id", "dcommentform");
    $(".blog_comment_post_add_bg").hide();
    $(".blog_comment_post_add").hide();
    $(".blog_comment_post_add_sub_bg").remove();
    $(".blog_comment_post_add_sub").remove();
    if ($("#comment" + number).length == 0) {
        $(".blog_comment_post_add_bg").clone(true).attr("id", "comment_bg" + number).addClass('blog_comment_post_add_sub_bg').insertAfter("#thread" + number);
        $(".blog_comment_post_add").clone(true).attr("id", "comment" + number).addClass('blog_comment_post_add_sub').insertAfter("#thread" + number);
    }
    $("#comment"+number+" form").attr("name", "commentform");
    $("#comment"+number+" form").attr("id", "commentform");
    $("#comment"+number+" .parent").val(parentid);
    $("#comment"+number+" .parent_num").val(number);

    $("#comment_bg"+number).show();
    $("#comment"+number).show();
    document.getElementById("comment"+number).scrollIntoView(true);


}
