function loadswf(){
	/*ブラウザチェック*/
	var ver = BrowserCheck();

	if(ver == "IE"){
		if (typeof document.body.style.maxHeight != "undefined") {
			writeObjectIe7();
		} else {
			writeObjectIe6();
		}
	}else{
		var swf = document.getElementById("flashbg");
		swf.style.display = "block";
	}

}

function BrowserCheck(){
	var ua = navigator.userAgent;
	ua = ua.toUpperCase();
	if(ua.indexOf("SAFARI")>-1)return "Safari";
	if(ua.indexOf("FIREFOX")>-1)return "Firefox";
	if(ua.indexOf("OPERA")>-1)return "Opera";
	if(ua.indexOf("NETSCAPE")>-1)return "Netscape";
	if(ua.indexOf("MSIE")>-1)return "IE";
	if(ua.indexOf("MOZILLA/4")>-1)return "Netscape";
	if(ua.indexOf("MOZILLA")>-1)return "Mozilla";
	return null;
}

function writeObjectIe6(){
	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="100%" height="100%" id="bg" align="" style="position:absolute;top:expression(eval(document.documentElement.scrollTop));left:0px;z-index0;">');
	document.write('<param name="movie" value="http://www.techno-tokyo.com/irukakujira/images/bg.swf">');
	document.write('<param name="quality" value="best">');
	document.write('<param name="bgcolor" value="#ffffff">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<embed src="http://www.techno-tokyo.com/irukakujira/images/bg.swf" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="bg" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write('</embed>');
	document.write('</object>');
}

function writeObjectIe7(){
	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="100%" height="100%" id="bg" align="" style="position:fixed;bottom:0px;left:0px;z-index0;">');
	document.write('<param name="movie" value="http://www.techno-tokyo.com/irukakujira/images/bg.swf">');
	document.write('<param name="quality" value="best">');
	document.write('<param name="bgcolor" value="#ffffff">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<embed src="http://www.techno-tokyo.com/irukakujira/images/bg.swf" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="bg" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write('</embed>');
	document.write('</object>');
}

function topswf(){
		/*ブラウザチェック*/
	var ver = BrowserCheck();

	if(ver == "IE"){
		writetopswf();
	}else if(ver == "Firefox"){
		writetopswf();
	}else{
		var topswf = document.getElementById("topflash");
		topswf.style.display = "block";
	}
	
}

function writetopswf(){
	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="600" height="189" id="top" align="">');
	document.write('<param name="movie" value="http://www.techno-tokyo.com/irukakujira/images/top.swf">');
	document.write('<param name="quality" value="best">');
	document.write('<param name="bgcolor" value="#ffffff">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<embed src="http://www.techno-tokyo.com/irukakujira/images/top.swf" quality="best" wmode="opaque" bgcolor="#ffffff" width="600" height="189" name="top" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write('</embed>');
	document.write('</object>');
}
