/*______________________________________

  MK putFlash Version 0.9 r5
  Copyright (C) 2003
  Mami Komura All rights reserved.
  
  Rewrite by Toyohiro Sugita
  ST Creative Directions.
  info@stcd.jp
  Last updated on 2003.07.10

______________________________________*/

var pluginVersion;
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;
  pluginVersion = words[i]; 
 }
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
 document.open();
 document.write('<script type="text/vbscript">\n');
 document.write('on error resume next \n');
 document.write('pluginVersion = Left(Hex(Int(CreateObject("ShockwaveFlash.ShockwaveFlash").FlashVersion)),1)\n');
 document.write('<\/script>\n');
 document.close();
}

function putflash(Obj) {
 if (!Obj.src) return false;
 if (!Obj.menu) Obj.menu = "false";
 if (!Obj.altContent) Obj.altContent = "";
 var flashCanPlay = (!Obj.contentVersion) ? true : pluginVersion >= Obj.contentVersion;
 if (flashCanPlay) {
  document.open();
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
  document.write(' width="' + Obj.width + '" height="' + Obj.height + '"');
  if (Obj.id)    document.write(' id="' + Obj.id + '"');
  if (Obj.align) document.write(' align="' + Obj.align + '"');
  document.write('>');
  document.write('<param name="movie" value="' + Obj.src + '">');
  if (Obj.play)    document.write('<param name="play" value="' + Obj.play + '"' + '>');
  if (Obj.loop)    document.write('<param name="loop" value="' + Obj.loop + '"' + '>');
  if (Obj.quality) document.write('<param name="quality" value="' + Obj.quality + '">');
  if (Obj.bgcolor) document.write('<param name="bgcolor" value="' + Obj.bgcolor + '">');
  if (Obj.scale)   document.write('<param name="scale" value="' + Obj.scale + '"' + '>');
  if (Obj.salign)  document.write('<param name="salign" value="' + Obj.salign + '"' + '>');
  if (Obj.base)    document.write('<param name="base" value="' + Obj.base + '"' + '>');
  if (Obj.menu)    document.write('<param name="menu" value="' + Obj.menu + '"' + '>');
  if (Obj.wmode)   document.write('<param name="wmode" value="' + Obj.wmode + '"' + '>');
  document.write('<embed src="' + Obj.src + '" width="' + Obj.width + '" height="' + Obj.height + '"');
  if (Obj.play)    document.write(' play="' + Obj.play + '"');
  if (Obj.loop)    document.write(' loop="' + Obj.loop + '"');
  if (Obj.swLiveConnect) document.write(' swliveconnect="' + Obj.swLiveConnect + '"');
  if (Obj.quality) document.write(' quality="' + Obj.quality + '"');
  if (Obj.bgcolor) document.write(' bgcolor="' + Obj.bgcolor + '"');
  if (Obj.scale)   document.write(' scale="' + Obj.scale + '"');
  if (Obj.align)   document.write(' align="' + Obj.align + '"');
  if (Obj.salign)  document.write(' salign="' + Obj.salign + '"');
  if (Obj.base)    document.write(' base="' + Obj.base + '"');
  if (Obj.menu)    document.write(' menu="' + Obj.menu + '"');
  if (Obj.name)    document.write(' name="' + Obj.name + '"');
  document.write(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>');
  document.write('<\/object>');
 } else {
  document.write(Obj.altContent);
 }
 document.close();
}

