/*
	Copyright David Trewern Design         :: www.dtdesign.com ::
	Unauthorised modification / use is a criminal offence, and
	will be prosecuted to the fullest extent permitted by law.
	All Rights Reserved
*/

var flash_contentVersion = 7;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	if (navigator.plugins["Shockwave Flash"]) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
			for (var i = 0; i < words.length; ++i)
			{
		if (isNaN(parseInt(words[i])))
		continue;
		var flash_PluginVersion = words[i];
			}
	var flash_CanPlay = flash_PluginVersion >= flash_contentVersion;
	}
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<scr' + 'ipt language="VBScript"\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('flash_CanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & flash_contentVersion)))\n');
	document.write('</scr' + 'ipt\> \n');
}


function buildFlash(src, width, height, bgcolor, flashvars) {

	var sFlashBg1 = "";
	var sFlashBg2 = "";
	var sFlashVars1 = "";
	var sFlashVars2 = "";

	if (bgcolor != "") {
		sFlashBg1 = ' <param name="bgcolor" value="' + bgcolor + '">';
		sFlashBg2 = ' bgcolor="' + bgcolor + '"';

	}
	
	if (flashvars != "") {
		sFlashVars1 = ' <param name="FlashVars" value="' + flashvars + '">';
		sFlashVars2 = ' FlashVars="' + flashvars + '"';
	}


	var sFlashHtml = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + width + '" height="' + height + '">';
	sFlashHtml += '<param name="wmode" value="opaque"> <param name="movie" value="' + src + '">' + sFlashVars1 + ' <param name="menu" value="false"> <param name="quality" value="high">' + sFlashBg1;
	sFlashHtml += '<embed wmode="opaque" src="' + src + '"' + sFlashVars2 + ' width="' + width + '" height="' + height + '"' + sFlashBg2 + ' menu="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
	sFlashHtml += '</object>';
	
	document.write(sFlashHtml);

}
