// 初期ロード時イベント
window.onload = function() {

		// フラッシュの基本サイズ
		var baseWidth = 809;
		var baseHeight = 500;
		// 拡大率
		var zoom = 1.0;
		// フラッシュの確定サイズ
		var flashWidth = 809;
		var flashHeight = 500;
		// ブラウザ表示領域幅を取得
		var bodyWidth = window.innerWidth;
		if ( !bodyWidth ) {
			if ( document.documentElement && document.documentElement.clientWidth != 0 ) {
				bodyWidth = document.documentElement.clientWidth;
			} else if ( document.body ) {
				bodyWidth = document.body.clientWidth;
			}
		}
		// 拡大率を設定
		zoom = bodyWidth / 1152;
		flashWidth = baseWidth * zoom;
		flashHeight = baseHeight * zoom;
		
		var flsc = [];
		flsc.push("<OBJECT id=\"MAINFLASH\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
		flsc.push("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#3,0,0,0\" width=\"" + flashWidth +"\" height=\"" + flashHeight + "\">");
		flsc.push("<PARAM name=\"movie\" value=\"./swf/sonicintro.swf\" />");
		flsc.push("<PARAM name=\"quality\" value=\"high\" />");
		flsc.push("<PARAM name=\"bgcolor\" value=\"white\" />");
		flsc.push("<OBJECT type=\"application/x-shockwave-flash\" data=\"./swf/sonicintro.swf\" width=\"" + flashWidth +"\" height=\"" + flashHeight + "\">");
		flsc.push("<DIV style=\"font-family:monospace;font-size:10pt;line-height:16pt;\">");
		flsc.push("当サイトでは一部にFLASHを使用しており再生にはAdobe Flash Playerが必要です。<BR />");
		flsc.push("最新のFlash Playerは以下のバナーのリンク先より入手できます。<BR />");
		flsc.push("<P>");
		flsc.push("<A href=\"http://www.adobe.com/go/getflashplayer\">");
		flsc.push("<IMG src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" />");
		flsc.push("</A>");
		flsc.push("</P>");
		flsc.push("<BR />");
		flsc.push("<A href=\"./home.html\" title=\"有限会社ソニックウェーブ ホーム\">有限会社ソニックウェーブ ホーム</A>");
		flsc.push("</DIV>");
		flsc.push("</OBJECT>");
		flsc.push("</OBJECT>");
		
		document.getElementById("index_flash").innerHTML = flsc.join("");
		
		// FLASHの設定
		swfobject.registerObject( "OPFLASH", "9.0.0", "./swf/expressInstall.swf" );
		var flashvars = {};
		var params = {wmode: "opaque"};
		var attributes = {};
		swfobject.embedSWF( "./swf/sonichome.swf", "OPFLASH", flashWidth, flashHeight, "8","./swf/expressInstall.swf", flashvars, params, attributes );
		
		// 自動遷移イベント
		setTimeout( "location.href='./home.html'", 8000 );
		
		// 画像のプリロード
		preLoad();

}