function showDoComment(commentButton,commentForm) {
	$(commentButton).hide();
	$(commentForm).show();
}

function hideDoComment(commentButton,commentForm) {
	$(commentForm).hide();
	$(commentButton).show();
}

function doAddComment(commentText,commentForm,commentUrl) {	
	new Ajax.Request(commentUrl, {
		parameters: Form.serialize(commentForm),
		onComplete: function(transport) {
			eval('var objJson='+transport.responseText+'')
			alert(objJson.message);
			if(200==transport.status) {
				location = objJson.url;
			}
		}});
}

function autoResizeCommentText(commentText) {
    while (commentText.scrollHeight > commentText.offsetHeight) {
        commentText.rows += 1;
    }
}
