///////////////////////////////////////////////////////////////////////////////
//
// Wide Hi-P版、Sales版、Web版 全対応
//（変数contents_type により判別する）
//
///////////////////////////////////////////////////////////////////////////////

/*-----------------------------------------------------------------------------
    GUI < For Flash! >
-----------------------------------------------------------------------------*/


var send_init_data_flg = false;		// 初期化データ送信済フラグ


/******************************************************************************
    Send Data To Flash
******************************************************************************/
function sendToFlash(key, arg){
  try{
    menu.menuFla.SetVariable("\_root."+key, arg);
  }catch(e){
    setTimeout("sendToFlash('"+key+"','"+arg+"');",1000);
  }
}

function sendToFlash_head(key, arg){
  try{
    header.HeaderFla.SetVariable("\_root."+key, arg);
  }catch(e){
    setTimeout("sendToFlash_head('"+key+"','"+arg+"');",1000);
  }
}

function sendToFlash_ctrlhelp(key, arg){
  try{
    contents.ctrlhelpFla.SetVariable("\_root."+key, arg);
  }catch(e){
    setTimeout("sendToFlash_ctrlhelp('"+key+"','"+arg+"');",1000);
  }
}

function sendToFlash_help(key, arg){
  try{
    contents.helpFla.SetVariable("\_root."+key, arg);
  }catch(e){
    setTimeout("sendToFlash_help('"+key+"','"+arg+"');",1000);
  }
}


function sendToScrVFlash(key, arg){
  try{
    contents.scrVFla.SetVariable("\_root."+key, arg);
  }catch(e){
    setTimeout("sendToScrVFlash('"+key+"','"+arg+"');",1000);
  }
}

function sendToScrHFlash(key, arg){
  try{
    contents.scrHFla.SetVariable("\_root."+key, arg);
  }catch(e){
    setTimeout("sendToScrHFlash('"+key+"','"+arg+"');",1000);
  }
}



function sendEnableProc()   { sendToFlash("wait_stopProcflg","0");  }
function sendNotEnableProc(){ sendToFlash("wait_stopProcflg","1");  }
function sendDataComp()     { sendToFlash("DataSet_flg","1");}

function sendBtnData(){
  sendToFlash("strBtnData.id",keyArr.join("|"));
  sendToFlash("strBtnData.pic",imageArr.join("|"));
  sendToFlash("strBtnData.picSize",picsizeArr.join("|"));
  sendToFlash("strBtnData.SelectID",selectedArr.join("|"));
  sendToFlash("strBtnData.nonSelectiveID",disabledArr.join("|"));
  sendToFlash("strBtnData.price",priceArr.join("|"));
  if ( othersArr.length>0 ) sendToFlash("strBtnData.others",othersArr.join("|"));
  sendToFlash("strBtnData.url",urlArr.join("|"));

}

function sendSelBtnData(){
  sendToFlash("strBtnData.SelectID",selectedArr.join("|"));
  sendToFlash("strBtnData.nonSelectiveID",disabledArr.join("|"));
}

function sendPDData(){
  sendToFlash("strPDData.item",pdArr.join("|") );
  sendToFlash("strPDData.sel" ,pdSelArr.join("|") );
}


// -------------------------------------------------------------- CreateBtn case NoneBtnType
function sendNoneBtn(){
  keyArr    = new Array();
  imageArr  = new Array();
  selectedArr = new Array();
  disabledArr = new Array();
  picsizeArr  = new Array();
  priceArr  = new Array();
  othersArr  = new Array();
  urlArr  = new Array();
  
  keyArr.push("");
  imageArr.push("");
  selectedArr.push("");
  disabledArr.push("");
  picsizeArr.push("");
  priceArr.push("");
  othersArr.push("");
  urlArr.push("");

}

// -------------------------------------------------------------- SelectBtn
function sendSelbtnStates(btnKey){
  SelectedBtn(btnKey);

  sendSelBtnData();
  sendDataComp();
}

