function notice(title) {
	var divN = document.getElementById('notice');
	var divNBg = document.getElementById('notice_background');
	if (divN.className != 'act') {
		if (title != '') {
			document.getElementById('notice').getElementsByTagName('h2')[0].innerHTML = title;
		}
		divNBg.style.height = document.getElementById('inhalt').offsetHeight + 'px';
		divN.className = 'act';
	} else {
		divN.className = '';
	}
}

function selectTopic(topicId, titleTag, disableNotice, status) {
	var aTopic = document.getElementById('thema_' + topicId);
	if (!disableNotice) {
		var title = '';
		if (!titleTag) {
			titleTag = 'h2';
		}
		title = aTopic.parentNode.parentNode.parentNode.getElementsByTagName(titleTag)[0].innerHTML;
	}
	if (!status) {
		if (aTopic.className != 'act') {
			aTopic.className = 'act';
			if (!disableNotice) {
				notice(title);
			}
		} else {
			aTopic.className = '';
		}
	} else {
		aTopic.className = status;
	}
}

function selectTopicBox(topicBoxId, topicId) {
	selectTopic(topicBoxId);
	var aTopicBox = document.getElementById('thema_' + topicBoxId);
	var topicBoxStatus = aTopicBox.className;
	if (topicBoxStatus == '') {
		topicBoxStatus = 'no'; 
	}
	var topicIds = topicId.split('/');
	for(i = 0; i < topicIds.length; i++) {
		selectTopic(topicIds[i], false, true, topicBoxStatus);
	}
}