﻿// JScript File
function IsPlugInstalled(name) {
navigator.plugins.refresh( false );
    for ( i=0; i<navigator.plugins.length; i++) {
        if ( navigator.plugins[i].description == name )
        return true;
    }
        return false;
}

function RefreshPage() {
    con=confirm('Reload the page? \n\nPlease click Ok if you installed the OSAKit Player.\n ')
    if ( con==1 ) { window.location.reload(); }
}

if (window.navigator.appName != 'Microsoft Internet Explorer')
{
    // The browser is Netscape!
    if ( IsPlugInstalled("MeadCo's Neptune") )
    {
    } else {
        var con=confirm("OSAKit Player ( ~160KB ) is required to play this game, please follow these steps: \n\n\n1. Click the Ok button below. \n\n2. Click Save when the save dialog appear. \n\n3. Run the downloaded file to install OSAKit Player. \n\n4. Reload/Refresh this page again after installing the Player.\n \n ");
        if ( con==1 ) {
            window.location.replace ('http://www.osakit.com/downloads/OSAKitProPlayer.exe');
            setTimeout('RefreshPage()',15000);
        }
    }
}

        function LoadGame()
        {
            if(document.getElementById("OSAKit") == undefined)
            {
                //alert("OSAKIT not defined");
                setTimeout('LoadGame();', 500);
            }
            else
            {
                //alert("OSAKit ok");
                document.getElementById("OSAKit").StartIt();
            }
        }
        
        function UnloadGame()
        {
            if(document.getElementById("OSAKit") == undefined)
            {
                //alert("OSAKIT not defined");
                setTimeout('LoadGame();', 500);
            }
            else
            {
                //alert("OSAKit ok");
                document.getElementById("OSAKit").StopIt();
            }
        }

