// Created by Mat Way on: Friday 22nd September 2006
// Purpose: to stop needing to be activated by IE from Microsoft's law suit loss :-(
// Also reduces setup time for flash files as code doesn't need to be duplicated for multi browser support

// Us the follow code on the pages that need to call the flash file
//<script language="javascript">
//	writeFile('flashFile.swf','120','120','exactfit', '');
//</script>

// Universal Button Setup - Common Shared Properties
var ShowMenu = '0';
var WindowMode = 'transparent';

var strBreak = '<div style="height: 1px; width: 1px"><img height="1" width="1"></div>'; // If Needed

function writeFile(SwfFilePath, FileWidth, FileHeight, FileScale, FlashVars)
	{
	// Primary flash button load code, specifically for IE
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	document.write('WIDTH="' + FileWidth + '" ');
	document.write('HEIGHT="' + FileHeight + '" ');
	document.write('id="' + SwfFilePath + '">');
	document.write('<PARAM NAME="movie" VALUE="' + SwfFilePath + '"> ');
	document.write('<PARAM NAME="quality" VALUE="high"> ');
	document.write('<PARAM NAME="scale" VALUE="' + FileScale + '"> ');
	document.write('<PARAM NAME="wmode" VALUE="' + WindowMode + '"> ');
	document.write('<PARAM NAME="menu" VALUE="' + ShowMenu + '"> ');
	document.write('<PARAM NAME="FlashVars" VALUE="' + FlashVars + '">');

	// This is for support of other (not IE) browsers (second lot of flash load code)
	document.write('<EMBED src="' + SwfFilePath + '" ');
	document.write('quality="high" ');
	document.write('scale="' + FileScale + '" ');
	document.write('wmode="' + WindowMode + '" ');
	document.write('WIDTH="' + FileWidth + '" ');
	document.write('FlashVars="' + FlashVars + '"');
	document.write('HEIGHT="' + FileHeight + '" ');
	document.write('MENU="' + ShowMenu + '"');
	document.write('NAME="' + SwfFilePath + '"');
	document.write('TYPE="application/x-shockwave-flash" ');
	document.write('PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write('</EMBED>');
	document.write('</OBJECT>');
	}
