

// BEGIN FLASH SNIFFER:

var browser = 'other'
var version = ''
var OS = 'other'
var redirect = 'no'


// PART 1 - DETERMINE OS

if (navigator.appName == "Netscape")
  { browser = 'netscape'; }
if (navigator.appName == "Microsoft Internet Explorer")
  { browser = 'ie'; }

if (navigator.appVersion.indexOf("MSIE 5.") >= 0)
  { version = '5' }
else
  { version = navigator.appVersion.substring(0,navigator.appVersion.indexOf(".")) }

if (navigator.platform.indexOf("Mac") >= 0)
  { OS = 'Mac' }
else
  { OS = 'Win' }


// if Mac IE 4.5 or less, send them to special mac page, and set variable "redirect" to "yes" just for goofs
if ((OS == "Mac") && (browser == "ie") && (version < 5))
  {
    redirect = 'yes'
    // document.location='static/common/html/index_mac_ie.html'  // REDIRECT PAGE
    top.location='../../../../static/common/html/index_mac_ie.html'  // REDIRECT PAGE
  }




// PART 2 - determine presence of Flash plugin

var FlashMode = 1;

if (navigator.appName == "Netscape" && navigator.plugins)
{ FlashMode = 0;
        numPlugins = navigator.plugins.length;
        if (numPlugins > 0) 
        {
                for (i = 0; i < numPlugins; i++)
                {
                        plugin = navigator.plugins[i];
                        if ((plugin.description.indexOf("Flash 4") != -1) || (plugin.description.indexOf("Flash 5") != -1) || (plugin.description.indexOf("Flash 6") != -1))

                        {
                                numTypes = plugin.length;
                                for (j = 0; j < numTypes; j++) 
                                {
                                        mimetype = plugin[j];
                                        if (mimetype)
                                        {
                                                if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1))
                                                        FlashMode = 1;
                                                // Mac wierdness
                                                if (navigator.mimeTypes["application/x-shockwave-flash"] == null)
                                                        FlashMode = 0;
                                        }
                                }
                        }
                }
        }
}



// PART 3 - if no plugin is detected

if (FlashMode == 0)
  {
    // No Flash 4.0 Detected
    top.location='../../../../static/common/html/no_flash.html'  // REDIRECT PAGE
  }



// STUFF FOR DEBUG:

// alert ("Your browser is " + browser + " version " + version + " and your OS is " + OS + ".")
// if (FlashMode == "1") { alert ("You have the Flash plugin installed.") }
// if (redirect == "yes") { alert ("You're using Mac and IE 4.5 or less, you naughty person.") }

// END FLASH SNIFFER

