//function flashRun (src, width, height, background, style) {
function flashRun (src, width, height, background) {
	//if (getFlashV(6)) {
		//var code = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" standby="Loading..." type="application/x-shockwave-flash" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="' + width + '" height="' + height + '"' + style + ' id="' + src + '">'+
		var code = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" standby="Loading..." type="application/x-shockwave-flash" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="' + width + '" height="' + height + '">'+
		'<param name="movie" value="' + src + '" />'+
		'<param name="quality" value="high" />'+
		'<param name="allowScriptAccess" value="sameDomain" />'+
		'<param name="scale" value="noscale" />'+
		'<param name="swliveconnect" value="true" />'+
		'<param name="wmode" value="transparent">'+
		'<param name="bgcolor" value="#' + background + '" />'+
		'<embed src="' + src + '" width="' + width + '" height="' + height + '" quality="high" swLiveConnect="true" wmode="transparent" bgcolor="#' + background + '" scale="noscale" align="middle"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" name="' + src + '" />'+
		'</embed></object>';
		document.write(code);
	//}
}

function flashDetect (version) {
	if (navigator.plugins['Shockwave Flash']) {
    	plugin_descr = navigator.plugins['Shockwave Flash'].description
		return (parseInt(plugin_descr.substring(plugin_descr.indexOf(".") - 1)) >= version) 
	}
	 return false
}

function isFlash () {
	return !(navigator.userAgent.indexOf("iCab") != -1 || navigator.userAgent.indexOf("MSIE 3") != -1) 
}

function ieFlashDetect (version) {
	return new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+version)
}

function flashEnable (version) {
	if (!isFlash()) return false
	if (navigator.userAgent.indexOf("MSIE") != -1 && 
		navigator.userAgent.indexOf("Windows") != -1 && 
		navigator.userAgent.indexOf("Opera") == -1) 
		return ieFlashDetect(version)
	return flashDetect(version)
}

function getFlashV () {
	if (flashEnable(6)) return 6;
	if (flashEnable(5)) return 5;
	if (flashEnable(4)) return 4;
	return 0;
}