function shownavisub() { var navibar = document.getelementbyid("navi") var leftlis = navibar.children[0].children for (var i = 0; i < leftlis.length; i++) { leftlis[i].indexof = i; leftlis[i].onmouseover = function () { if (this.children.length>1) { this.children[1].style.display = "block" } } leftlis[i].onmouseout = function () { if (this.children.length > 1) { this.children[1].style.display = "none" } } } } //shownavisub()