detect the mouse inactivity and fire javascript events for that