﻿setTimeout("try{TopCheck()}catch(e){}", 0);

function TopCheck()
{
    var bIsTopAvailable = false;
    try
    {
      bIsTopAvailable = top.IsTop();
    }
    catch(e)
    {

    }

    try
    {
      if (!bIsTopAvailable && (navigator.appName != "BlackBerry"))
      {
        var strSubPath = new String(window.location);
        
        var tempMath = strSubPath.match(new RegExp("http://www.troyproductions.com/(.*)"));
        if (tempMath)
          strSubPath = tempMath[1];

        top.window.location = "http://www.troyproductions.com/index.php?page=" + strSubPath;
      }
    }
    catch(e)
    {

    }
}


