for (var i=0;i<this.children.length;i++) { if(!(event.relatedTarget==this.children[i])) this.style.display = 'none'; }