function oknoblock(el) { var els = window.document.getElementsByClassName('okno'); for (var i=0; i<els.length; ++i) {els[i].style.display='none';}; el.firstElementChild.style.display='block'; };
IE 8 writes: The object does not support this property or method. Line 2 character 1.
In HTML, the function is called like this: <div id = "n1" onclick = "oknoblock (this)">