function showEditTopicForm (topic, gotoTopic) {
	if (! gotoTopic) {
		gotoTopic = 0;
	}
	currentPopupId = '#popup_edit_topic';
	if (parent) {
		currentPopupId = currentPopupId + '_' + topic.id;
	}
	showPopup('topic_window', {type: 'GET', data: {id: topic.id, gotoTopic: gotoTopic}, dataType: 'html', url: '/forum/index/topic-form/', success: processFormResponse}, currentPopupId, 'Редактирование темы');
	return false;
}

function deleteTopic(topic, deleteAllowed) {
	if (deleteAllowed) {
		return window.confirm('Ты точно хочешь удалить тему "' + topic.title + '"?');
	} else {
		alert('Тему может удалить только модератор');
	}
	return false;
}
