Changed to onmouseup, added debugging info