function getComments() {
	new Ajax.Request(_baseurl + '/_ajax.php', {method:'get', parameters:'page=journal&action=getcomments&id='+item_ID, onSuccess: function(t) {
	                $('comments').innerHTML = t.responseText;
					showCommentBox();
	}});
}

function showCommentBox() {
	Element.toggle('comment_wrapper');
	location.hash = 'comment_wrapper';
}

function sendComment() {
    var data = Form.serialize('commentform');
    var handle = new Ajax.Request(_baseurl + '/_ajax.php', {method:'post',
                                               postBody:'page=journal&action=insertcomment&id='+item_ID+'&'+data,
                                               onSuccess: function(t) {
                                                   if (t.responseText.length < 3) {
                                                       $('boing60').show();
                                                       $('boing60').down('span').innerHTML = t.responseText;
                                                   } else {
                                                       new Insertion.Top('comments', t.responseText);
                                                       $('count_comments').innerHTML = parseInt($('count_comments').innerHTML)+1;
                                                       $('comment_content').value = '';
                                                       $('boing60').hide();
                                                   }
                                               }});
    if (handle.transport) {
        return false;
    } else {
        return true;
    }
}
