Hand up or down with JavaScript