window.onbeforeunload = fget var mouseX,mouseY; document.onmousemove=mtrack; function mtrack(e) { if(!e){ e=event; } if (e.clientX!=null){ mouseX=e.clientX; mouseY=e.clientY; } } function fget() { if (typeof(event)=="object") { mouseX=event.clientX; mouseY=event.clientY; } if (mouseY<10 && mouseX>400){ if(document.getElementById('exit_pop_url'))modalWin(document.getElementById('exit_pop_url').value); } } var returnValue = 1; function modalWin(url) { if (window.showModalDialog) { window.showModalDialog(url,'write',"dialogWidth:550px;dialogHeight:350px;"); } else { var w=window.screen.width; var h= window.screen.height; var winwidth=500; var winheight=300; var win= (h - winheight)/2; var winleft= (w- winwidth)/2; window.myAction=this; var DialogWin = window.open(url, 'write',"top="+win+",left="+winleft+',location=no,width=550px,height=350px,modal=yes'); window.onclick=function (){DialogWin.focus()}; } }