// JavaScript Document

function sendComment( commentId )
{
	if (typeof commentId == "undefined")
	  commentId = "";
	  
	 var comment = eval( "document.commentForm.reply_"+ commentId +".value" );
	
	document.commentForm.comment.value = comment;
	document.commentForm.replyTo.value = commentId;
	document.commentForm.action.value = "postComment";
	document.commentForm.submit();
}


function cancelComment( commentId )
{
  if (typeof commentId == "undefined")
	  commentId = "";
	  
	var elem= document.getElementById( "edit_reply_"+ commentId );	
	elem.style.display = "none";
}


function deleteComment( commentId )
{
	if (confirm( 'Are you sure you want to delete this comment and all replies?' ))
	{
      if (typeof commentId == "undefined")
	    commentId = "";
	  
	  document.commentForm.commentId.value = commentId;
	  document.commentForm.action.value = "deleteComment";
	  document.commentForm.submit();
	}
}

function postComment( commentId )
{
	if (typeof commentId == "undefined")
	  commentId = "";
	  
	var elem= document.getElementById( "edit_reply_"+ commentId );	
	elem.style.display = "block";
	
	
	
}