/******************************************************************************
    初期化データ送信
******************************************************************************/
function sendInitData() {

  // 2回目以降は無視(Flashから何回も呼ばれる可能性がある)
  if ( send_init_data_flg ) return;

  // 送信済みフラグ設定
  send_init_data_flg = true;

  // コンテンツタイプ
  sendToFlash("contents_type", contents_type );
  sendToFlash("combi_type", combi_type );

  // メニュー、タグ情報
  var arrEna = new Array();
  for ( var i=0; i<Btn_Main.length; i++ ) {
    arrEna.push( getMainSubEnaArr(i).join(".")+","+getMainTagArr(i).join(".") );
  }
  var arrTag = new Array();
  for ( var i=0; i<Btn_Tag.length; i++ ) {
    arrTag.push( getTagKey(i)+","+getTagNam(i)+","+getTagFlaAreaNam(i)+","+getTagFlaAreaNam2(i)+","+getTagFlaNamArr(i).join(".") );
  }
  sendToFlash("Btn_Tag", arrTag.join("|") );
  sendToFlash("aryEna_submenu", arrEna.join("|") );

  // 個別機能
  sendToFlash("filter_flg", FILTER_FLG　? "1" : "0" );
  sendToFlash("seq_flg", SEQ_FLG ? "1" : "0" );
  sendToFlash("spec_col", SPEC_COL );
  sendToFlash("parts_tx_flg", PARTS_TX_FLG ? "1" : "0" );
  sendToFlash("GraTag", GRA_TAG );
  sendToFlash("print_btn_ena", PRINT_BTN_ENA ? "1" : "0" );
  sendToFlash("request_btn_ena", REQUEST_BTN_ENA ? "1" : "0" );
  sendToFlash("TOP_BTN_ENA", TOP_BTN_ENA ? "1" : "0" );
  sendToFlash("CARSEL_BTN_ENA", CARSEL_BTN_ENA ? "1" : "0" );
  sendToFlash("CLOSE_BTN_ENA", CLOSE_BTN_ENA ? "1" : "0" );

  //sales版メニュー初期状態
  if(contents_type==1){
	if(combi_type == 1){	//i-crop  商談メモから戻ってきた場合sub_menuとtagで初期表示メニュー決定
		sendToFlash("\_root.strNow_SubMenu",	start_submenu);		// サブメニュー(0=Grade 1=Color 2=Parts)
		sendToFlash("\_root.strNow_Tag",		start_tag);			// タブ([Grade]/[Parts]は常に0, [Color]は 0=Exterior 1=Interior)
	}
	else if(combi_type == 2){	//ai21  フレームなし画面から戻ってきた場合全メニュー有効
		if(repageflg){
			sendToFlash("\_root.f_transMode", "0");		//repageflg　フレームなし画面から戻ってきたかどうか　index.htm

		}
	}
  }

	// ＢＧＭ設定
  if(contents_type==3) {
	if( parent.g_now_bgm==false ){
      now_bgm = false;
      sendToFlash("bgm_init_flg", now_bgm ? "1" : "0" );
    }
  }



  // データ送信完了フラグ

  sendToFlash("init_data_flg", "1" );

}

/******************************************************************************
    Flash側の初期化完了(Wide Hi-Pのみ)
******************************************************************************/
function finishInitMenuFla() {
	// 初期表示
	ctrl_ClickMenu(now_menu);
}


/******************************************************************************
    Flashをボタンデータ受け取り待機状態にする
　　type: 1=ボタンデータ、2=選択状態のみ、3=プルダウンメニュー
******************************************************************************/
function sendWait(type){
  sendToFlash("waitType",type);
  menu.menuFla.TGotoLabel("\_root.rev_WaitMC","loop");
  menu.menuFla.TPlay("\_root.rev_WaitMC");
}


/******************************************************************************
    タグ選択状態切り替え
******************************************************************************/
function sendTag(tag){

  var tag_idx = getTagIdx(getMainTag(now_menu,now_Submenu));

  for ( var i=0; i<getTagFlaNamArr(tag_idx).length; i++ ) {
    var mc = "\_root.btnArea_menu.btnAreaTagSpace."+getTagFlaNamArr(tag_idx)[tag];
    var f = ( i==tag ) ? 2 : 1;
    menu.menuFla.TGotoFrame(mc,f);
  }
}




/******************************************************************************
    headerBtnClick From Flash
******************************************************************************/
function sendHeaderbtn(btnKey){
  HeaderProc(parseInt(btnKey));
}

