function sendEvent(swf,typ,prm) { 
  thisMovie(swf).sendEvent(typ,prm); 
}
function thisMovie(swf) {
  if(navigator.appName.indexOf("Microsoft") != -1) {
    return window[swf];
  } else {
    return document[swf];
  }
}
function getUpdate(typ,pr1,pr2,swf) {
	if(typ == 'state') {
		//(0=stop,1=buffer,2=play)
		if (pr1 == 0) {
			setCookie('bg_music', 'false');
		} else if (pr1 == 2) {
			setCookie('bg_music', 'true');
		}
	}
}
function setCookie(n, v) {
	now = new Date();
	now.setTime(now.getTime() + 1000 * 60 * 60 * 24);
	document.cookie = n + '=' +  v +'; expires=' + now.toGMTString();
}

function getCookie(n) {
	var v;
	theName = n + '=';
	theCookie = document.cookie + ';';
	start = theCookie.indexOf(theName);
	if (start != -1) {
		end = theCookie.indexOf(';', start);
		v = unescape(theCookie.substring(start + theName.length, end));
	}
	return v;
}
var bg_music = getCookie('bg_music');
//if (bg_music = '') {bg_music = 'true';}