<!--
/////////////////////////////////////////////////////////////////////////
// 「Black JS」掛け金設定処理モジュール（bet.js）(C)1999 Masahiko.Nitanda

/////////////////////////////////////////////////////////////////////
// CommonRAM
BCurP = 0;	// 掛け金カーソル位置
BCoin = new Array(1, 5, 10, 20);	// 掛け金テーブル
SelF = 0;	// 選択項目 (０：「決定」、１：「スコア送信」)
BCPMax = 0;	// カーソル移動範囲

///////////////////////////////////////////////////////////////////////////
// インプリメンテーション

function IntBet()
{
	clearTimeout(tID);	// タイトルタイマークリア

	if (ON_KEY[4]){
		// Ｚボタン
		ON_KEY[4] = OFF;
		if (SelF){
			// スコア送信
			alert("Send score function!");
		}
		else{
			// 掛け金決定
			CoinSp[0].visibility = "hidden";
			SWndSp[0].visibility = SWndSp[1].visibility = "hidden";
			BCurSp.visibility = "hidden";
			for (i = 0; i < 4; i++) InvSp[i].visibility = "hidden";
			WndSp[1].visibility = "hidden";
			CPlWnd();
			
			return;
		}
	}
	else if (ON_KEY[0] && !ON_KEY[1]){
		// 左キー
		if (SelF){
			// カーソルを「決定」にする
			SWndSp[SelF].visibility = "hidden";
			SelF = 0;
			SWndSp[SelF].visibility = "visible";
		}
	}
	else if (ON_KEY[1] && !ON_KEY[0]){
		// 右キー
		if (!SelF){
			// カーソルを「スコア送信」にする
			SWndSp[SelF].visibility = "hidden";
			SelF = 1;
			SWndSp[SelF].visibility = "visible";
		}
	}
	else if (ON_KEY[2] && !ON_KEY[3]){
		// 上キー
		if (BCurP){
			// カーソル上移動
			BCurP--;
			BCurSp.top = BCurP * 35;
			ON_KEY[2] = OFF;
		}
	}
	else if (ON_KEY[3] && !ON_KEY[2]){
		// 下キー
		if (BCurP < BCPMax){
			// カーソル下移動
			BCurP++;
			BCurSp.top = BCurP * 35;
			ON_KEY[3] = OFF;
		}
	}

	tID = setTimeout("IntBet()", Int);	// タイトルタイマーセット
}

// -->

