﻿function ShowCommentForm(BlogEntryId){
    $('#BlogComment').show();
    $('#BlogCommentFormSending').hide();
    $('#BlogCommentResult').hide();
    $('#BlogCommentForm').fadeIn('slow');
    $('#BlogCommentForm').css("top",($(window).height() - $('#BlogCommentForm').height()) / 2 + $(window).scrollTop() + "px");
    $('#BlogCommentForm').css("left",($(window).width() / 2) - ($('#BlogCommentForm').width() / 2) + "px");
    $('#CommentBlogEntryId').val(BlogEntryId);
    $('#BlogCommentName').val('');
    $('#BlogCommentEmail').val('');
    $('#BlogCommentComment').val('');
    
}
function HideCommentForm(){
    $('#BlogCommentForm').fadeOut('slow');

}

function PostBlogComment()
{
    $('#BlogCommentFormSending').fadeIn('fast');
    $('#BlogComment').hide();
    
    $('#BlogCommentResult').load('/SiteLogic/BlogSendComment.aspx',
        {
        'Name': $('#BlogCommentName').val(),
        'Email': $('#BlogCommentEmail').val(),
        'Comment': $('#BlogCommentComment').val(),
        'blogEntryId':$('#CommentBlogEntryId').val(),
        'blogId':$('#CommentBlogId').val()
        }
     );
     $('#BlogCommentFormSending').hide();
     $('#BlogCommentResult').show();
   
    return false
}
