function SNCommentUtils() { var me = this; init(); // constructor function init() {} // deletes a member comment this.deleteComment = function(i) { // set the "deleting" message var obj = document.getElementById("options_" + i); obj.style.textAlign = "left"; obj.innerHTML = "Deleting..."; // use ajax to delete comment var amax = new AMAX('/App_Info/DeleteComment.aspx',false); amax.onLoad = function() { if (this.success) { if (this.data.toLowerCase() == "true") { window.location.reload(); } } } amax.send('i=' + i,'get'); } } document.commentutils = new SNCommentUtils();