if (parent.frames.length == 0) 
  {
  var loc = document.location.href.split('?');
  
  if (loc[1]==null)
    {
    top.document.location.href="/";
    }
  else
    {
    top.document.location.href="/index.php?"+loc[1];
    }
  }

