function postComment()	{
	path = 'includes/comments.ajax.php';
	
	if($('comment_text').value == ''){
		alert('You must enter a comment');
		return false;
	}
	
	new Ajax.Updater(			
		'comments_list', 
		path, { 
			evalScripts: true,
			asyncronous: false,
			method: 'get', 
			parameters: {
				block: 'comments',
				action: 'add_comment',
				comment: $('comment_text').value
			},
			onComplete: function() {
				setTimeout('fadeMessage()',3000);
			}
		}
	);
}

function fadeMessage() {
	new Effect.Fade($('message'));
}

function approveComment(comment_id) {
	path = 'includes/comments.ajax.php';
	var divID = 'comment_'+comment_id;
	new Ajax.Updater(			
		'blank_comments_actions', 
		path, { 
			evalScripts: true,
			asyncronous: false,
			method: 'get', 
			parameters: {
				block: 'blank',
				action: 'approve_comment',
				comment_id: comment_id
			},
			onComplete: function() {
				new Effect.Fade($(''+divID+''));
				new Ajax.Updater(			
					'approved_comments_list', 
					path, { 
						evalScripts: true,
						asyncronous: false,
						method: 'get', 
						parameters: {
							admin_block: 'approved_comments'
						}
					}
				);
			}
		}
	);
}

function deleteComment(comment_id) {
	path = 'includes/comments.ajax.php';
	var delete_comment = confirm('Are you sure you want to delete this comment');
	if(delete_comment){
		var divID = 'comment_'+comment_id;
		new Ajax.Updater(			
			'blank_comments_actions', 
			path, { 
				evalScripts: true,
				asyncronous: false,
				method: 'get', 
				parameters: {
					admin_block: 'blank',
					action: 'delete_comment',
					comment_id: comment_id
				},
				onComplete: function() {
					new Effect.Fade($(''+divID+''));
				}
			}
		);
	}
}