function closelayer(){ var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); }