Solution :
window.top.layerIndex=window.top.layer.open (remark: fill in the main page)
window.top.layer.close(window.top.layerIndex); (remark: fill in the redirected page)
Example:
window.top.layerIndex=window.top.layer.open
window.top.layer.close(window.top.layerIndex);