Javascript Stop Function From Continuing Education