function sendEnableProc_header()   { sendToFlash_head("wait_stopProcflg","0"); sendToFlash_head("wait_stopProcflg_help","0"); }
function sendNotEnableProc_header(){ sendToFlash_head("wait_stopProcflg","1"); sendToFlash_head("wait_stopProcflg_help","1"); }


//3D QUALITY ボタンの制御(web,salesのみ)
//ヘッダボタンの無効化
function change3DQualityBtn(){
	//「INTERIOR」、「GALLERY」→無効
	if((now_menu==2) || (now_menu==3) ||(getTagNamMS(now_menu,now_Submenu))=="Spec"){
			header.HeaderFla.TGotoLabel("headerBtn_QUALITY", "invalid");		//→無効ボタン
	}
	else{
	//alert(QualityFlg);
		if(QualityFlg==true){
			header.HeaderFla.TGotoLabel("headerBtn_QUALITY", "valid");		//→有効ボタン
			header.HeaderFla.TGotoLabel("headerBtn_QUALITY.Btn", "p_Quality");	//画質優先
		}
		else if(QualityFlg==false){
			header.HeaderFla.TGotoLabel("headerBtn_QUALITY", "valid");		//→有効ボタン
			header.HeaderFla.TGotoLabel("headerBtn_QUALITY.Btn", "p_Speed");	//速度優先
		}
			//この後、coが読み込まれ、SetColoaded_type関数内で3DQUALITYが反映される
	}
}

//商談メモ ボタンの制御(salesのみ)
//ヘッダボタンの無効化
function changememoBtn(){
	//「Tour」「INTERIOR」、「GALLERY」「Background」→無効
	if((now_menu==1) || (now_menu==2) || (now_menu==3) || (now_menu==4) ||((getTagNamMS(now_menu,now_Submenu))=="Spec")){
			header.HeaderFla.TGotoLabel("headerBtn_MEMO", "invalidBtn");		//→無効ボタン
	}
	else{
	//alert(QualityFlg);


			header.HeaderFla.TGotoLabel("headerBtn_MEMO", "memoOff");		//→有効ボタン

	}

}



/******************************************************************************
    alert表示
******************************************************************************/
function sendShowAlert(t) {
  if ( t>=100 ) {
    sendToFlash("alert_mes", alert_mes );
  }
  sendToFlash("alert_flg", ( t>99 ) ? 100 : t );
}

/******************************************************************************
    印刷
******************************************************************************/
function sendPrint() {
  menu.menuFla.TGotoLabel("\_root.print_WaitMC","play");
  menu.menuFla.TPlay("\_root.print_WaitMC");
}

function sendPrintEna(flg) {
  if ( PRINT_BTN_ENA ) {
    var frame = flg ? "off" : "invalid";
    menu.menuFla.TGotoLabel("\_root.printBtn",frame);
  }
}



/******************************************************************************
    フルスクリーン
******************************************************************************/
function sendFullScreen(flg) {
  if (flg) {
	 sendToFlash("fullscreen_flg", 1);
	 this.menu.menuFla.TGotoLabel("\_root.headerLoop.headerBtn_FULLSCREEN", "off_def");
  } else {
	 sendToFlash("fullscreen_flg", 0);
	 this.menu.menuFla.TGotoLabel("\_root.headerLoop.headerBtn_FULLSCREEN", "off");
  }
}



/******************************************************************************
    3D領域クリックによる回転停止機能のフラグ受け渡し
******************************************************************************/
function sendfirstStopRotFlg(flg){
	if(flg=="0"){
		//"0"しか送信されないが、一応チェック
		Quit_firstStopRot();
		//javascriptのフラグも連動
		firstStopRotFlg = false;
	}
	else{
		alert("FLASH/javascript連携エラー");
	}
}

//回転アイコン切替(web,salesのみ)
function ChangeRotIcon(rotact){
	menu.menuFla.SetVariable("\_root.strRotFlg", rotact);		//●●flashplayer6の場合、javascriptからボタンを移動できないため、値を渡す
}



