Updated the function.

Had a read in the manual and it looks like the varable is only valid within the script segment,this I feel applies to a function, therefore I will leave it as is should anyone feel different?

Bye
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.