﻿function showCommentBox() {
   show('makeProfileComments');
   self.location.href = "#profileCommentBox";
   document.profile.profilecomment.focus();
   return;
}

function comment(id) {
   if (document.profile[id].value == "")
      alert("Please enter a comment in the comments area!");
   else {
      postForm('profile', true, function (req) { replaceDivContents(req, 'commentbox'); });
   }
   return;
}

function commentpage(form,output,pageid) {
   document[form][output].value = pageid;
   postForm('pager', true, function (req) { replaceDivContents(req, 'commentbox'); });
   return;
}

function deleteMessage(id, href) {
   if (confirm("Do you really want to delete this message?") == true)
      urlRequest('profilecomments/' + id + '/removecomment?redirect=' + href, true, function (req) { replaceDivContents(req, 'commentbox'); });
   return;
}

function blockuser(user) {
   if (confirm("Do you really want to block " + user + " ?") == true)
      urlRequest('blockuser', true, function (req) { replaceDivContents(req, 'blockuser'); });
   return;
}