Sort:  

It is a little complex, but this is a good tutorial to start with I think, have a go and let me know what you think.

Cg