// 関数flashPutを定義して引数url、width、heightを設定。これによって複数のswfファイル配置に対応させる事ができる。

function flashPut(url,width,height){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+width+"' height='"+height+"'>");
document.write("<param name='movie' value='"+url+"'>");
document.write("<param name='quality' value='high'>");
document.write("<param name='wmode' value='transparent'>");
document.write("<embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent' width='"+width+"' height='"+height+"'></embed>");
document.write("</object>");
}

//flashエリアのレイヤー制御
function fla_layer_off(){
    document.getElementById('wrap-fla').style.display = 'none';
}

//黒隠しレイヤー
function move_mask() {
  document.getElementById('wrap-fla2').style.display = 'none';
}



//クッキーの読み込み
var ar = document.cookie.split(";");
ccval = "off"; // 初期値
for (i= 0; i < ar.length; i++){
	var pair = ar[i].split("=");
        if (pair[0] == "swfcookie" || pair[0] == " swfcookie" ){
		ccval = pair[1];
	}
}

//クッキーのセット
function setCookie(name, cval){
	var path = "";
	var lmtmin = 1440;
	var d = new Date();
	d.setTime(d.getTime() + (1000*60*lmtmin));
	var cookie = name + "=" + cval + "; expires=" +d.toGMTString();
	if(path) cookie += "; path=" +path;
	document.cookie = cookie;
}

