// FIRST INIT
function firstInit () {
    imgArray = firstInit.arguments;
    overImg = new Array ();
    
    for (i=0; i<(imgArray.length); i++) {
        overImg[i] = new Image().src = imgArray[i];
    }
}

// ROLLOVER
function changeImages (imgId, imgSrc) {
    if (document.getElementById) {
        document.getElementById(imgId).src = imgSrc;
    }
}


// プラグインチェック
var contentVersion = 6;
var FlashCanPlay = false;
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 PluginVersion = words[i]; 
  }
  var FlashCanPlay = PluginVersion >= contentVersion;
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion))) \n');
  document.write('</SCR' + 'IPT\> \n');
}

// FLASH
function AddFlash(movie,width,height,val,color,menu,quality,loop,id,align) {
  if (val == "val") {
      var loc = window.location;
      var xml = "";
      var val = "NowURL=" + loc + "&XMLFile=" + xml;
  }
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
  document.write('codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=6,0,0,0" ');
  document.write('width="'+width+'" ');
  document.write('height="'+height+'" ');
  document.write('id="'+id+'" ');
  document.write('align="'+align+'">\n');
  if(val == "novals"){
    document.write('<param name="movie" value="'+movie+'" />\n');
  }else{
    document.write('<param name="movie" value="'+movie+'?'+val+'" />\n');
    document.write('<param name="FlashVars" value="'+val+'" />\n');
  }
  document.write('<param name="menu" value="'+menu+'" />\n');
  document.write('<param name="quality" value="'+quality+'" />\n');
  document.write('<param name="loop" value="'+loop+'" />\n');
  document.write('<param name="bgcolor" value="#'+color+'" />\n');
  document.write('<embed ');
  if(val == "novals"){
    document.write('src="'+movie+'" ');
  }else{
    document.write('src="'+movie+'?'+val+'" ');
    document.write('FlashVars="'+val+'" ');
  }
  document.write('menu="'+menu+'" ');
  document.write('quality="'+quality+'" ');
  document.write('loop="'+loop+'" ');
  document.write('bgcolor="#'+color+'" ');
  document.write('width="'+width+'" ');
  document.write('height="'+height+'" ');
  document.write('name="'+id+'" ');
  document.write('align="'+align+'" ');
  document.write('type="application/x-shockwave-flash" ');
  document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
  document.write('</object>\n');
}