/******************************************************************************
    3DTour中止 (引数keyは無視)
******************************************************************************/
function stop3DTour(key){

	// ツアー中なら中断
	// （ツアー開始時、tourNum==0の時に車の向きを変えるが、その段階では中断させない）
    if ( tourTimeFlg && tourNum>0 && stoppingTour==0 ) {
		stoppingTour = 1;
		triggerAction("tour-stop",tmp);		// ESTIMA Hi-P
		triggerAction("Tour_stop",tmp);		// ESTIMA Web,Sales
		triggerAction("stopTour",tmp);		// 今後

        if ( contents_type==3 ) {
          if ( tourTimer1!=null ) {
              ExTx_closeMsg(tourNum-1);
              clearTimeout(tourTimer1);
              tourTimer1=null;
          }
          if ( tourTimer2!=null ) {
              clearTimeout(tourTimer2);
              tourTimer2=null;
          }
        }
	}
}



/******************************************************************************
    Receive Data From Flash
******************************************************************************/
// -------------------------------------------------------------- selectMenuTag_fla(arg) arg="menu,sub,tag"
function selectMenuTag_fla(arg){
  aryMT = new Array();
  aryMT = arg.split(",");
  selectMenuTag(parseInt(aryMT[0]),parseInt(aryMT[1]),parseInt(aryMT[2]));
}

// -------------------------------------------------------------- selectBtn_fla(btnKey)
function selectBtn_fla(arg){  selectBtn(parseInt(arg));}



/******************************************************************************
    Keeping selectPos
******************************************************************************/
function FromF_selectP(arg){
  var ary = arg.split(",");

  structPos=parseInt(ary[0]);
  movePos=parseInt(ary[1]);

}


/******************************************************************************
    Get PageInfo
******************************************************************************/
function FromF_nowPageinfo(arg){ 
  var ary = arg.split(",");

  now_PageBtnNum_H=parseInt(ary[0]);
  now_PageBtnNum_W=parseInt(ary[1]);
  now_page=parseInt(ary[2]);
}


/******************************************************************************
    合計金額
******************************************************************************/
function sendEstimate(){
  var strTotal = PNtoCamma(estTotal_tax);
  sendToFlash("Total",strTotal);
}


/******************************************************************************
    パーツ価格注記の表示／非表示
******************************************************************************/
function sendPriceNote(show){
  var frame = ( show==0 ) ? "hide" : "show"+show;
  menu.menuFla.TGotoLabel("\_root.price_note",frame);
}


/******************************************************************************
    Navi
******************************************************************************/
function sendNavi(frame){
  now_navi=frame;
  menu.menuFla.TGotoLabel("\_root.navi",frame);
  menu.menuFla.TPlay("\_root.navi");
}



/******************************************************************************
    諸元表Flash
******************************************************************************/

function sendScrVRollOver(pos){	
	contents.scrVFla.SetVariable("\_root.clickPos", pos);
	contents.scrVFla.TGotoLabel("\_root.overMC","RollOver");
	contents.scrVFla.TPlay("\_root.overMC");
}
function sendScrVClick(pos){
	contents.scrVFla.SetVariable("\_root.clickPos", pos);
	contents.scrVFla.TGotoLabel("\_root.clickMC","Click");
	contents.scrVFla.TPlay("\_root.clickMC");
}



/******************************************************************************
    Interior Flash
******************************************************************************/
function sendCloseIntText(pos){														// 訴求
  var n = "Tx00";
  contents.document.all.item(n).TGotoLabel("\_root","change");
  contents.document.all.item(n).TPlay("\_root");
}

function sendIntRollOver(pos){																// 2D MainFlash
	contents.intePanoFla.SetVariable("\_root.clickPos", pos);
	contents.intePanoFla.TGotoLabel("\_root.overMC","RollOver");
	contents.intePanoFla.TPlay("\_root.overMC");
}
function sendIntClick(pos){																	// 2D MainFlash
	contents.intePanoFla.SetVariable("\_root.clickPos", pos);
	contents.intePanoFla.TGotoLabel("\_root","click");
	contents.intePanoFla.TPlay("\_root");
}
function sendIntClose(){																	// 2D MainFlash
	contents.intePanoFla.TGotoLabel("\_root","closeText");
	contents.intePanoFla.TPlay("\_root");
}

function sendIntSeatPlay() {
  contents.intePanoFla.TGotoLabel("\_root.playMC", "play");
  contents.intePanoFla.TPlay("\_root.playMC");
}

function sendIntSeatStop() {
  contents.intePanoFla.TGotoLabel("\_root.playMC", "stop");
  contents.intePanoFla.TPlay("\_root.playMC");
}




