function get_flash_version() {
 var version='0.0.0';
 if(navigator.plugins && navigator.mimeTypes['application/x-shockwave-flash']){
  var plugin=navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;
  // the code below is used in SWFObject
  //var plugin=navigator.plugins['Shockwave Flash'];
  if (plugin && plugin.description) {
   // convert the description like 'Shockwave Flash 9.0 r28' into version string like '9.0.8';
   // regex is provided by SWFObject
   version=plugin.description.replace(/^[A-Za-z\s]+/, '').replace(/(\s+r|\s+b[0-9]+)/, ".");
  }
  
 } else { // in the case of Win IE
  var x='';
  try {
   // for ver.7 and later
   var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
   x=axo.GetVariable("$version");
  } catch(e) {
   try {
    // for ver.6
    axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
    x="WIN 6,0,21,0";
    /*
     * GetVariable() crashes player version 6.0.22-29, and
     * players which have those versions throws when access 
     * to AllowScriptAccess
     */
    axo.AllowScriptAccess="always";
    x=axo.GetVariable("$version");
   } catch(e) {
    if (!x.match(/^WIN/)) {
     try {
      // for 4.x,5.x
      axo=null;
      axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
      // version 3 player throws when you call GetVariale().
      x=axo.GetVariable("$version");
     } catch(e) {
      if (axo) {
       // for 3.x
       x="WIN 3,0,18,0";
      } else {
       try {
        // for 2.x
        axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
        x="WIN 2,0,0,11";
       } catch(e) {
        x="WIN 0,0,0,0";
       }
      }
     }
    }
   }
  }
  // convert ActiveX version string to our version string like '9.0.28'
  version=x.replace(/^WIN /,'').replace(/,[0-9]+$/,'').replace(/,/g,'.');
 }
 // check version string format
 // Quicktime enabled Safari returns a description in natural language
 if (version.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
  return version;
 } else {
  return '0.0.0';
 }
}

//document.write(get_flash_version());  // FlashPlayerのバージョン表示
var str=get_flash_version();
if (str.charAt(2)=="."){
  var str2 = str.charAt(0) + str.charAt(1);
} else {
  var str2 = str.charAt(0);
}
//  document.write("[" + str2 + "]");

//▼▼▼ FlashPlayerのバージョン判定 ▼▼▼
if (str2>=9){ // バージョン9以上か？
//▽▽▽ バージョンアップは不要 ▽▽▽
// JavaScript Document
var MM_contentVersion = 6;
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;
var MM_PluginVersion = words[i]; 
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag

document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
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="504" height="150">');
document.write('<PARAM name="movie" value="http://www.city.settsu.osaka.jp/add/flash/main_2010_3_091214.swf">');
document.write('<PARAM name=quality value=high>');
document.write('<EMBED src="http://www.city.settsu.osaka.jp/add/flash/main_2010_3_091214.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="504" height="150"></EMBED>');
document.write('</OBJECT>');
} else{
document.write('<img src="http://www.city.settsu.osaka.jp/add/flash/05.jpg" width="504" height="150" alt=""><P style="font-size:85%;font-weight:bold;color:#5F0000;margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;">FLASHコンテンツの閲覧にはFlashPlayerが必要です。正常に表示されない場合は<A href="http://www.macromedia.com/jp/shockwave/download/?P1_Prod_Version=ShockwaveFlash&amp;Lang=Japanese">Macromedia社サイト</A>より最新版をインストールしてください。</P>');
}
//  document.write(get_flash_version());  // FlashPlayerのバージョン表示
//△△△ バージョンアップは不要 △△△
} else {
//▽▽▽ バージョンアップが必要 ▽▽▽
  document.write('<img src="http://www.city.settsu.osaka.jp/add/flash/05.jpg" width="504" height="150" alt=""><P style="font-size:85%;font-weight:bold;color:#5F0000;margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;">FLASHコンテンツの閲覧には最新版FlashPlayerが必要です。<br><A href="http://www.macromedia.com/jp/shockwave/download/?P1_Prod_Version=ShockwaveFlash&amp;Lang=Japanese">Macromedia社サイト</A>より最新版をインストールしてください。</P>');
  document.write("現在、ご利用のFlashPlayerのバージョンは"+get_flash_version()+"です。");  // FlashPlayerのバージョン表示
//△△△ バージョンアップが必要 △△△
}
//▲▲▲  FlashPlayerのバージョン判定 ▲▲▲
