Glad you got what you needed, ronjonp's version does exactly what you wanted and adds the ability to use the settings of the current layout.
http://www.theswamp.org/index.php?to...0212#msg430212
When I get time I'm going to have to study these and bone up on using collections.