/******************************************************************************
    Click / RollOver / RollOut    ///Menu Flash
******************************************************************************/

// ----------------------------------------------------Click
function ctrl_ClickMenu(id){
  sendToFlash("ctrl_click_menu", getMainKey(id));
  sendToFlash("ctrl_click_Type", "M");
  sendToFlash("BtnClick_flg", "1");
}
function ctrl_ClickSub(id){
  sendToFlash("ctrl_click_sub", id);
  sendToFlash("ctrl_click_Type", "S");
  sendToFlash("BtnClick_flg", "1");
}
function ctrl_ClickBtn(idx){
  sendToFlash("ctrl_click_btn", idx);
  sendToFlash("ctrl_click_Type", "B");
  sendToFlash("BtnClick_flg", "1");
}
function ctrl_ClickAlertBtn(idx){
  sendToFlash("ctrl_click_alertbtn", idx);
  sendToFlash("ctrl_click_Type", "A");
  sendToFlash("BtnClick_flg", "1");
}


// ----------------------------------------------------RollOver
function ctrl_RollOverMenu(id){
  sendToFlash("ctrl_Vpos", getMainKey(id));
  sendToFlash("ctrl_Rover_Type", "M");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OVER","RollOver");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OVER");
}
function ctrl_RollOverSub(id){
  sendToFlash("ctrl_Vpos", id);
  sendToFlash("ctrl_Rover_Type", "S");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OVER","RollOver");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OVER");
}
function ctrl_RollOverBtn(idx){
  sendToFlash("ctrl_Vpos", idx);
  sendToFlash("ctrl_Rover_Type", "B");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OVER","RollOver");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OVER");
}
function ctrl_RollOverAlertBtn(idx){
  sendToFlash("ctrl_Vpos", idx);
  sendToFlash("ctrl_Rover_Type", "A");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OVER","RollOver");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OVER");
}


// ----------------------------------------------------RollOut
function ctrl_RollOutMenu(id){
  sendToFlash("ctrl_Upos", getMainKey(id));
  sendToFlash("ctrl_Rout_Type", "M");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OUT","RollOut");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OUT");
}
function ctrl_RollOutSub(id){
  sendToFlash("ctrl_Upos", id);
  sendToFlash("ctrl_Rout_Type", "S");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OUT","RollOut");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OUT");
}
function ctrl_RollOutBtn(idx){
  sendToFlash("ctrl_Upos", idx);
  sendToFlash("ctrl_Rout_Type", "B");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OUT","RollOut");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OUT");
}
function ctrl_RollOutAlertBtn(idx){
  sendToFlash("ctrl_Upos", idx);
  sendToFlash("ctrl_Rout_Type", "A");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OUT","RollOut");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OUT");
}


// ----------------------------------------------------SelectOut[3DTourの処理終了後のみ使用]
function SelectOutBtn(idx){
  sendToFlash("ctrl_Upos", idx);
  sendToFlash("ctrl_Rout_Type", "SB");
  menu.menuFla.TGotoLabel("\_root.ctrl_WaitMC_OUT","RollOut");
  menu.menuFla.TPlay("\_root.ctrl_WaitMC_OUT");
}


/******************************************************************************
    Click / RollOver / RollOut    ///Menu Flash ["N":Navi]["S":scroll]["F":footer]["T":tag]["nS":scroll処理のみ]
******************************************************************************/
// ----------------------------------------------------Click
function NSF_sendClick(no,type,btnName){
  sendToFlash("checkMode", type);
  sendToFlash("clickBtnName", btnName);
  menu.menuFla.TGotoLabel("\_root.navi.navi_WaitMC_CLICK","play");
  menu.menuFla.TPlay("\_root.navi.navi_WaitMC_CLICK");
}

// ----------------------------------------------------RollOver
function NSF_sendRollOver(no,type,btnName){
  sendToFlash("checkModeV", type);
  sendToFlash("overBtnName", btnName);
  menu.menuFla.TGotoLabel("\_root.navi.navi_WaitMC_OVER","play");
  menu.menuFla.TPlay("\_root.navi.navi_WaitMC_OVER");
}

