This is wonderful, thanks! The function both makes perfect sense _and_ does everything I want. I have put a thank you and a link to this cart in my code comments.