if(parent.frames.length!=0)parent.location.replace(location.href)
<