def panelParentShortcut(panel, parentShortcut):
	"""
	return the first panelParent of panel that has the provided parentShortcut.
	Returns None if no panelParent with shortcut is found.
	"""
	while hasattr(panel, 'panelParent'):
		panel = panel.panelParent()
		if panel is None or panel.par.parentshortcut == parentShortcut:
			return panel