if (self.parent.frames.length!=0)
{
 self.parent.location.replace(document.location.href);
}

