
var ua = navigator.userAgent;       // ユーザーエージェント
var nWidth, nHeight;                   // サイズ
var nHit = ua.indexOf("MSIE");     // 合致した部分の先頭文字の添え字
var bIE = (nHit >=  0);                 // IE かどうか
var bVer6 = (bIE && ua.substr(nHit+5, 1) == "6");  // バージョンが 6 かどうか
var bStd = (document.compatMode && document.compatMode=="CSS1Compat");	// 標準モードかどうか
var myHeight = 0 ;
var myMode = 0 ;		//(1)IE 6 & 標準モード,(2)その他 IE,(3)標準準拠仕様
var myHeight = 250;

function ShowSize() {
	if (bIE) {
	//IE向け処理
		if (bVer6 && bStd) {
			myMode = 1;
		} else {
			myMode = 2;
		}
	} else {
	//標準準拠仕様
		nHeight = window.innerHeight;
		myMode = 3;
	}
}

//window.onresize = window_load ;

function window_load() {
	ShowSize();
	var cflash;
	var object;
	var param;
	var embed;
if(document.all && document.all("ent_logo").innerHTML){
	//IE向け処理
	document.location.reload ();
/*	var myHTML = '<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="740" height="' + myHeight + '" id="flash_enter" >' +
	'<embed src="./top/flash_top.swf" menu="false" quality="best" scale="noscale" wmode="transparent"' +
	'style="width:740px; height:'+myHeight+'px;\" '+
	'type="application\/x-shockwave-flash" pluginspage="http:\/\/www.macromedia.com\/go\/getflashplayer">' +
	'<\/embed><\/object><\/div>';

	cflash = document.all["ent_logo"];
	cflash.innerHTML = myHTML ;
*/
}else if(document.getElementById){
	//標準準拠仕様
	cflash = document.getElementById("ent_logo");

	cflash.removeChild(document.getElementsByTagName("object").item(0));
	object=document.createElement("object");
	param=document.createElement("param");
	embed=document.createElement("embed");
	object.setAttribute("classid","clsid:clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
	object.setAttribute("codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0");
	object.setAttribute("style","width:740px; height:"+myHeight+"px; bottom:55%;");

	param.setAttribute("movie","./top/flash_top.swf");
	param.setAttribute("menu","false");
	param.setAttribute("quality","best");
	param.setAttribute("scale","noscale");
	param.setAttribute("wmode","transparent");
	param.setAttribute("id","flash_enter");
	param.setAttribute("bgcolor","#ffffff");

	embed.setAttribute("src","./top/flash_top.swf");
	embed.setAttribute("menu","false");
	embed.setAttribute("quality","best");
	embed.setAttribute("scale","noscale");
	embed.setAttribute("wmode","transparent");
	embed.setAttribute("bgcolor","#ffffff");
	embed.setAttribute("style","width:740px; height:"+myHeight+"px");
	embed.setAttribute("id","flash_enter");
	embed.setAttribute("name","flash_enter");
	embed.setAttribute("type","application/x-shockwave-flash");
	embed.setAttribute("pluginspage","http://www.macromedia.com/go/getflashplayer");

	object.appendChild(param);
	object.appendChild(embed);
	cflash.appendChild(object);
}
}

document.write('<div id="ent_logo">',
'<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="740" height="250" id="flash_index" >' ,
' <param name="movie" value="./top/flash_top.swf" />' ,
' <param name="menu" value="false" />' ,
' <param name="quality" value="high" />' ,
' <param name="wmode" value="transparent" />' ,
' <param name="bgcolor" value="#ffffff" />' ,
' <embed src="./top/flash_top.swf" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff"' ,
' width="740" height="250" name="flash_index"' ,
' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">' ,
' </embed>' ,
' <noembed> フラッシュアニメを見るにはプラグインが必要です。</noembed>' ,
'</object>' ,
'</div>' ,
'');
