var button = document.getElementById('sMenuButton'), menu = document.getElementById('sMenu'); button.onclick = function(e) {if(menu.style.display!='none')menu.style.display='none';else menu.style.display='block'; };