Wow this is very neat, i've been looking for a way to do this for years!

+rep for your efforts