/*
	予想規則の性能表
*/

// データ格納配列はHTMLファイルで定義する。配列は以下のとおり。
// aRH(16), aRP(16), aPP(16)


var p, q, r, sU;

// 初期化
function initSL() {
	for (p = 0; p <= 15; p++) {
		aRH[p] = 0;
		aRP[p] = 0;
		aPP[p] = 0;
	}
}

// 表示情報の指定
function loadSL(nRow, nRH, nRP, nPP) {
	aRH[nRow-1] = nRH;
	aRP[nRow-1] = nRP;
	if (nRow <= 12) { aPP[nRow-1] = nPP }
}

// リスト表示：サブセット
function subSL(nRow) {
	// 的中率
	q = aRH[nRow-1];
	r = (q * 10) % 10;
	sU = Math.floor(q) + "<TT>.</TT>" + r;
	document.write("<TD align=right>" + sU + "％</TD>");
	// 回収率
	q = aRP[nRow-1];
	r = (q * 10) % 10;
	sU = Math.floor(q) + "<TT>.</TT>" + r;
	document.write("<TD align=right>" + sU + "％</TD>");
	// 的中馬券の平均払戻金額
	if (nRow <= 12) {
		sU = aPP[nRow-1];
		document.write("<TD align=right>" + sU + "円</TD>");
	}
}

// リスト表示：メイン
function showSL(nStaff, sCom, sLD) {
	// 見出し
	document.write("<TABLE><TR><TD width=790><HR width=790>");
	if (sLD != "") {
		sU = "最終学習完了日： <B>" + sLD + "</B>";
	} else {
		sU = "デフォルトルール： 2006年６月30日現在";
	}
	document.write("<SPAN id=s014><B>■予想規則の性能</B><TT>　　　</TT>※" + sU + "</SPAN><BR>");
	document.write("<TT>　</TT><SPAN style='color:#404040'>予想スタイル： "+ sCom + "</SPAN></TD></TR>");
	// ポートレート指定
	sU = "<IMG src='../../gif/staff/" + nStaff + "01.gif'>"
	// リストヘッダー
	document.write("<TR><TD align=center>");
	document.write("<TABLE cellspacing=0 cellpadding=0><TR><TD align=right>");
	document.write("<TABLE border=1 cellspacing=0>");
	// １行目
	document.write("<TR><TD rowspan=3>" + sU + "</TD>");
	document.write("<TD id=s604 colspan=6 style='text-align: center; height: 28'>実装性能： 全ての予想公開競走</TD>");
	document.write("<TD id=s603 colspan=6 style='text-align: center'>実装性能： 重賞競走予想</TD>");
	document.write("<TD id=s605 colspan=3>参考： ２勝式上位評価</TD></TR>");
	// ２行目
	document.write("<TR>");
	for (p = 1; p <= 2; p++) {
		document.write("<TD id=s601 colspan=3 style='text-align: center'>標準予想</TD><TD id=s602 colspan=3 style='text-align: center'>標準予想＋拡張予想</TD>");
	}
	document.write("<TD id=s606>券種</TD><TD id=s606>的中率</TD><TD id=s606>回収率</TD></TR>");
	// ３行目
	document.write("<TR>");
	for (p = 1; p <= 4; p++) {
		document.write("<TD id=s606>的中率</TD><TD id=s606>回収率</TD><TD id=s606><SPAN style='font-size: 10px'>平均</SPAN>払戻金</TD>");
	}
	document.write("<TD id=s401>単勝1点</TD>")
	subSL(13);
	document.write("</TR>");
	// ４行目
	document.write("<TR><TD id=s404>馬番連勝</TD>");
	subSL(1);
	subSL(4);
	subSL(7);
	subSL(10);
	document.write("<TD id=s401>単勝2点</TD>");
	subSL(14);
	document.write("</TR>");
	// ５行目
	document.write("<TR><TD id=s405>ワイド</TD>");
	subSL(2);
	subSL(5);
	subSL(8);
	subSL(11);
	document.write("<TD id=s402>複勝1点</TD>");
	subSL(15);
	document.write("</TR>");
	// ６行目
	document.write("<TR><TD id=s407>３連複</TD>");
	subSL(3);
	subSL(6);
	subSL(9);
	subSL(12);
	document.write("<TD id=s402>複勝2点</TD>");
	subSL(16);
	document.write("</TR>");
	// リストフッター
	sU = "◆実装性能は過去の競走成績によるシミュレーションに基づいた数値であり、実際の予想で上記の性能を保証するものではありません。";
	document.write("</TABLE><SPAN id=s003><SUB>" + sU + "</SUB></SPAN>");
	sU ="※ 公開予想スタッフのキャラクターには実在のモデルがいますが、掲載されているプロフィールは全てフィクションです。";
	document.write("</TD></TR></TABLE><HR width=790><SPAN id=s003>" + sU + "</SPAN><BR><BR>");
	document.write("</TD></TR></TABLE>");
}