
fSPLoaded = false;
var WM_startTagFix = '</';
if (MSIE>0 && isMac <= 0)
{
document.writeln('<script language="VBscript">');
document.writeln('\'This will scan for plugins for all versions of Internet Explorer that have a ');
document.writeln('\'VBscript engine version 2 or greater.');
document.writeln('\'This includes all versions of IE4 and beyond and some versions of IE 3.');
document.writeln('Dim WM_detect_through_vb');
document.writeln('WM_detect_through_vb = 0');
document.writeln('If ScriptEngineMajorVersion >= 2 then');
document.writeln('  WM_detect_through_vb = 1');
document.writeln('End If');
document.writeln('Function WM_activeXDetect(activeXname)');
document.writeln('  on error resume next');
document.writeln('    WM_activeXDetect = False');
document.writeln('  If ScriptEngineMajorVersion >= 2 then');
document.writeln('    WM_activeXDetect = False');
document.writeln('    WM_activeXDetect = IsObject(CreateObject(activeXname))');
document.writeln('    If (err) then');
document.writeln('      WM_activeXDetect = False');
document.writeln('    End If');
document.writeln('    If activeXname = "QuickTimeCheckObject.QuickTimeCheck.1" then');
document.writeln('      Set theObject = CreateObject(activeXname)');
document.writeln('      If IsObject(theObject) then');
document.writeln('        If WM_activeXDetect.IsQuickTimeAvailable(0) then');
document.writeln('          WM_activeXDetect = True');
document.writeln('        Else');
document.writeln('          WM_activeXDetect = False');
document.writeln('        End If');
document.writeln('      Else');
document.writeln('        WM_activeXDetect = False');
document.writeln('      End If');
document.writeln('    End If');
document.writeln('  Else');
document.writeln('    WM_activeXDetect = False');
document.writeln('  End If');
document.writeln('End Function');
document.writeln(WM_startTagFix+'script>');
}
function WM_pluginDetect(plugindescription, pluginxtension, pluginmime, activeXname)
{
var i,plugin_undetectable=0,detected=0, daPlugin=new Object();
if (MSIE > 0 && isMac <= 0 && WM_detect_through_vb > 0)
{
plugin_undetectable = 0;
} 
else {
plugin_undetectable = 1;
}
if (navigator.plugins) 
{
numPlugins = navigator.plugins.length;
if (numPlugins > 1) 
{
if (navigator.mimeTypes && navigator.mimeTypes[pluginmime] && 
navigator.mimeTypes[pluginmime].enabledPlugin && 
(navigator.mimeTypes[pluginmime].suffixes.indexOf(pluginxtension) != 
-1)) 
{ 
if ((navigator.appName == 'Netscape') && 
(navigator.appVersion.indexOf('4.0') != -1)) 
{ 
for (i in navigator.plugins) 
{
if ((navigator.plugins[i].description.indexOf(plugindescription) 
!= -1) || (i.indexOf(plugindescription) != -1)) 
{ 
detected=1;
break;
}
}
} else 
{
for (i = 0; i < numPlugins; i++) 
{
daPlugin = navigator.plugins[i];
if ((daPlugin.description.indexOf(plugindescription) != -1) || 
(daPlugin.name.indexOf(plugindescription) != -1)) 
{
detected=1;
break;
}
}
}
if (navigator.mimeTypes[pluginmime] == null) {
detected = 0;
}
}
return detected;
} 
else if((MSIE == 1) && isMac <= 0  && !plugin_undetectable)
{
return WM_activeXDetect(activeXname);
} 
else 
{ 		
return 0;
}
} 
else 
{
return 0;
}
}
function WM_easyDetect(whichPlugin) 
{
var isItThere = 0;
if ( (whichPlugin == 'flash') || (whichPlugin == 'Flash') ) {
isItThere = WM_pluginDetect('Flash', 'swf', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash');
} else if( (whichPlugin == 'director') || (whichPlugin == 'Director') ) {
isItThere = WM_pluginDetect('Shockwave', 'dcr', 'application/x-director', 'SWCtl.SWCtl');
} else if( (whichPlugin == 'quicktime') || (whichPlugin == 'Quicktime') || (whichPlugin == 'QuickTime') ) {
isItThere = WM_pluginDetect('QuickTime', 'mov', 'video/quicktime', 'QuickTimeCheckObject.QuickTimeCheck.1');
} else if( (whichPlugin == 'realaudio') || (whichPlugin == 'Realaudio') || (whichPlugin == 'RealAudio') ) {
isItThere = (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin', 'RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)')) || (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin','rmocx.RealPlayer G2 Control')) || (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin','RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)')) || (WM_pluginDetect('RealPlayer', 'rpm', 'audio/x-pn-realaudio-plugin','RealVideo.RealVideo(tm) ActiveX Control (32-bit)'))
} else {
alert('You need to tell me which plug-in to look for, like so:\n\n' + '          WM_easyDetect(\'flash\')\n\n' + '          WM_easyDetect(\'director\')\n\n' + '          WM_easyDetect(\'quicktime\')\n\n' + '          WM_easyDetect(\'realaudio\')');
}
return isItThere;
}
function get_director(directorfile,width,height,id,fSW1,fSW2,fSW3)
{
var nl = "\n";
var director_string = "";
var hasDirector = WM_easyDetect('director');
if (hasDirector)
{
director_string +=  get_director_code(directorfile,width,height,id,fSW1,fSW2,fSW3);
} 
else 
{
director_string += "<table cellspacing=0 cellpadding=0 border=0>"+
                   "<tr><td>"+
                   "<b>We're sorry, you need the Shockwave Player to take full advantage of this page.</b>"+NL;
director_string += shockwave_install_help();
director_string += "</td></tr></table>";
}
return director_string;
}
function get_director_code(directorfile,width,height,id,fSW1,fSW2,fSW3)
{
var str = "";
/*
str += "<object " + "\n";
str += "classid=\"clsid:166B1BCA-3F9C-11CF-8075-444553540000\" width=\""+ width +"\" " + "\n";
str += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0\" " + "\n";
str += "height=\""+ height +"\" " + "\n";
str += "id=\""+ id +"\"" + "\n";
str += ">" + "\n";
str += "<param name=\"src\" value=\""+ directorfile +"\">" + "\n";
str += "<embed src=\""+ directorfile +"\" " + "\n";
str += "pluginspage=\"http://www.macromedia.com/shockwave/download/\" " + "\n";
str += "width=\""+ width +"\" height=\""+ height +"\" name=\""+ id +"\" " + "\n";
str += "type=\"application/x-director\" " + "\n";
str += ">" + "\n";
str += "</object>";
*/
str += "" + "\n";
str += "<object classid=\"clsid:166B1BCA-3F9C-11CF-8075-444553540000\" ";
str += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0\" ";
str += "ID="+id+" width="+width+" height="+height+">";
str += "<param name=src value=\""+directorfile+"\">";
str += "<param name=swRemote value=\"swSaveEnabled='true' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='true' \">";
str += "<param name=swStretchStyle value=fill>";
str += "<PARAM NAME=bgColor VALUE=#FFFFFF>"; 
var objParamStr  = fSW1 ? "<param name=sw1 value=\""+fSW1+"\">" : "";
objParamStr += fSW2 ? "<param name=sw2 value=\""+fSW2+"\">" : objParamStr;
objParamStr += fSW3 ? "<param name=sw3 value=\""+fSW3+"\">" : objParamStr;
str += objParamStr;
var embedParamStr  = fSW1 ? " sw1=\""+fSW1+"\"" : "";
embedParamStr += fSW2 ? " sw2=\""+fSW2+"\"" : embedParamStr;
embedParamStr += fSW3 ? " sw3=\""+fSW3+"\"" : embedParamStr;
str += "<embed src=\""+directorfile+"\" bgColor=#FFFFFF  width="+width+" height="+height+" swRemote=\"swSaveEnabled='true' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='true' \" swStretchStyle='fill'";  
str += "type=\"application/x-director\" pluginspage=\"http://www.macromedia.com/shockwave/download/\" "+embedParamStr+"></embed>";
str += "</object>";
return str;
}

