function List_getSelectedIndex(id) {
	var list = document.getElementById(id);
	if (list != null) {
		var selIndex = list.getAttribute("selIndex");
		if (selIndex == null) {
			list.setAttribute("selIndex", -1);
			selIndex = -1;
		}
		return selIndex;
	} else {
		return -1;
	}
}

function List_setSelectedIndex(id, index) {
	var list = document.getElementById(id);
	if (list != null) {
		list.setAttribute("selIndex", index);
		var statePostfix = getPostfixForState(getElementState(list));
		var newClassName = id + statePostfix + "_" + index;
		if (statePostfix == "_Disabled") {
			newClassName = id + "_Disabled";
		}
		if (list.className != newClassName) {
			list.className = newClassName;
		}
	}
}

