function frameCheck()
{
  if (document.layers && (self.innerHeight==0 && self.innerWidth==0))
    {return;}
  else
  {
    if ((top == self) || (parent.frames[2].name != 'principale') )
    {
      var loc=escape(location.href);

      if (navigator.userAgent.indexOf('Opera') > -1)
      {
        if (document.images)
          top.location.replace(location.protocol + '//' +
          location.host +
          location.pathname.substring(0,location.pathname.lastIndexOf('/'))
          + '..\/index.html?' + escape(location.href));
        else
          top.location.href = location.protocol + '//' +
          location.host +
          location.pathname.substring(0,location.pathname.lastIndexOf('/'))
          + '..\/index.html?' + escape(location.href);
      }
      if (document.images)
        top.location.replace('..\/index.html?'+escape(location.href));
      else
        top.location.href = '..\/index.html?'+loc;
    }
  }
}

document.onload=frameCheck()
