function frameCheck()
{
  if(top == self)
  {
    reUrl = window.location.pathname;
    fName = reUrl.substring(reUrl.lastIndexOf('/'), reUrl.length);
    dName = reUrl.substring(0, reUrl.length - fName.length);
    dName = dName.substring(dName.lastIndexOf('/') + 1, dName.length);
 // fPath = 'http://' + document.domain + reUrl.substring(0, reUrl.length - fName.length - dName.length);

    if(fName == '/navigation.html' || fName == '/head.html')
     reUrl = '../' + dName + '/index.html';
    else
     reUrl = '../index.php3?t=' + escape(dName + '' + fName + window.location.search).replace(/\//g, '%2F');

    if(document.images)
     top.location.replace(reUrl);
    else
     top.location.href = reUrl;
  }
}

window.onload = frameCheck;