public static int getSelectedIndex() {
		if (Main.selectedId != -1) {
			RSInterface rsi = Main.getInterface();
			if (rsi.children != null) {
				for (int index = 0; index < rsi.children.size(); index++) {
					if (rsi.children.get(index) == Main.selectedId) {
						return index;
					}/* else {
						RSInterface child = RSInterface.cache[rsi.children[index]];
						if (child.children != null) {
							for (int index2 = 0; index2 < child.children.length; index2++) {
								if (child.children[index2] == Main.selectedId) {
									Main.parentId = child.children[index2];
									Main.depth = 2;
									return index;
								}
							}
						}
					}*/
				}
			}
		}
		return -1;
	}