﻿/******************************************************************************
	初期設定
******************************************************************************/
var gsTickerSwf_AN = "http://www.ajinomoto.com.pe/ajinomotonew/img/280_90.swf";

var bpTickerId_AN = "280_90";


//――――――――――――――――――――――――――――――――――――――
// Flashプラグインチェック
//――――――――――――――――――――――――――――――――――――――
var plugin = 0;
if(navigator.mimeTypes &&
   navigator.mimeTypes["application/x-shockwave-flash"] &&
   navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
	if(navigator.plugins && navigator.plugins["Shockwave Flash"]){
		plugin = 1;
	}
}
else if(navigator.userAgent && (navigator.userAgent.indexOf("MSIE") >= 0) &&
	(navigator.userAgent.indexOf("Win") >= 0)){
	document.write('<SCRIPT LANGUAGE="VBScript"\> \n');
	document.write('on error resume next \n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('</SCRIPT\> \n');
}
if(plugin){
	Make_Flashbanner();
}else{
	document.write('<a href="http://www.ajinomoto.com/features/movie/index.html"><img src="http://www.ajinomoto.com/features/movie/banner/280_90.jpg" alt="ShortMovie" style="border:none" /></a>');
}


/******************************************************************************
	入力		なし
	出力		document.writeによるHTML出力
******************************************************************************/
function Make_Flashbanner(){
	var sTickerUrl = gsTickerSwf_AN;
	
	var sHtml = "";
	sHtml += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="232" height="90" id="' + bpTickerId_AN + '" align="middle">';
	sHtml += '<param name="allowScriptAccess" value="always" />';
	sHtml += '<param name="movie" value="' + sTickerUrl + '" />';
	sHtml += '<param name="quality" value="high" />';
	sHtml += '<param name="bgcolor" value="#ffffff" />';
	sHtml += '<param name="wmode" value="transparent" />';
	sHtml += '<embed wmode="transparent" src="' + sTickerUrl + '" quality="high" bgcolor="#ffffff" width="232" height="90" name="' + bpTickerId_AN + '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	sHtml += '</object>';
	
	document.write(sHtml);
}
