var FLASH_MINVERSION = 6;
var flash_versions = 20;
var flash = new Object();
flash.installed=false;
flash.version='0.0';

if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash.installed = true;
			break;
		}
	}
}
else if (window.ActiveXObject) {
	for (x = 2; x <= flash_versions; x++) {
		try {
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if(oFlash) {
				flash.installed = true;
				flash.version = x + '.0';
			}
		}
		catch(e) {}
	}
}

var MM_FLASHCANPLAY = flash.installed && parseInt(flash.version) >= FLASH_MINVERSION;

function insertFlash(flashsrc, width, height, flashvars, bgcolor, imagesrc, imagetitle)
{
	if ( MM_FLASHCANPLAY )
	{
	  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+FLASH_MINVERSION+',0,0,0" width="'+width+'" height="'+height+'" id="top_header" align="middle">');
	  document.write('  <param name="allowScriptAccess" value="sameDomain"/>');
	  document.write('  <param name="movie" value="'+flashsrc+'"/>');
	  document.write('  <param name="quality" value="high"/>');
	  document.write('  <param name="bgcolor" value="'+bgcolor+'"/>');
	  document.write('  <param name="FlashVars" value="'+flashvars+'"/>');
	  document.write('<embed src="'+flashsrc+'" FlashVars="'+flashvars+'" quality="high" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" name="top_header" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>');
	  document.write('</object>');
	}
	else
	  document.write('<img src="'+imagesrc+'" alt="'+imagetitle+'" title="'+imagetitle+'" width="'+width+'" height="'+height+'" border="0"/>');
}
