Glad it helped and thanks for the credit.
Though it should be noted that I also just copied that code from someone else (don't remember who/from where exactly). :P
As a sidenote, maybe consider putting in ReaPack so more people have a chance to see it.