
////////////////////////////////////////////////////////////////////////////////
/// 初期設定
////////////////////////////////////////////////////////////////////////////////
/* 時間
----------------------------------------------------------------------*/
var speedFlH=100;
var speedFlM=300;

/* ブロック名
----------------------------------------------------------------------*/
var flCnt='FLOAT_CONT'; //コンテンツ枠
var flBas='FLOAT_BASE'; //コンテンツ背景枠



////////////////////////////////////////////////////////////////////////////////
/// メインプロトコル
////////////////////////////////////////////////////////////////////////////////

/*
オープン処理
----------------------------------------------------------------------*/
function flOpn(path){

	/*コンテンツ背景展開
	--------------------------------------------------*/
	$('body').append('<div id="'+flBas+'" title="閉じる"></div>\n');
	$('#'+flBas).hide();
	$('#'+flBas).fadeIn(speedFlM);
	fulHt(flBas);

	/*select要素対策
	--------------------------------------------------*/
	if(UAuIE6) $('select').hide();

	/*コンテンツ展開
	--------------------------------------------------*/
	$('body').append('<div id="'+flCnt+'"></div>\n');
	var srcC='\n';
	srcC+='<div>\n';
	srcC+='<div id="flashcontent"></div>\n';
	srcC+='<div class="button" title="閉じる"><p class="buttonInner"><img src="/cf/flash/btn_def.png" width="90" height="35" class="flCntClose" onmouseover="imgRoll(this,1);" onmouseout="imgRoll(this,0);" /></p></div>\n';
	srcC+='</div>\n';
	$('#'+flCnt).html(srcC);
	$('#'+flCnt).hide();
	$('#'+flCnt).fadeIn(speedFlM);

	/*flashロード命令
	--------------------------------------------------*/
	var flashvars={CONTENT_PATH:path};
	swfobject.embedSWF("/cf/flash/movie.swf","flashcontent","640","400","8.0.0","/cf/flash/expressInstall.swf",flashvars,params,attributes);
	floatC(flCnt);

	/*コンテンツクローズ
	--------------------------------------------------*/
	$('#'+flBas).click(function(){flCls();});
	$('#'+flCnt+' .button').click(function(){flCls();});
}

/*
クローズ処理
----------------------------------------------------------------------*/
function flCls(){
	$('#'+flCnt).fadeOut(speedFlM);
	setTimeout(function(){
		$('#'+flCnt).remove();
		$('#'+flBas).fadeOut(speedFlH);
		if(UAuIE6) $('select').show();
	},speedFlM);
	setTimeout(function(){
		$('#'+flBas).remove();
	},speedFlM*2);
}


////////////////////////////////////////////////////////////////////////////////
/// flash処理
////////////////////////////////////////////////////////////////////////////////

var flashvars = {
	CONTENT_PATH:'rtmp://fms30-cache02.stream.ne.jp/pokemon-game/_definst_/100226/otoko_yokoku.flv'
};
var params = {
	scale:'noScale',
	salign:'lt',
	menu:'false',
	allowfullscreen :'true',
	wmode:'transparent'
};
var attributes = {};


////////////////////////////////////////////////////////////////////////////////
/// height100%演算
////////////////////////////////////////////////////////////////////////////////

function fulHt(id){
	var idB=document.getElementById(id);
	var dB=(document.documentElement&&document.documentElement.clientHeight)?
	document.documentElement:document.body;
	var bH=(document.all&&!window.opera)?dB.clientHeight:window.innerHeight;
	var cH=dB.scrollHeight;
	idB.style.height=(cH>bH)?cH+'px':bH+'px';
}


////////////////////////////////////////////////////////////////////////////////
/// 中央フロート座標演算
////////////////////////////////////////////////////////////////////////////////

function floatC(id){
	var idB=document.getElementById(id);
	var dB=(document.documentElement&&document.documentElement.clientHeight)?
	document.documentElement:document.body;
	/* ウィンドウ表示領域サイズ
	----------------------------------------------------------------------*/
	var bW=(document.all&&!window.opera)?dB.clientWidth:window.innerWidth;
	var bH=(document.all&&!window.opera)?dB.clientHeight:window.innerHeight;
	/* スクロール量
	----------------------------------------------------------------------*/
	var sW=(document.all&&!window.opera)?dB.scrollLeft:window.scrollX;
	var sH=(document.all&&!window.opera)?dB.scrollTop:window.scrollY;
	/* フロートブロックサイズ
	----------------------------------------------------------------------*/
	var oW=idB.scrollWidth;
	var oH=idB.scrollHeight;
	/* 処理
	----------------------------------------------------------------------*/
	var dLeft=(bW-oW)/2+sW;
	var dTop=(bH-oH)/2+sH;
	idB.style.left=(dLeft>0)?dLeft+'px':0;
	idB.style.top=(dTop>0)?dTop+'px':0;
}


////////////////////////////////////////////////////////////////////////////////
/// ブラウザ判定
////////////////////////////////////////////////////////////////////////////////

var UA=navigator.userAgent;

/*
IE 6以下判定
----------------------------------------------------------------------*/
var UAuIE6=UA.slice(UA.indexOf("MSIE ")+"MSIE ".length,UA.indexOf("MSIE ")+"MSIE ".length+1)<7;







