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

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

