function updateCommentScore(UserID, CommentID, Direction) {
  if ((CommentID == null) || (CommentID == '')) {
	alert("Why is there no comment id?");
	return;
  }
  if ((UserID == null) || (UserID == '')) {
	alert("Why is there no user id?");
	return;
  }

  var url = "scripts/updateCommentScore.php?UserID=" + escape(UserID) + "&CommentID=" + escape(CommentID) + "&Direction=" + escape(Direction);

  new Ajax.Updater('CommentScore' + CommentID, url, {asynchronous:true});
  new Effect.Appear('CommentScore' + CommentID);
}

function updatePostScore(UserID, PostID, Direction) {
  if ((PostID == null) || (PostID == '')) {
	alert("Why is there no post id?");
	return;
  }
  if ((UserID == null) || (UserID == '')) {
	alert("Why is there no user id?");
	return;
  }

  var url = "scripts/updatePostScore.php?UserID=" + escape(UserID) + "&PostID=" + escape(PostID) + "&Direction=" + escape(Direction);

  new Ajax.Updater('PostScore' + PostID, url, {asynchronous:true});
  new Effect.Appear('PostScore' + PostID);
}