sintax error my dear

a.style.block = 'none';

sembrerebbe dovesse piuttosto essere così

a.style.display = 'none';