function renderFlashMovie()
{
	if (false == hasFlash || installedFlashVersion < this.version)
	{
		document.write(this.altText);
		return;	
	}

	var flashTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
		' CODEBASE="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"';

	if ('' != this.id) flashTags += ' id="' + this.id + '"';
	if ('' != this.width) flashTags += ' width="' + this.width + '"';
	if ('' != this.height) flashTags += ' height="' + this.height + '"';
	if ('' != this.align) flashTags += ' align="' + this.align + '"';

	flashTags += '>';

	if ('' != this.src) flashTags += '<param name="movie" value="' + this.src + '">';
	if ('' != this.play) flashTags += '<param name="play" value="' + this.play + '">';
	if ('' != this.loop) flashTags += '<param name="loop" value="' + this.loop + '">';
	if ('' != this.quality) flashTags += '<param name="quality" value="' + this.quality + '">';
	if ('' != this.menu) flashTags += '<param name="menu" value="' + this.menu + '">';
	if ('' != this.bgcolor) flashTags += '<param name="bgcolor" value="' + this.bgcolor + '">';
	if ('' != this.allowScriptAccess) flashTags += '<param name="allowScriptAccess" value="' + this.allowScriptAccess + '">';
	if ('' != this.salign) flashTags += '<param name="salign" value="' + this.salign + '">';
	if ('' != this.wmode) flashTags += '<param name="wmode" value="' + this.wmode + '">';
	if ('' != this.flashvars) flashTags += '<param name="flashvars" value="' + this.flashvars + '">';

	flashTags += '<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"';

	if ('' != this.src) flashTags += ' src="' + this.src + '"';
	if ('' != this.id) flashTags += ' name="' + this.id + '"';
	if ('' != this.width) flashTags += ' width="' + this.width + '"';
	if ('' != this.height) flashTags += ' height="' + this.height + '"';
	if ('' != this.align) flashTags += ' align="' + this.align + '"';
	if ('' != this.salign) flashTags += ' salign="' + this.salign + '"';
	if ('' != this.play) flashTags += ' play="' + this.play + '"';
	if ('' != this.loop) flashTags += ' loop="' + this.loop + '"';
	if ('' != this.quality) flashTags += ' quality="' + this.quality + '"';
	if ('' != this.menu) flashTags += ' menu="' + this.menu + '"';
	if ('' != this.bgcolor) flashTags += ' bgcolor="' + this.bgcolor + '"';
	if ('' != this.allowScriptAccess) flashTags += ' allowScriptAccess="' + this.allowScriptAccess + '"';
	if ('' != this.wmode) flashTags += ' wmode="' + this.wmode + '"';
	if ('' != this.flashvars) flashTags += ' flashvars="' + this.flashvars + '"';
	
	flashTags += ' /></object>';
	
	document.write(flashTags);
}

function FlashObject()
{
	this.version = 8;
	this.src = '';
	this.id = '';
	this.width = '';
	this.height = '';
	this.align = '';
	this.salign = '';
	this.play = '';
	this.loop = '';
	this.quality = '';
	this.menu = '';
	this.bgcolor = '';
	this.allowScriptAccess = '';
	this.wmode = '';
	this.flashvars = '';
	this.renderMovie = renderFlashMovie;
	this.altText = '<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">Get or Upgrade Flash Player</a>';
}

// moock fpi [f.lash p.layer i.nspector]
// version: 1.3.7
// written by colin moock
// code maintained at: http://www.moock.org/webdesign/flash/detection/moockfpi/
// terms of use posted at: http://www.moock.org/terms/
var hasFlash = false;
var flash2Installed = false;
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;
var flash7Installed = false;
var flash8Installed = false;
var flash9Installed = false;
var maxVersion = 9;
var installedFlashVersion = 0;
var isFlashIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isFlashWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;

// Write vbscript detection on ie win. IE on Windows doesn't support regular
// JavaScript plugins array detection.
if(isFlashIE && isFlashWin)
{
	document.write('<scr' + 'ipt language=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
	document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  
	document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
	document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
	document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');
	document.write('<\/scr' + 'ipt\> \n'); // break up end tag so it doesn't end our script
}

if (navigator.plugins)
{
	if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])
	{
		// Set convenient references to flash 2 and the plugin description.
		var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
		var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;

		// A flash plugin-description looks like this: Shockwave Flash 4.0 r5
		var flashVersion = parseInt(flashDescription.substring(16));
		
		flash2Installed = flashVersion == 2;    
		flash3Installed = flashVersion == 3;
		flash4Installed = flashVersion == 4;
		flash5Installed = flashVersion == 5;
		flash6Installed = flashVersion == 6;
		flash7Installed = flashVersion == 7;
		flash8Installed = flashVersion == 8;
		flash9Installed = flashVersion >= 9;
	}
}

// Set installedFlashVersion to highest detected version.
for (var i = 2; i <= maxVersion; i++)
{  
	if (eval("flash" + i + "Installed") == true) installedFlashVersion = i;
}
if (0 != installedFlashVersion) hasFlash = true;
