if (parent == self)
{
  var url = escape(location.href);
  for (var i = 0, str = ''; i < url.length; i++)
  {
    if (url.charAt(i) == '/') str += '%2F';
    else str += url.charAt(i);
  }
  location.href = 'index1.html?' + str;
}