function shockwave_install_help(){
    var  shockwave_string;
    if(SHELL_IS_FROMCD){
        shockwave_string = "You can install the Shockwave Player directly from this CD by following these simple steps:</b>"+NL+
            "<ol type=1>"+NL+
            "  <li>Browse the CD and go to the installers directory."+NL;
    // Macintosh
    if (isMac)
    {
      if(isMacOSX){
        shockwave_string += ""+NL+
              "<li>Click and drag the file <b>Shockwave_OSX_Installer.sit</b> to the desktop.</li>"+NL;
      }else{
        shockwave_string += ""+NL+
              "<li>Click and drag the file <b>Shockwave_Installer_Full.hqx</b> to the desktop.</li>"+NL;
      }
      shockwave_string += ""+NL+
              "<li>Close all browsers, then unpack the file by double-clicking the Shockwave Installer package icon on your Desktop. "+
                   "The Shockwave Installer program icon will appear.</li>"+NL+
              "<li>Double-click the Shockwave Installer program icon to start the installation process.</li>"+NL+
              "<li>Follow the instructions in the series of dialog boxes to complete the installation process.</li>"+NL;
    }
    // PC
    else if(isWin)
    {
      // Netscape & IE
        shockwave_string += ""+NL+
              "<li>Close all browser windows, then double-click the <b>Shockwave_Installer_Full.exe</b> file.</li>"+NL+
              "<li>Then follow the onscreen instructions which will step you through the rest of the installation process.</li>"+NL;
    }
    else
    {
      return "";
    }
    shockwave_string += "</ol>"+NL;
    }else{
       shockwave_string = "You can download the Shockwave Player from <a href=\"http://www.adobe.com/shockwave/download/\">"+
                          "http://www.adobe.com/shockwave/download/</a>, the Installation Instructions can be found on the "+
                          "download page.";
    }                                                                                                                                               
    return shockwave_string;
}
//get flash
function get_flash(flashfile,width,height,id){

  var hasFlash     = WM_easyDetect('flash');
  var flash_string = "";
  var nl           = "\n";
  if (hasFlash)
  {
    flash_string = get_flash_code(flashfile,width,height,id);
  }
  else
  {
    flash_string = "<b>We're sorry, you need the Flash Player to view this page.</b>"+
                   "<table cellspacing=0 cellpadding=0 border=0 width=500>"+
                   "<tr><td>";
    flash_string += flash_install_help();
    flash_string += "</td></tr></table>";                                                                                                                                                         
  }                                                                                                                                                        
  return flash_string;
}                                                                                                                                                         
function get_flash_code(flashfile,width,height,id){
                                                                                                                                                      var str = "";
   str += '<!--urls used in the movie-->\n'+
          '<!--text used in the movie-->\n'+
          '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+
          'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" '+
          'width="' + width + '" height="' + height + '" id="' + id +'" align="middle">\n'+
          '<param name="allowScriptAccess" value="sameDomain" />\n'+
          '<param name="movie" value="' + flashfile + '" />\n'+
          '<param name="quality" value="high" />\n'+
          '<param name="bgcolor" value="#ffffff" />\n'+
          '<embed src="' + flashfile + '" quality="high" bgcolor="#ffffff" '+
          'width="' + width + '" height="' + height + '" name="' + id + '" align="middle" allowScriptAccess="sameDomain" '+
          'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'+
          '</object>';
   return str;
}


