/**
 * Sets the attribute "selected" for the active category element
 */
function fixSelectBox() {
	var select = document.getElementsByTagName("select");
	for (var i = 0; i < select.length; i++) {
		if (select[i].name != "tx_cal_controller[category][]") {
			continue;
		}
		
		var option = select[i].getElementsByTagName("option");
		for (var j = 0; j < option.length; j++) {
			if (option[j].outerHTML.match (/checked="checked"/)) {
				option[j].selected = true;
				return;
			}
		}
	}
}
