Sorry to revive such an old post, but I seem to be having a very similar problem. I was just wondering if the previous solution worked for the OP?
I was also wondering if there was any simpler way to solve the problem than with the code posted above, as I am scared to use that much code. lol