public static int getSelectedIndex() {
		if (getSelected() == null) {
			return -1;
		}
		RSInterface parent = getInterface();
		if (parent.children == null) {
			return -1;
		}
		for (int index = 0; index < parent.children.size(); index++) {
			if (parent.children.get(index) == getSelected().id) {
				return index;
			}
		}
		return -1;
	}