// ----------------------------------------------------RollOut
function NSF_sendRollOut(no,type,btnName){
  sendToFlash("checkModeU", type);
  sendToFlash("offBtnName", btnName);
  menu.menuFla.TGotoLabel("\_root.navi.navi_WaitMC_OUT","play");
  menu.menuFla.TPlay("\_root.navi.navi_WaitMC_OUT");
}

// ----------------------------------------------------RollOver/////////////
function menu_header2_sendRollOver(no){
  sendToFlash("overBtnName", getHead2Btn(no));
  menu.menuFla.TGotoLabel("\_root.headerLoop.ctrl_WaitMC_OVER","play");
  menu.menuFla.TPlay("\_root.headerLoop.ctrl_WaitMC_OVER");
}

// ----------------------------------------------------RollOut//////////////
function menu_header2_sendRollOut(no){
  sendToFlash("offBtnName", getHead2Btn(no));
  menu.menuFla.TGotoLabel("\_root.headerLoop.ctrl_WaitMC_OUT","play");
  menu.menuFla.TPlay("\_root.headerLoop.ctrl_WaitMC_OUT");
}


/******************************************************************************
    Click / RollOver / RollOut    ///header Flash
******************************************************************************/
// ----------------------------------------------------Click
function header_sendClick(no){
  sendToFlash_head("clickedBtnName", getHeadBtn(no));
  sendToFlash_head("flg_states", "click");
}

// ----------------------------------------------------RollOver
function header_sendRollOver(no){
  sendToFlash_head("overBtnName", getHeadBtn(no));
  header.HeaderFla.TGotoLabel("\_root.ctrl_WaitMC_OVER","play");
  header.HeaderFla.TPlay("\_root.ctrl_WaitMC_OVER");
}

// ----------------------------------------------------RollOut
function header_sendRollOut(no){
  sendToFlash_head("offBtnName", getHeadBtn(no));
  header.HeaderFla.TGotoLabel("\_root.ctrl_WaitMC_OUT","play");
  header.HeaderFla.TPlay("\_root.ctrl_WaitMC_OUT");
}


// ----------------------------------------------------CtrlHELP CLOSE
function header_sendCtrlHelpClose(){
  sendToFlash("viewCtrlHelp", "0");
  if( ctrlFlg==0 )      menu_header2_sendRollOut(5);
  else if( ctrlFlg==1 ) menu_header2_sendRollOver(5);
}

// ----------------------------------------------------HELP CLOSE
function header_sendHelpClose(){
  sendToFlash("viewHelp", "0");
  if( ctrlFlg==0 )      menu_header2_sendRollOut(0);
  else if( ctrlFlg==1 ) menu_header2_sendRollOver(0);
}

// ----------------------------------------------------BGM
function header_sendBGMStart(mode){
  sendToFlash("header_now_menu", now_menu);
  if( mode==true )        menu.menuFla.TGotoLabel("\_root.headerLoop.bgmMC","play");
  else if( mode==false )  menu.menuFla.TGotoLabel("\_root.headerLoop.bgmMC","stop");
  menu.menuFla.TPlay("\_root.headerLoop.bgmMC");
  
}

// ----------------------------------------------------3D Quality Invalid
function header_sendQualityInvalid(mode){
  quality_invalid = mode;
  var flg=0;
  headerBtnNum = Btn_Header.length-1;
  if( mode ){ headerBtnNum--; flg = 1;}
  sendToFlash("inv_quality", flg);
  menu.menuFla.TGotoLabel("\_root.headerLoop.invalid_WaitMC","play");
  menu.menuFla.TPlay("\_root.headerLoop.invalid_WaitMC");
  
}

// ----------------------------------------------------FullScreen Invalid
function header_sendFullScreenInvalid(mode){
	fullscreen_invalid = mode;
	var flg=0;
	if(mode) {flg = "1";}
	sendToFlash("inv_fs", flg);
	menu.menuFla.TGotoLabel("\_root.headerLoop.invalid_WaitMC","play");
	menu.menuFla.TPlay("\_root.headerLoop.invalid_WaitMC");
}


/******************************************************************************
    Click / RollOver / RollOut    ///ctrlHELP Flash
******************************************************************************/
// ----------------------------------------------------Click
function ctrlHELP_sendClick(){
  sendToFlash_ctrlhelp("flg_states", "close");
}

function HELP_sendClick(){
  sendToFlash_help("flg_states", "close");
}


