function $(id) { return document.getElementById(id); } function toggle(id, e) { xxx = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft; yyy = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop; if(typeof($(id).style.left)=='string') { $(id).style.left = (xxx + 10) + 'px'; $(id).style.top = (yyy + 20) + 'px'; } else { $(id).style.left = (xxx + 10) ; $(id).style.top = (yyy + 20) ; } $(id).style.display = ($(id).style.display=='none') ? 'block' : 'none'; }