I am thinking of giving up on this project, I think its above my skill level. I have found a bit of code that works and looking at that I think it might make a better starting point.
cheers for all the help, but I have now had over a week working on this and not got far at all.