SunYang,
Попробуйте так:
function on_panel() {
if(lem.style.visibility=="hidden") {
on_id = event.srcElement
num_id = on_id.id;
lem=document.getElementById("u_"+num_id);
coord=window.event;
lem.style.top=coord.clientY+20;
lem.style.left=coord.clientX+20;
lem.style.visibility="visible";
xinterval = setInterval("wrtext()", 50)
} else {
lem.style.visibility="hidden";
lem.innerHTML = "";
i = 0;
}
}