var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
function writePlayer() {	
	if ( plugin ) {
	 plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-2)) >= 6;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0) {
	 document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	 document.write('on error resume next \n');
	 document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	 document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	 document.write('<\/SCRIPT\> \n');
	}
}
writePlayer();
function writeRest(ourSwf,ourWidth,ourHeight,ourBg,msgOrPage,noFlashMsg) {
	if ( plugin ) {
	 document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	 document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ');
	 document.write(' ID=FLASH_AD WIDTH='+ourWidth+' HEIGHT='+ourHeight+'>');
	 document.write(' <PARAM NAME=movie VALUE="'+ourSwf+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE='+ourBg+'> '); 
	 document.write(' <EMBED src="'+ourSwf+'" quality=high ');
	 document.write(' swLiveConnect=FALSE WIDTH='+ourWidth+' HEIGHT='+ourHeight+' bgcolor='+ourBg);
	 document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	 document.write(' </EMBED>');
	 document.write(' </OBJECT>');
	} else { // if the right flash player version has not been found:
		if (msgOrPage==1) { document.write('<meta http-equiv="Refresh" content="1; URL='+noFlashMsg+'">'); }
		else if (msgOrPage==2) { popup(noFlashMsg,'noflash',350,350); }
		else if (msgOrPage==3) { document.write('<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">'+noFlashMsg+'</a>');  }
	}	
}