function postComment (relId, sTypeName, photoId) {
	var oText = $('#comment_text_' + relId);
	var commentText = oText.val();
	
	if (commentText == '') {
		$('#commenting_error_' + relId).show();
		return false;
	}
		
	$.ajax ({
		url:  baseURI + '/photos/ajax_addcomment/' + photoId,
		data: 'data[new][text]=' + Url.encode(commentText) + '&data[new][rel_id]=' + relId,
		type: 'POST',
		dataType: 'xml',
		error: function () { new Error ('Произошла ошибка!'); },
		success: function (xml) {
			var result = $(xml).find('result').text();
			
			if (result == '0') {
				new Error ('Произошла ошибка!');
			}
			else if (result == '1') {
				$('#comments_div').load ( baseURI + '/comments/getcomments/photo/' + photoId + '?reload');
			}
		}
	});
}
