by Federico Ghigini.
Sorry,
probably i have misspelled some instruction. The code posted by Tim and Matteo works great (and that code is very similar to the code in my first post).
Thanks to all!