// JavaScript Document
// クライアントのブラウザのタイプを検出
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;
// Flash Player プラグインのバージョン情報を検出するには、JavaScript ヘルパーが必要です
function JSGetSwfVer(i){
	// プラグイン配列内の Flash プラグインについて NS/Opera バージョンが 3 以上かどうかを確認します
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
      	} else {
			flashVer = -1;
		}
	}
	// MSN/WebTV 2.6 は Flash 4 をサポートしています
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 は Flash 3 をサポートしています
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// それ以前のバージョンの WebTV は Flash 2 をサポートしています
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	// 他のすべての状況では検出できません
	else {
		
		flashVer = -1;
	}
	return flashVer;
} 
// パラメータを指定せずに呼び出した場合、この関数は浮動小数値を返します。
// これは、Flash Player のバージョンまたは 0.0 になります。
// 例 : Flash Player 7r14 の場合は 7.14 を返します
// reqMajorVer を指定して呼び出した場合、reqMinorVer、reqRevision は、それ以上のバージョンが使用可能なときには true を返します
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision){
 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
   	// 最新のバージョンを見つけるまで、バージョンを遡ってループします	
	for (i=25;i>0;i--) {	
		if (isIE && isWin && !isOpera) {
			versionStr = VBGetSwfVer(i);
		} else {
			versionStr = JSGetSwfVer(i);		
		}
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];
			
			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
			versionNum        = parseFloat(versionString);
        	// メジャーバージョンは要求されたメジャーバージョン以上であり、かつマイナーバージョンは要求されたマイナーバージョン以上の場合
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
	return (reqVer ? false : 0.0);
}






// -----------------------------------------------------------------------------
/*var oeTags = 
'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'
+ 'width="760" height="346"'
+ 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" >'
+ '<param name="movie" value="/top.swf" /><param name="quality" value="high" />'
+ '<embed src="/top.swf" quality="high"'
+ 'width="760" height="346" name="/top.swf"'
+ 'play="true"'
+ 'loop="false"'
+ 'quality="high"'
+ 'allowScriptAccess="sameDomain"'
+ 'type="application/x-shockwave-flash"'
+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
+ '</embed>'
+ '</object>';*/


var productContent = 
'<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="img/product_noflash.jpg" alt="製品紹介:物流と生産現場に利便性の高いシステム製品" width="779" height="301" /></a>';

var solutionContent = 
'<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="img/solution_noflash.jpg" alt="ソリューション:物流と生産現場の精度と生産性を向上" width="779" height="301" /></a>';

var overseaContent = 
'<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="img/oversea_noflash.jpg" alt="海外展開:世界の物流と生産の効率向上に挑戦します。" width="779" height="301" border="0" /></a>';

var indexContent = 
'<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="img/top_noflash.jpg" alt="変化する物流と生産現場に対応するソリューションを提供" width="779" height="301" /></a>';


var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);


function aioiproductswf()
{
	if(hasRightVersion)
	{
		if (AC_FL_RunContent == 0) {
		alert("このページでは \"AC_RunActiveContent.js\" が必要です。Flash の [コマンド] メニューから [アクティブ コンテンツ アップデートを適用] を実行して \"AC_RunActiveContent.js\" を HTML の出力フォルダにコピーします。");
	} else {
		//document.write(oeTags);
		// Flash ムービーの埋め込み
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
			'width', '779',
			'height', '301',
			'src', 'product',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'product',
			'bgcolor', '#FFFFFF',
			'name', 'product',
			'menu', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'product',
			'salign', ''
			); //end AC code
	}
	} else { 
		document.write(productContent);
	}
}

function aioisolutionswf()
{
	if(hasRightVersion)
	{
		if (AC_FL_RunContent == 0) {
		alert("このページでは \"AC_RunActiveContent.js\" が必要です。Flash の [コマンド] メニューから [アクティブ コンテンツ アップデートを適用] を実行して \"AC_RunActiveContent.js\" を HTML の出力フォルダにコピーします。");
	} else {
		//document.write(oeTags);
		// Flash ムービーの埋め込み
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
			'width', '779',
			'height', '301',
			'src', 'solution',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'solution',
			'bgcolor', '#FFFFFF',
			'name', 'solution',
			'menu', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'solution',
			'salign', ''
			); //end AC code
	}
	} else { 
		document.write(solutionContent);
	}
}

function aioioverseaswf()
{
	if(hasRightVersion)
	{
		if (AC_FL_RunContent == 0) {
		alert("このページでは \"AC_RunActiveContent.js\" が必要です。Flash の [コマンド] メニューから [アクティブ コンテンツ アップデートを適用] を実行して \"AC_RunActiveContent.js\" を HTML の出力フォルダにコピーします。");
	} else {
		//document.write(oeTags);
		// Flash ムービーの埋め込み
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
			'width', '779',
			'height', '301',
			'src', 'oversea',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'oversea',
			'bgcolor', '#FFFFFF',
			'name', 'oversea',
			'menu', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'oversea',
			'salign', ''
			); //end AC code
	}
	} else { 
		document.write(overseaContent);
	}
}

function aioiindexswf()
{
	if(hasRightVersion)
	{
		if (AC_FL_RunContent == 0) {
		alert("このページでは \"AC_RunActiveContent.js\" が必要です。Flash の [コマンド] メニューから [アクティブ コンテンツ アップデートを適用] を実行して \"AC_RunActiveContent.js\" を HTML の出力フォルダにコピーします。");
	} else {
		//document.write(oeTags);
		// Flash ムービーの埋め込み
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
			'width', '779',
			'height', '301',
			'src', 'index',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'index',
			'bgcolor', '#FFFFFF',
			'name', 'index',
			'menu', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'index',
			'salign', ''
			); //end AC code
	}
	} else { 
		document.write(indexContent);
	}
}




function xmasswf()
{
	if(hasRightVersion)
	{
		if (AC_FL_RunContent == 0) {
		alert("このページでは \"AC_RunActiveContent.js\" が必要です。Flash の [コマンド] メニューから [アクティブ コンテンツ アップデートを適用] を実行して \"AC_RunActiveContent.js\" を HTML の出力フォルダにコピーします。");
	} else {
		//document.write(oeTags);
		// Flash ムービーの埋め込み
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
			'width', '545',
			'height', '85',
			'src', 'xmas',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'xmas',
			'bgcolor', '#FFFFFF',
			'name', 'xmas',
			'menu', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'xmas',
			'salign', ''
			); //end AC code
	}
	} else { 
		document.write(indexContent);
	}
}