..puoi prendere come riferimento quello che ho postato io,
facendo le modifiche ho fatto un po' troppa confusione e non è affidabile come codice..

grazie
isma75