function checkOther(dropdown, otherId){
	var otherElement = document.getElementById(otherId);
	if (dropdown.options[dropdown.selectedIndex].value == "other") {
		otherElement.style.display = "";
	} else {
		otherElement.style.display = "none";
	}
}

function toggleOtherEnabled(mode, dropdownId){
	var element = document.getElementById(dropdownId);
	element.selectedIndex = 0;
	element.disabled = !mode;
}

function setNoticeTitle(element, noticeType, noticeSubject){
	var titleInput = document.getElementById('title_input');
	
	if (element.tagName.toLowerCase() == "select") {
		// It is a dropdown
		var noticeSubject = element.options[element.selectedIndex].innerHTML;
	}
	
	titleInput.value = noticeSubject;
}

