﻿//SWFファイル表示スクリプト　Ver.1.20
//2006/8/6 Programed By Rikiya Takazawa

//設定ここから--------------------

//モード設定（代替画像表示モード=0,ページリダイレクトモード=1）
var Mode = 0;

//出力するswfファイルのバージョン設定
var FlashVarsion = "8";

//設定ここまで、以下編集禁止--------------------

function checkFlash(varsion){

	var browser = navigator.appName;

	if (browser != "Microsoft Internet Explorer" ){
		for(i = 0; i < navigator.plugins.length; i++) {
			if(navigator.plugins[i].name ==  "Shockwave Flash"){ 
				if(parseInt(navigator.plugins["Shockwave Flash"].description.substring(navigator.plugins["Shockwave Flash"].description.indexOf(".")-2)) < varsion ){ return 2; }
				else{ return 0; }
			}
		}
		return 1;
	}else{ return 0; }

}

function writeSWF(flashObj , Bg , Width , Height , noFlash ){

	var flag = checkFlash(FlashVarsion);

	if( flag == "0"){
		document.open();
			document.write('<div id=\"flash\">');
			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\" width=\"' + Width + '\" height=\"' + Height + '\"">');
			document.write('<param name=\"movie\" value=\"' + flashObj + '\">');
			document.write('<param name=\"quality\" value=\"high\">');
			document.write('<param name=\"bgcolor\" value=\"#'+ Bg +'\">');
			document.write('<param name=\"menu\" value=\"false\">');
			document.write('<param name=\"wmode\" value=\"transparent\">');
			document.write('<param name=\"scale\" value=\"noscale\">');
			document.write('<embed src=\"' + flashObj + '\" quality=\"high\" bgcolor=\"#'+ Bg +'\" wmode=\"transparent\" width=\"' + Width + '\" height=\"' + Height + '\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" menu=\"false\" scale=\"noscale\"></embed>');
			document.write('</object>');
			document.write('</div>');
		document.close();
	}else if(Mode == "1"){
		location.href = noFlash ;
	}else if(Mode == "0"){
		document.open();
		document.write('<img src=\"' + noFlash + '\" width=\"' + Width + '\" height=\"' + imgHeight + '\" border=\"0\" alt=\"\">');
		document.close();

	}
}
writeSWF('./common/swf/index.swf','','100%','320','./img/topimg.jpg');