function showMenu objID var obj document getElementById objID obj styl

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
function showMenu(objID){
var obj = document.getElementById(objID);
obj.style.visibility = "visible";
}
/*
** Функция убирает меню с указанным ID
*/
function hideMenu(objID){
var obj = document.getElementById(objID);
obj.addEventListener('mouseout', function(e){
var parent = e.relatedTarget.parentNode.id;
if(parent != objID){
obj.style.visibility = "";
}
});
}