three-way blink with javascript