if (top.frames.length!=0) top.location=self.document.location;

if (parent.frames.length> 0) top.location.replace(document.location);