// クッキー読込関数
function myGetCookie(myCookie){
	myCookie = "@" + myCookie + "=";
	myValue = null;
	myStr = document.cookie + ";" ;
	myOfst = myStr.indexOf(myCookie);
	if (myOfst != -1){
		myStart = myOfst + myCookie.length;
		myEnd = myStr.indexOf(";" , myStart);
		myValue = unescape(myStr.substring(myStart,myEnd));
	}
	return myValue;
}

// クッキー書出関数
function mySetCookie(myCookie,myValue,myDay){
	myExp = new Date();
	myExp.setTime(myExp.getTime()+(myDay*24*60*60*1000));
	myItem = "@" + myCookie + "=" + escape(myValue) + ";";
	myExpires = "expires="+myExp.toGMTString();
	document.cookie = myItem + myExpires;
}

function bgmkettei(bgm){
	mySetCookie("midi",bgm,365)
}
