fires when the pop-up window hides
myPop.attachEvent("onHide",function(){ alert("The pop-up window is hidden"); })