function SetupReplyBox(n,t,i,r){$("#replybox").hide();$("#ParentCommentId").val(n);$("#ReplyLevel").val(t);r?($("#replybox>div.c_text").width("530px"),$("#replybox").removeClass("reply")):(width=530-33*(t*1+1),$("#replybox>div.c_text").width(width+"px"),$("#replybox").addClass("reply"));isRoot=r}function DoTopPost(n){return SetupReplyBox(0,-1,"",!0),$("#replybox").prependTo($("ul#ulComments")).slideDown(400,function(){$("#CommentInput").focus()}),n.preventDefault(),!1}function DoBottomPost(n){return SetupReplyBox(0,-1,"",!0),$("#replybox").appendTo($("ul#ulComments")).slideDown(400,function(){$("input#Subject").focus()}),n.preventDefault(),!1}function loadReplyBox(n,t,i,r){SetupReplyBox(t,i,r,!1);$("#replybox").insertAfter($(n).parent()).slideDown(400,function(){$("#CommentInput").focus()})}function loadLoginBox(n,t,i,r){loadReplyBox(n,t,i,r);return}function beginComments(){$("#commentsSingle").fadeOut("normal")}function successComments(n){$("div#comments").html(n)}function scrollComments(n){$("div#comments").html(n);var t=$("#commentsAnchor").offset(),i=t.top;$("html, body").animate({scrollTop:i},500)}function failureComments(){alert("Could not retrieve comments.")}function PrintWindow(n,t,i){var r="toolbar=no,menubar=yes,scrollbars=yes,resizable=yes,width="+t+",height="+i;msgWindow=window.open(n,"PRINTARTICLE",r)}function DoComment(){$("#inlineComment").hide();$("img#icAjaxLoader").show();var n={CommentText:$("#CommentInput").val(),ContentId:$("input#ContentId").val(),ReplyLevel:$("input#ReplyLevel").val(),ParentCommentId:$("input#ParentCommentId").val()},t=$.toJSON(n);return $.ajax({url:"/Comment/InlineComment",contentType:"application/json; charset=utf-8",dataType:"json",type:"POST",data:t,success:function(n){n.Success?($("#replybox").hide(),$("#replybox").after(n.Html),$("#"+n.DivId).slideDown(400,function(){$("img#icAjaxLoader").hide();$("#inlineComment").show();$("#CommentInput").val("");$("#icMessage").html("")})):($("#icMessage").html(n.Message),$("img#icAjaxLoader").hide(),$("#inlineComment").show())}}),!1}