One question, "$r" works like "$rand"?
Works great!!! thanks Wims!