/*#########################
 TOP Flash
#########################*/

function RunFlash(){
	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,'.');
	}

	if (version.match(/^[0-7].[0-9]+\.[0-9]+$/)) {
		DD = new Date();
		Seconds = DD.getSeconds();
		if(Seconds%3 == 0){
			document.write('<img src="img/top/img_main.jpg" border="0" usemap="#Map" class="img_top">\n');
			document.write('<map name="Map" id="Map">\n');
			document.write('<area shape="rect" coords="1,128,316,271" href="about/mcframe01.html" />\n');
			document.write('<area shape="rect" coords="317,128,632,271" href="about/mcframe02.html" />\n');
			document.write('<area shape="rect" coords="632,128,949,271" href="about/mcframe03.html" />\n');
			document.write('<area shape="rect" coords="796,103,813,118" href="about/mcframe01.html" />\n');
			document.write('<area shape="rect" coords="816,103,834,118" href="about/mcframe02.html" />\n');
			document.write('<area shape="rect" coords="836,103,853,118" href="about/mcframe03.html" />\n');
			document.write('<area shape="rect" coords="857,103,874,118" href="about/mcframe04.html" />\n');
			document.write('<area shape="rect" coords="877,103,894,118" href="about/mcframe05.html" />\n');
			document.write('<area shape="rect" coords="897,103,915,118" href="about/mcframe06.html" />\n');
			document.write('<area shape="rect" coords="917,103,935,118" href="about/mcframe07.html" />\n');
			document.write('<area shape="rect" coords="1,351,231,396" href="/solution/speed.html" />\n');
			document.write('<area shape="rect" coords="241,351,471,396" href="/solution/tco.html" />\n');
			document.write('<area shape="rect" coords="481,352,711,397" href="/solution/market.html" />\n');
			document.write('<area shape="rect" coords="721,351,953,399" href="/solution/reduction.html" />\n');
			document.write('</map>\n');
		}else if(Seconds%3 == 1){
			document.write('<img src="img/top/img_main2.jpg" border="0" usemap="#Map2" class="img_top">\n');
			document.write('<map name="Map2" id="Map2">\n');
			document.write('<area shape="rect" coords="1,39,591,266" href="/special/inter/kyowa_01.html" />\n');
			document.write('<area shape="rect" coords="1,351,231,396" href="/solution/speed.html" />\n');
			document.write('<area shape="rect" coords="241,351,471,396" href="/solution/tco.html" />\n');
			document.write('<area shape="rect" coords="481,352,711,397" href="/solution/market.html" />\n');
			document.write('<area shape="rect" coords="721,351,953,399" href="/solution/reduction.html" />\n');
			document.write('</map>\n');
		}else{
			document.write('<img src="img/top/img_main3.jpg" border="0" usemap="#Map3" class="img_top">\n');
			document.write('<map name="Map3" id="Ma3p">\n');
			document.write('<area shape="rect" coords="1,39,590,268" href="http://www.to-be.asia/global_scm/" target="_blank" />\n');
			document.write('<area shape="rect" coords="1,351,231,404" href="/solution/speed.html" />\n');
			document.write('<area shape="rect" coords="241,351,471,400" href="/solution/tco.html" />\n');
			document.write('<area shape="rect" coords="481,351,711,403" href="/solution/market.html" />\n');
			document.write('<area shape="rect" coords="721,351,963,408" href="/solution/reduction.html" />\n');
			document.write('</map>\n');
		}
	}else{
		document.write('<object data="img/top/mcFrameTop.swf" width="100%" height="395" type="application/x-shockwave-flash">\n');
		document.write('<param name="allowFullScreen" value="true" />\n');
		document.write('<param name="movie" value="img/top/mcFrameTop.swf" />\n');
		document.write('<param name="wmode" value="transparent">\n');
		document.write('</object>\n');
	}
}