function flash_install_help(){
    var  shockwave_string;
    if(SHELL_IS_FROMCD){
        flash_string = "You can install the Flash Player directly from this CD by following these simple steps:</b>"+NL+
            "<ol type=1>"+NL+
            "  <li>Browse the CD and go to the installers directory."+NL;
    // Macintosh
    if (isMac)
    {  
      if(isMacOSX){
        flash_string += ""+NL+
              "<li>Click and drag the file <b>Flash_OSX_Installer.sit</b> to the desktop.</li>"+NL;
      }else{
        flash_string += ""+NL+
              "<li>Click and drag the file <b>Flash_Installer_Full.hqx</b> to the desktop.</li>"+NL;
      }
      flash_string += ""+NL+
              "<li>Close all browsers, then unpack the file by double-clicking the Flash Installer package icon on your Desktop. "+
                   "The Flash Installer program icon will appear.</li>"+NL+
              "<li>Double-click the Flash Installer program icon to start the installation process.</li>"+NL+
              "<li>Follow the instructions in the series of dialog boxes to complete the installation process.</li>"+NL;
    }
    // PC
    else if(isWin)
    {
      // Netscape
      if (NS)
      {
        flash_string += ""+NL+
              "<li>Close all browser windows, then double-click the <b>Flash_Installer_Full_net.exe</b> file.</li>"+NL+
              "<li>Then follow the onscreen instructions which will step you through the rest of the installation process.</li>"+NL;
      }
      // IE
      else
      {
        flash_string += ""+NL+
              "<li>Close all browser windows, then double-click the file <b>Flash_Installer_Full.exe</b>.</li>"+NL+
              "<li>Then follow the onscreen instructions which will step you through the rest of the installation process.</li>"+NL;
      }
    }
    else
    {
      return "";
    }
    flash_string += "</ol>"+NL;
    }else{
        flash_string = "You can download the Flash Player from <a href=\"http://www.adobe.com/go/getflashplayer\">"+
                       "http://www.adobe.com/go/getflashplayer</a>, the Installation Instructions can be found on the "+
                       "download page.";
    }
    return flash_string;
}

fSPLoaded = true;

