// 初期設定  // プラグインページの言語設定
var plugin, pluginVer = 0;
var pluginspages = new Array();
pluginspages[0] = "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";
pluginspages[1] = "http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; // Jp

// Flash Player プラグインのチェック
// (Equiv: NN3/NN4/Moz/MacIE5+)
plugin = pfFlashPlayerObject();
function pfFlashPlayerObject() {
 var results = ((navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ?
  navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);
 return results;
}
if (plugin){
	//20081020 Firefoxでプラグインのバージョンを10以上にしたときに表示されない現象の対応済み
	pluginVer = parseInt(plugin.description.substring(plugin.description.indexOf(".") -2));
}
//フラッシュが無い場合のアクション
function pfAltAction(Obj) {
	(Obj.nonFlashSRC) ? writeAlert() : location.href = Obj.nonFlashHREF;
}

function putflash(Obj) {
 document.open();
//alert("is opera ? "+navigator.userAgent.indexOf("Opera"));
//オペラの判別
if ((window.opera && navigator.userAgent.indexOf("Opera") > -1) || !window.opera) {

  if (Obj.file && Obj.width && Obj.height && Obj.id) {
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="' + Obj.id + '" width="' + Obj.width + '" height="' + Obj.height + '" name="' + Obj.id + '">');
   document.write('<param name="movie" value="' + Obj.dir + Obj.file + '">');
   document.write('<param name="quality" value="' + Obj.quality + '">');
   document.write('<param name="bgcolor" value="' + Obj.bgcolor + '">');
   document.write('<param name="menu" value="' + Obj.menu + '"' + '>');
   document.write('<param name="wmode" value="opaque">');
   if (Obj.salign) document.write('<param name="salign" value="' + Obj.salign + '"' + '>');
   //activeXをoffにしている場合の対応、win/ieのみ
   if ((navigator.appVersion.indexOf('Win',0) != -1 && navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1) && !window.opera) writeAlert();
    
   if (plugin && pluginVer >= Obj.requiredVer && !((navigator.userAgent.indexOf("Gecko") != -1) && Obj.moz_exec != 1) || (navigator.appVersion.indexOf('Mac',0) != -1 && navigator.appVersion.indexOf('MSIE 4.',0) != -1 && Obj.macie4exec == 1) || (navigator.appVersion.indexOf('Mac',0) != -1 && navigator.appVersion.indexOf('MSIE 3.',0) != -1 && Obj.macie4exec == 1)) {
   document.write('<embed src="' + Obj.dir + Obj.file + '" menu="' + Obj.menu + '" quality="' + Obj.quality + '" swLiveConnect="' + Obj.swLiveConnect + '" bgcolor="' + Obj.bgcolor + '" width="' + Obj.width + '" height="' + Obj.height + '"');
   if (Obj.salign) document.write(' salign="' + Obj.salign + '"');
   document.write(' type="application/x-shockwave-flash" pluginspage="' + pluginspages[Obj.language] + '" name="' + Obj.id + '"><\/embed><br>');
   } else {
    if (!(navigator.appVersion.indexOf('Win',0) != -1 && navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1 && !window.opera)) {
     pfAltAction(Obj);
   }
  }
   document.write('<\/object>');
  }
 } else {
 alert(window.opera +" : "+ Obj.opera_exec);
  pfAltAction(Obj);
 }
 document.close();
}