When posting here please help us to help you by following the posting guidelines and wrapping your code in CODE tags. It should be obvious why this is necessary. This means use the octothorpe or # button on the toolbar. You can (and should) edit your previous post.
And you need to format the code with line breaks so that other people do not have to disentangle it.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Last edited by Philip M; 11-13-2012 at 12:46 PM..