var flashVer = 0;

if (navigator.plugins["Shockwave Flash"]) {
	versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".");
	var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-2, versionIndex);
	flashVer = parseInt(versionString);
} else if (navigator.userAgent && (navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Win") != -1)) {
	document.writeln('<scr'+'ipt language=vbscript\>');
	document.writeln('on error resume next');
	document.writeln('for i = 12 to 5 step -1');
	document.writeln('SFlash = "ShockwaveFlash.ShockwaveFlash." & i');
	document.writeln('hasflash = isObject(CreateObject(SFlash))');
	document.writeln('if hasflash then');
	document.writeln('flashVer = i');
	document.writeln('exit for');
	document.writeln('end if');
	document.writeln('next');
	document.writeln('</scr'+'ipt\>');
}

function printFlash() {
	if (flashVer>6) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
		document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
		document.write('width="512" height="324" id="compact_pedal_demo" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="assets/compact_pedal_demo.swf" />');
		document.write('<param name="menu" value="false" />');
		document.write('<param name="wmode" value="transparent" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="bgcolor" value="#000000" />');
		document.write('<embed src="assets/compact_pedal_demo.swf" menu="false" wmode="transparent" quality="high" ');
		document.write('bgcolor="#000000" width="512" height="324" name="compact_pedal_demo" align="middle" ');
		document.write('allowScriptAccess="sameDomain" type="application/x-shockwave-flash" ');
		document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
	} else {
		document.write('<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">');
		document.write('<img src="assets/get_flash.gif" width="512" height="324" alt="Get Flash Player"/></a>');
	}
}