var is_Flash;
var useDirector = (navigator.mimeTypes && 
	navigator.mimeTypes["application/x-shockwave-flash"] &&
	navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) ?
	navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (navigator.userAgent.indexOf("MSIE") != -1){
	document.write(
			'<scr' + 'ipt language=VBScript>' + '\n' +
			'Dim hasPlayer, playerversion' + '\n' +
			'hasPlayer = false' + '\n' +
			'playerversion = 10' + '\n' +
			'Do While playerversion > 0' + '\n' +
				'On Error Resume Next' + '\n' +
				'hasPlayer = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & playerversion)))' + '\n' +
				'If hasPlayer = true Then Exit Do' + '\n' +
				'playerversion = playerversion - 1' + '\n' +
			'Loop' + '\n' +
			'is_FlashVersion = playerversion' + '\n' +
			'is_Flash = hasPlayer' + '\n' +
			'<\/sc' + 'ript>'
		);
}

function displayFlash(flashNo, flashYes, flashWidth, flashHeight, flashNoXTRA){
	if ( useDirector || is_Flash ) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + flashWidth + '" height="' + flashHeight + '"><param name="movie" value="' + flashYes + '"><param name="quality" value="high"><embed src="' + flashYes + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + flashWidth + '" height="' + flashHeight + '"></embed></object>');
	} else { 
		document.write('<img src="' + flashNo + '" width="' + flashWidth + '" height="' + flashHeight + '" border=0 ' + flashNoXTRA + '>');
	}
}
