if top.location <> 'http://www.mydomain.com/' then
location.replace("url you want")
exit from doing what's below this..
end if
location.replace("url you want")
exit from doing what's below this..
end if
if (top != self) top.location=self.document.location;

Comment