[Flash+js+CSS]swfのサイズをダイナミックに変更する

サンプルページ  サンプルページ2

html
<body bgcolor="#ffffff" onload="init_swfsize()">
<div id='flashcontent'></div>
<script type="text/javascript">
<!--
var installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
var requiredver=9;
var requiredver2=45;
if(installedVer['major'] >=requiredver && installedVer['rev'] >=requiredver2
	|| installedVer['major'] >requiredver){
	var so = new SWFObject("swf/main.swf", "swf0", "100%", "100%", "9.0.45", "#000000");
	so.addParam("allowScriptAccess", "sameDomain");
	so.addParam("base", "swf/");
	so.write("flashcontent");
}else{
	//プラグインバージョンが低いときの処理
}
// -->
Javascript
function init_swfsize(){
	target_content=document.getElementById("flashcontent");
}
function set_swfsize_w(target_size){
	target_content.style.width=target_size;
}
function set_swfsize_h(target_size){
	target_content.style.height=target_size;
}
function set_swfsize(target_w, target_h){
	target_content.style.width=target_w;
	target_content.style.height=target_h;
}
CSS
#flashcontent{
	width:400px;
	height:400px;
}