// Minified
$(".DeleteComment").click(function(event){var id=$(this).attr("cid");$("#confirmationdialog").attr("title","Are you sure?");$("#confirmationdialog").html("<p>Are you sure you want to delete this comment?</p>");$("#confirmationdialog").dialog({bgiframe:true,modal:true,width:600,resizable:false,closeOnEscape:true,close:function(event,ui){$(this).dialog('destroy');MakeADialogMessage("Delete Comment","The comment has not been deleted.");},title:"Are you sure?",buttons:{Yes:function(){$(this).dialog('close');$(this).dialog('destroy');$.ajax({url:"/deletecomment",data:{"commentid":id,"report_spam":"no"},type:"post",dataType:'text',async:false,error:function(XMLHttpRequest,textStatus,errorThrown){MakeADialogMessage("Delete Comment","Error Deleting Comment.");},success:function(result,textStatus){if((result=="INVALID_COMMENT")||(result=="NO_COMMENT_ID")){MakeADialogMessage("Delete Comment","Invalid Comment ID!");}
else if(result=="NO_OWN"){MakeADialogMessage("Delete Comment","You don't own this comment!");}
else if(result=="OUTSIDE_EDITING_WINDOW"){MakeADialogMessage("Delete Comment","You are outside the comment editing window.");}
else if(result=="NO_ACL_ACCESS"){MakeADialogMessage("Delete Comment","Your ALC privilages don't include deleting comments.");}
else if(result=="COMMENT_DELETED"){$("#comment_"+id).html("<dt class='commentInfo'>Comment Deleted</dt><br />");MakeADialogMessage("Delete Comment","Comment Deleted.");}}});},No:function(){$(this).dialog('close');$(this).dialog('destroy');MakeADialogMessage("Delete Comment","The comment has not been deleted.");}}});});