/**
 * Announcement comment JS/Ajax
 * 
 * 
 */
function sendAnnouncementComment(url, div) {
  params = {action: "saveComment", 
            reasonId: document.getElementById('announcementCommentReason').value,
            comment: document.getElementById('announcementCommentComment').value };
  document.getElementById('announcementCommentReason').value = '';
  document.getElementById('announcementCommentComment').value = '';
  closeElementDisplay('commentField');
  new Ajax.Updater(
    div, 
    url, 
    { 
      parameters: params
    });
}

function findAnnouncementComments(url, div) {
	new Ajax.Updater(div, url, {});
}

function removeAnnouncementComment(url, commentId, div) {
	  var params = "";
	  params += 'action=removeComment&commentId=' + commentId;
	  new Ajax.Updater(
	    div, 
	    url, 
	    { 
	      parameters: params
	    });
}

function removeAnnouncementCommentReply(url, commentId, div) {
	  var params = "";
	  params += 'action=removeCommentReply&commentId=' + commentId;
	  new Ajax.Updater(
	    div, 
	    url, 
	    { 
	      parameters: params
	    });
}


function replyAnnouncementComment(url, commentId, div) {
	  var params = "";
	  params += 'action=replyComment&commentId=' + commentId + '&reply=' + document.getElementById('announcementCommentReply_' + commentId).value;
	  document.getElementById('commentReply_' + commentId).value = '';
	  closeElementDisplay('commentReply_' + commentId);
	  new Ajax.Updater(
	    div, 
	    url, 
	    { 
	      parameters: params
	    });
}

