function spoiler(el) { var sp = document.getElementById('sp' + el); var spoiler = document.getElementById('spoiler' + el); if (spoiler.style.display == 'none') { spoiler.style.display = 'block'; sp.innerHTML = '(<a href="#" onClick="spoiler(\'' + el + '\'); return false">' + LANG.SpoilerHide + '</a>)'; }else { spoiler.style.display = 'none'; sp.innerHTML = '(<a href="#" onClick="spoiler(\'' + el + '\'); return false">' + LANG.SpoilerShow + '</a>)'; } }