var pluginVersion;
var plugin = (navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash']) ? navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin : 0;

if (plugin) {
	var words = navigator.plugins['Shockwave Flash'].description.split(' ');
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i]))) continue;
		pluginVersion = words[i];
	}
} else if (navigator.userAgent && (IE==true) && (WIN==true)) {
	document.open();
	document.write('<script type="text/vbscript">\n');
	document.write('on error resume next \n');
	document.write('pluginVersion = Left(Hex(Int(CreateObject("ShockwaveFlash.ShockwaveFlash").FlashVersion)),1)\n');
	document.write('<\/script>\n');
	document.close();
}

function setMovie (target,url,width,height) {
	if (pluginVersion>=8) {
		if(IE7==true) {
			document.getElementById(target).innerHTML = '<embed src="'+url+'" quality="high" wmode="opaque" bgcolor="#ffffff" menu="false" width="'+width+'" height="'+height+'" name="top" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
		} else if ((IE==true) && (WIN==true)) {
			document.getElementById(target).innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="top" align="middle"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+url+'"><param name="quality" value="high"><param name="wmode" value="opaque"><param name="bgcolor" value="#ffffff"><param name="menu" value="false"></object>';
		} else {
			document.getElementById(target).innerHTML = '<embed src="'+url+'" quality="high" wmode="opaque" bgcolor="#ffffff" menu="false" width="'+width+'" height="'+height+'" name="top" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
		}
	}
}
