I hope this helps
In reply to Re: Help regarding an alogrithm by samarzone in thread Help regarding an alogrithm by perl_mystery