function writeFlash(fpath,w,h,alt) {
	
	var alternateContent = alt ? alt : 'Some content on this page requires the latest <a href=\"http://www.macromedia.com/go/getflashplayer\">Flash Player</a>.';

	var fpath = fpath.replace(/.swf/,'');
	var fname = fpath.split('/').pop();

	if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		if(hasRightVersion) {  // if we've detected an acceptable version
			// embed the flash movie
			AC_FL_RunContent(
				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ requiredMajorVersion + ',0,0,0',
				'width', w,
				'height', h,
				'src', fpath,
				'quality', 'high',
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'align', 'middle',
				'play', 'true',
				'loop', 'true',
				'scale', 'showall',
				'wmode', 'transparent',
				'devicefont', 'false',
				'id', fname,
				'bgcolor', '#ffffff',
				'name', fname,
				'menu', 'true',
				'allowScriptAccess','sameDomain',
				'allowFullScreen','false',
				'movie', fpath,
				'salign', ''
				); //end AC code
		} else {  // flash is too old or we can't detect the plugin
			document.write(alternateContent);  // insert non-flash content
		}
	}
}

/*
function writeFlash() {

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('width="757" height="467" id="entry"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">');
document.write('<param name="movie" value="uploaded/flash/entry.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#2a60aa" />');
document.write('<embed src="uploaded/flash/entry.swf" quality="high" bgcolor="#2a60aa" ');
document.write('width="757" height="467" name="entry" align="middle"');
document.write('play="true"');
document.write('loop="false"');
document.write('quality="high"');
document.write('allowScriptAccess="sameDomain"');
document.write('type="application/x-shockwave-flash"');
document.write('pluginspage="http://www.macromedia.com/go/getflashplayer">');
document.write('</embed>');
document.write('</object>');

}

function writeFlash2() {

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('width="757" height="467" id="entry"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">');
document.write('<param name="movie" value="uploaded/flash/entry2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#2a60aa" /><param name="allowScriptAccess" value="sameDomain" />');
document.write('<embed src="uploaded/flash/entry2.swf" quality="high" bgcolor="#2a60aa" ');
document.write('width="757" height="467" name="entry" align="middle"');
document.write('play="true"');
document.write('loop="false"');
document.write('quality="high"');
document.write('allowScriptAccess="sameDomain"');
document.write('type="application/x-shockwave-flash"');
document.write('pluginspage="http://www.macromedia.com/go/getflashplayer">');
document.write('</embed>');
document.write('</object>');

}*/