var th=0; function showdiv(id) { if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"; } function toggleDiv(id,flagit,e) { if (flagit=="1") { if (e.clientX) { x = e.clientX; y = e.clientY; } if (e.pageX) { x = e.pageX; y = e.pageY; } scrollX=document.body.scrollLeft; scrollY=document.body.scrollTop; if (!self.pageYOffset) { y+=scrollY; x+=scrollX; } if (document.body.clientHeight) { windowheight=document.body.clientHeight; windowwidth=document.body.clientWidth; } else { windowheight=self.innerHeight; windowwidth=self.innerWidth; } if (document.getElementById) { if (x-scrollX>windowwidth/2) newleft = x-220; else newleft = x+20; if (y-scrollY>windowheight/2) newtop = y-40; else newtop = y+20; document.getElementById(''+id+'').style.top=newtop; document.getElementById(''+id+'').style.left=newleft; if (th!=0) clearTimeout(th); th=setTimeout("showdiv('"+id+"')",200); } } else if (flagit=="0") { if (th!=0) { clearTimeout(th); th=0; } if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden" } }