close alerts with js