//Rev 3.20
//now var UseFlash is the detected FlashPlayer version
var UseFlash=0;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
var uag= navigator.userAgent; 
var agt=uag ? uag.toLowerCase() : null;
var fMax= 18, fVer;
// another version:
// useFlash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))
for(fVer=fMax; fVer>=4; fVer--) {
 if (plugin && plugin.description) {
  var desc= plugin.description; var fs= "Flash "; var len1= fs.length; var p1= desc.indexOf("Flash "); 
  var ver= parseInt(desc.substring(p1+len1));
  if(ver>=fVer) UseFlash= fVer; 
 }
 else if (agt && agt.indexOf("msie")>=0 &&
 (agt.indexOf("windows ")>=0 && agt.indexOf("windows 3.")< 0)) {
document.write('<SCRIPT LANGUAGE=VBScript\>\n');
document.write('on error resume next \n');
document.write('var Flashmode\n');
document.write('FlashMode = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+fVer+'"))\n');
document.write('If FlashMode = True Then\n');
document.write('UseFlash= fVer\n');
document.write('Else\n');
document.write('UseFlash=0\n');
document.write('End If\n');
document.write('</SCRIPT\>');
 } else { UseFlash=0; }
 if(UseFlash) break;
}

function loadFlash(movie, id, W, H, flash_bg, noflash) {
 return loadFlashByVer(movie, id, W, H, flash_bg,5,noflash);
}

function loadFlashByVer(movie, id, W, H, flash_bg, fVersion,noflash) {
 var str='';
 if ( UseFlash>= fVersion) {
str+='<object id='+id+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
str+='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+UseFlash+
',0,2,0" width='+W+' height='+H+' vspace="0" hspace="0" border=0>';
str+='<param name=movie value="'+movie+'"><param name=quality value=high>';
str+='<embed name='+id+' src="'+movie+'" quality=high ';
str+='pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"  ';
str+=' scale=exactfit wmode=opaque border=0 bgcolor='+flash_bg+' ';
str+='width='+W+' height='+H+' swLiveConnect=true MAYSCRIPT AllowScriptAccess="always">';
str+='</embed></object><br>';
 }
 else {  
  if(typeof(noflash)=='undefined') noflash= "<img src='/img3/1.gif' border=0 width="+W+" heifgt="+H+">";
  str= noflash;
 }
 return str;
}

function hookFStoIE(id) {
 if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 
 && navigator.userAgent.indexOf("Windows") != -1 
 && navigator.userAgent.indexOf("Windows 3.1") == -1 && UseFlash)
 {
  document.write('<SCRIPT LANGUAGE=VBScript\>\n');
  document.write('on error resume next \n');
  document.write('Sub '+id+'_FSCommand(ByVal command, ByVal args)\n');
  document.write('  call '+id+'_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
 }
}