if (top.location == self.location) {
  top.location.href ="index.htm?" + self.location.href;
 
}

