You can see how I have done it in the link below. http://pastebin.com/DT2ReF1V I will probably have a hack at this later tonight.