// Flash Sniffer Lite
// (c) 2003-2004 by Stan Vassilev
// Version 1.01
minVer=3; maxVer=8; // version range to check

var isIE=false, isWin=false;
var i;

for (i=minVer;i<=maxVer;i++) {this['hasSWF'+i]=false;}

// Detect WinIE (VB detect)
if(navigator.appName.indexOf('Microsoft') == 0) isIE = true;
isWin = navigator.userAgent.indexOf("Win") != -1;

// Detect: Flash Version
var n=navigator;
if (n.mimeTypes && n.mimeTypes["application/x-shockwave-flash"]  && n.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
  if (n.plugins && n.plugins["Shockwave Flash"] && (versionIndex = n.plugins["Shockwave Flash"].description.indexOf(".")) != - 1) {
    var versionString = n.plugins["Shockwave Flash"].description.substring(versionIndex-1, versionIndex);
    versionIndex = parseInt( versionString );
    for (i=minVer;i<=maxVer;i++) if ( versionIndex >= i ) this['hasSWF'+i] = true;
  }
} else if (isIE && isWin) {
  document.write('<script language="VBScript">\n');
  document.write('on error resume next\n');
  for (i=minVer;i<=maxVer;i++) document.write('hasSWF'+i+' = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'")))\n');   
  document.write('</script>\n');
}

function writeFlash(movie, alternative, ver, width, height, bgcolor) {
	var cont='';
	if (this['hasSWF'+ver]) {
		cont+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
		cont+='codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver+',0,0,0" width="'+width+'" height="'+height+'">';
		cont+='<param name="movie" value="'+movie+'" />';
		cont+='<param name="bgcolor" value="'+bgcolor+'" />';
		cont+='<embed src="'+movie+'" ';
		cont+='bgcolor="'+bgcolor+'" ';
		cont+='width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		cont+='<\/object>';		
	} else {
		cont = alternative;
	}
	document.write(cont);
}