function writeFlash( swf , width , height )
{
  var htm = ""
  htm+="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'"
  htm+="        codebase='http://download.macromedia.com/pub/shockwave/"
                    htm+="cabs/flash/swflash.cab'"
  htm+="        width   = " + width
  htm+="        height  = " + height + ">"
  htm+="<param  name    = movie value=" + swf + ">"
  htm+="<param  name    = quality value=high>"
  htm+="<param  name    = scale value=noscale>"
  htm+="<embed  src     = " + swf + " "
  htm+="        quality = high  "
  htm+="        width   = "+ width
  htm+="        height  = " + height
  htm+="		scale	= noscale"
  htm+="        type    = 'application/x-shockwave-flash' "
  htm+="        pluginspage='http://www.macromedia.com/go/getflashplayer'>"
  htm+="</embed>"
  htm+="</object>"
  
  document.write(htm)
}

// ロールオーバー
function smartOver() {
smartRollover('container'); //ロールオーバーを適用させたい箇所のIDを指定
}
function smartRollover(idName) {
if(document.getElementsByTagName) {
var images = document.getElementById(idName).getElementsByTagName("img");
for(var i=0; i < images.length; i++) {


if(images[i].getAttribute("src") != null) {
	if(images[i].getAttribute("src").match(/_n\./))
		{
			fileName = new Array(images[i].getAttribute("src").replace("_n.", "_r."));
			preImages = new Array();
			for (j=0; j<fileName.length; j++)
			{
				preImages[j] = new Image();
				preImages[j].src = fileName[j]; //「_r」の画像をプリロード
			}
			
			images[i].onmouseover = function() {
				this.setAttribute("src", this.getAttribute("src").replace("_n.", "_r.")); //マウスオーバーで_off→_on
			}
			images[i].onmouseout = function() {
				this.setAttribute("src", this.getAttribute("src").replace("_r.", "_n.")); //マウスが離れたら_on→_off
			}
		}
	}
}
}
}
if(window.addEventListener) {
window.addEventListener("load", smartOver, false); //実行
}
else if(window.attachEvent) {
window.attachEvent("onload", smartOver);
}
else{
window.onload = smartOver;
}