function commentsList_replyto(username, comment_id) {
	//Ensure old replies/edits are cancelled.
	cancel();
	//Show replyto box above postcomment box.
	$('replyingto_hider').setStyle({display: 'block'});
	$('replyingto').innerHTML=username;
	$('commentcopy').innerHTML=$('summary_'+comment_id).innerHTML+"...";
	$('parent_comment_id').value = comment_id;
	$('comment').focus();
	
}


function commentsList_edit(username, comment_id) {
	//Ensure old replies/edits are cancelled.
	cancel();
	
	//Change Reply/Save button text.
	$('replybutton').value = 'Save';
	
	//Show editing summary box above postcomment box.
	$('editing_hider').setStyle({display: 'block'});
	$('editingname').innerHTML=username;
	
	//Fill editor box with bbcode version of comment text to edit.
	text1 = $('bbcode_'+comment_id).value;
	$('comment').value = text1;
	//Set the editor to change comment with id comment_id.
	$('edit_comment_id').value = comment_id;
	
	//Set mod_comment status
	if ($('mod_comment') && $('mod_comment_'+comment_id)) {
		$('mod_comment').checked = ($('mod_comment_'+comment_id).value == 'yes');
	} else {
		if ($('mod_comment')) $('mod_comment').checked = false;
	}
	
	$('comment').focus();
	
}


function commentsList_lock(comment_id) {
	$('comment_lock_form_mode').value = 'lock';
	$('comment_lock_form_comment_id').value = comment_id;
	$('comment_lock_form').submit();
}

function commentsList_unlock(comment_id) {
	$('comment_lock_form_mode').value = 'unlock';
	$('comment_lock_form_comment_id').value = comment_id;
	$('comment_lock_form').submit();
}

function commentsList_exactdate(id) {
	$('commentid_'+id+'_elapsed').setStyle({display: 'none'});
	$('commentid_'+id+'_exact').setStyle({display: ''});
}

function commentsList_elapseddate(id) {
	$('commentid_'+id+'_elapsed').setStyle({display: ''});
	$('commentid_'+id+'_exact').setStyle({display: 'none'});
}