//////
var counterURL = "http://log1.m-telebee.jp/booth-cp/stats/";
var channel_ref = replaceText(document.referrer);
function replaceText(text) {
	while(text.lastIndexOf("&") > 0){
		text = text.replace('&', '[MlogStats]');
	}
	return text;
};
///////
function LoadPlayer(path,w,h,vmode,eid,previewkey,playmode,swfid,volume) {
	var so = new SWFObject('../swf/player.swf','mpl', w,h,'7', '#000000');
	so.addParam('allowfullscreen','true');
	so.addParam('allowscriptaccess','always');
	so.addParam("wmode", "opaque");
	so.addVariable('nocache', 'true');
	so.addVariable('file',path+'?eid='+eid+previewkey);
	so.addVariable('largecontrols','false');
	so.addVariable('showdigits','true');
	so.addVariable('displayheight',h);
	so.addVariable('width', w);
	so.addVariable('height',h);
	so.addVariable('vmode',vmode); //1;4:3 2;16:9
	so.addVariable('inti_volume',volume);
	so.addVariable('p_mode',playmode); //auto;manual
	so.addVariable('quality', 'high');
	so.addVariable('bg_color','000000');
	so.addVariable('swfid',swfid);
	so.addVariable('log_add', counterURL);
	so.addVariable('tv', 'booth');
	so.addVariable('ref', channel_ref);
	so.addVariable('page', location.href);
	so.addVariable('sc', screen.colorDepth);
	so.addVariable('sw', screen.width);
	so.write('player');
}
