// *** Checking page for being framed by another site, standalone possible
var i=0, check=0, url='';
urls = new Array('http://www.inside3d.com/qip/');

function normalHandling()
{
 return false; // calling the error handler of the browser
}

function extraHandling()
{
 top.location.href = urls[0]; // top.location.href now allowed in Netscape Navigator/Communicator 4.0 and later
 return true; // avoiding the error handler of the browser
}

function changeURL()
{
 var bName=navigator.appName;
 var bVer=parseInt(navigator.appVersion);

 // top.location.href not allowed in Netscape Navigator/Communicator when other domain
 if ( bName == 'Netscape' && bVer < 4 ) {
  document.write('<meta http-equiv="ref'); // splitted for robots
  document.writeln('resh" content="0; url=' + urls[0] + '">');
 } else {
  window.onError=extraHandling; top.location.href = urls[0]; window.onError=normalHandling;
 }
}

url = self.location.href.toLowerCase();
check = url.indexOf('file:') && url.indexOf('http://localhost');
if ( check != 0 )
{
 for (i=0; i < urls.length; i++) { check = url.indexOf(urls[i]); if ( check >= 0 ) { break; } }
 if ( check < 0 ) { changeURL(); } // foreign site
 else if ( window.top && top.location.href != self.location.href ) { // original page in frame
  url = top.location.href.toLowerCase();
  for (i=0; i < urls.length; i++) { check = url.indexOf(urls[i]); if ( check >= 0 ) { break; } }
  if ( check < 0 ) { changeURL(); } // framed by foreign site
 }
}
