/*
  Original Script by Plus Five.
  Author : tak@
  URL    : http://www.plus-5.com
  Version: 2.00
	Update : 2004.11.13
	Copyright(C) Plus Five, All rights Reserved.
-------------------------------------------------*/
function P5_checkFlashPlayer() {
	var myVer = 0;
	var keyWord = "Shockwave Flash ";
	var s = 0;
	var e = 0;
	var serchStr = '';
	// for Windows IE.
	if (window.ActiveXObject) {
		for (var i=10; i>=2; i--) {
			try {
				var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + i + "');");
				if (fl) { myVer = i + '.0'; break; }
			}
			catch(e) {}
		}
	}

	// for Other Browsers.
	if (navigator.plugins && navigator.plugins.length > 0) {
		for (i=0; i<navigator.plugins.length; i++) {
			serchStr = navigator.plugins[i].description;
			if (serchStr.indexOf(keyWord) != -1) {
				s = serchStr.indexOf(keyWord);
				s += keyWord.length;
				e = serchStr.indexOf(" ", s);
				myVer = serchStr.substring(s, e);
			}
		}
	}
	return myVer;
}
function P5_putFlashMovie() {
	// Get This Arguments.
	// Version, ObjectID, Source, Width, Height, Bgcolor, DTD, FlashVars, AlternateType, Alternate...
	var args = P5_putFlashMovie.arguments;
	var dtd = 0;
	var version = args[0];
	var movieID = args[1];
	var moviePath = args[2];
	var movieWidth = args[3];
	var movieHeight = args[4];
	var bgColor = (typeof(args[5])!="undefined") ? args[5] : '#FFFFFF';
	if (typeof(args[6])!="undefined") dtd = args[6];
	var flashVarsObject = (typeof(args[7])!="undefined") ? '<param name="FlashVars" value="' + args[7] + '">\n' : '';
	var flashVarsEmbed = (typeof(args[7])!="undefined") ? ' FlashVars="' + args[7] + '"' : '';
	var flashDisabled = (P5_checkFlashPlayer() < version);
	// Output Movie.
	document.open();
	if (flashDisabled) {
		if (typeof(args[8])!="undefined" && args[8]>0) {
			var useMap = (typeof(args[10])!="undefined") ? ' usemap="#' + args[10] + '"' : '';
			if (args[8]==1) {
				if(typeof(args[11])!="undefined") movieWidth=args[11];
				if(typeof(args[12])!="undefined") movieHeight=args[12];
				document.write('<div id="' + movieID + '">\n');
				document.write('<img src="' + args[9] + '" width="' + movieWidth + '" height="' + movieHeight + '" alt=""' + useMap + ' />\n');
				document.write('</div>\n');
			} else if (args[8]==2) {
				document.write('<table id="' + movieID + '_tb"><tr><td>\n');
				document.write('<img src="' + args[9] + '" alt=""' + useMap + ' />\n');
				document.write('</td></tr></table>\n');
			}
		} else {
			document.write('<p id="get-flash"><a href="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version&#61;ShockwaveFlash&amp;Lang&#61;Japanese"><img src="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" width="88" height="31" alt="Please Download Flash Player." /></a></p>\n');
		}
	} else {
		if (dtd > 0) {
			document.write('<object id="' + movieID + '" type="application/x-shockwave-flash" data="' + moviePath + '" width="' + movieWidth + '" height="' + movieHeight + '">\n');
			document.write('<param name="movie" value="' + moviePath + '">\n');
			document.write( flashVarsObject );
			document.write('<param name="bgcolor" value="' + bgColor + '">\n');
			document.write('</object>\n');
		} else {
			document.write('<div id="' + movieID + '">\n');
			document.write('<object id="' + movieID + '-obj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version + ',0,0,0" width="' + movieWidth + '" height="' + movieHeight + '">\n');
			document.write('<param name="movie" value="' + moviePath + '">\n');
			document.write( flashVarsObject );
			document.write('<param name="bgcolor" value="' + bgColor + '">\n');
			document.write('<embed id="' + movieID + '-emb" src="' + moviePath + '"' + flashVarsEmbed + ' bgcolor="' + bgColor + '" width="' + movieWidth + '" height="' + movieHeight + '" type="application/x-shockwave-flash" pluginpage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>\n');
			document.write('</object>\n');
			document.write('</div>\n');
		}
	}
	document.close();
}
