Spostato in JS.
Ma credo che dovrai dare piu` info, per poter essere aiutato.