/**
 *	<flash.js> macromedia flash detection v1.0
 *	created by paul.crabtree@oyster.com 13/03/2001
 */

var ie = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var win = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

var version = 4;	// modify to reflect version you want to detect for.

if(ie&&win)			// write out vbscript detection block only for ie/win
{
	var vb;
	vb = 	'<scr'+'ipt language="VBScript">\n';
	vb += 	'Private i, flashObj, flashVersion\n';
	vb += 	'On Error Resume Next\n';
	vb += 	'flashObj = null\n';
	vb += 	'flashVersion = 0\n';
	vb += 	'var hasFlash = false\n';
	vb += 	'For i = 5 To 1 Step -1\n';
	vb += 	'	Set flashObj = CreateObject("ShockwaveFlash.ShockwaveFlash." & i)\n';
	vb += 	'	flashInstalled = IsObject(flashObj)\n';
	vb += 	'	If flashInstalled Then\n';
	vb += 	'		flashVersion = CStr(i)\n';
	vb += 	'		Exit For\n';
	vb += 	'	End If\n';
	vb += 	'Next\n';
	vb += 	'hasFlash = (flashVersion >= '+version+')\n';
	vb += 	'</scr'+'ipt>\n';
	document.write(vb);
}
else				// use not so good javascript detection instead
{
	var hasFlash = false;
	if (navigator.plugins && navigator.plugins.length > 0)
	{
		if (navigator.plugins["Shockwave Flash"])
		{
			var flashVersion = 0;
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
			for (var i = 0; i < words.length; ++i)
			{
				if (isNaN(parseInt(words[i]))) continue; flashVersion = words[i];
			}
			if (flashVersion >= version)
			{
				var plugin = navigator.plugins["Shockwave Flash"]; var numTypes = plugin.length;
				for (j = 0; j < numTypes; j++)
				{
					mimetype = plugin[j];
					if (mimetype)
					{
						if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1)) hasFlash = true;
						if (navigator.mimeTypes["application/x-shockwave-flash"] == null) hasFlash = false;
}	}	}	}	}	}

function writeFlash(flash,image,width,height)	// use this method to write out content
{
	if(hasFlash && ie && win)	// edit to reflect content serving conditions
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width='+width+' height='+height+'>');
 		document.write('<param name="movie" value="'+flash+'"><param name="wmode" value="opaque"><param name="quality" value="high"><param name="bgcolor" value="#353546"><embed src="'+flash+'" quality="high" bgcolor="#353546" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>');
		document.write('</object>');
	}
	else document.write('<img src="'+image+'" border="0">');
}