<?php
	define("SESSION_PREFIX", "jsnow");
	require("../../__common__/__define_common.php");
	require("../../__common__/include-common-all.php");
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="author" content="ok.2nd">
<title>jSnow: お好み</title>
<link rel="stylesheet" href="../../style/original/tools_common.css?20120406">
<link rel="stylesheet" href="slider/slider.css">
<style>
.fd_classname_extraclass {
	width: 2em;
}
th {
	text-align: right;
	vertical-align: top;
}
span.exp {
	color: #008080;
	font-size: 12px;
	margin-bottom: 2px;
}
</style>
<script src="../../scripts/jquery.js"></script>
<script src="../../scripts/jquery.cookie.js"></script>
<script src="../../scripts/jscolor/jscolor.js"></script>
<script src="slider/slider.js"></script>
<script>
var col_sel_type = '<?= set_val_cookie('col_sel', 'rgb', 'csel') ?>';
function init() {
	if (col_sel_type == 'rgb') {
		col_sel_rgb();
	} else if (col_sel_type == 'mm') {
		col_sel_mm();
	} else if ($.cookie('jsnow_col_sel') == 'rgb') {
		col_sel_rgb();
	} else {
		col_sel_mm();
	}
}
function col_sel_rgb() {
	$("#col_sel_rgb").css("display","");
	$("#col_sel_mm").css("display","none");
	$("#set_col_rgb").css("display","none");
	$("#set_col_mm").css("display","");
	$("#col_sel_type").val("rgb");
	$.cookie('jsnow_col_sel', "rgb", { expires: 365 });
}
function col_sel_mm() {
	$("#col_sel_rgb").css("display","none");
	$("#col_sel_mm").css("display","");
	$("#set_col_rgb").css("display","");
	$("#set_col_mm").css("display","none");
	$("#col_sel_type").val("mm");
	$.cookie('jsnow_col_sel', "mm", { expires: 365 });
}
</script>
</head>
<body onload="init();">
<p>
<a href="../../tools/" class="return_index">■</a>
<span id="tool_title" style="color:#1e90ff; font-size:14px;">jSnow: お好み</span>
</p>
<form method="post" action="opt.php" style="clear: both;">
<input type="hidden" id="col_sel_type" name="col_sel" value="rgb">
<table>
<tr>
	<th>背景色：</th>
	<td colspan=4>
	#<input type="text" name="bg" size=10 value="<?= set_val_cookie('bg', 'FFFFFF', 'bg') ?>" class="color {pickerClosable:true}">
	&nbsp;&nbsp;<a href="http://localhost/_myhome/__common__/color-chart.php" target="_blank">HTML カラーチャート</a>
	</td>
</tr>
<tr>
	<th>薄片文字：</th>
	<td colspan=4><p><span class="exp">カンマ(,)で結んで （省略値：*,&hearts;,♪,★）</span></p>
	<input type="text" name="flake" size=60 value="<?= set_val_cookie('flake', '', 'flake') ?>">
	</td>
</tr>
<tr>
	<th>薄片文字色数：</th>
	<td style="font-size:small;">最小：</td><td colspan=3><input name="fnum" id="slider-fnum" type="text" title="Range: 1 - 50" class="fd_range_1_50 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('fnum', '5', 'fnum') ?>" /><span class="exp">最大：50</span></td>
</tr>
<tr>
	<td colspan=5 id="set_col_rgb"><a href="javascript:col_sel_rgb();" style="font-size:small;">薄片の色をRGBで指定する</a></td>
	<td colspan=5 id="set_col_mm"><a href="javascript:col_sel_mm();" style="font-size:small;">薄片の色を明暗で指定する</a></td>
</tr>
<tbody id="col_sel_mm">
<tr>
	<th>薄片の色の明暗：</th>
	<td colspan=4><span class="exp">数値が大きいほど明るい</span></td>
</tr>
<tr>
	<th></th>
	<td style="font-size:small;">最小：</td><td><input name="cl" id="slider-cl" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('cl', '0', 'cl') ?>" /></td>
	<td style="font-size:small;">最大：</td><td><input name="ch" id="slider-ch" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('ch', '255', 'ch') ?>" /></td>
</tr>
</tbody>
<tbody id="col_sel_rgb">
<tr>
	<th>薄片の色) <label for="slider-r1" style="color:red;">Red：</label></th>
	<td style="font-size:small;">最小：</td><td><input name="r1" id="slider-r1" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('r1', '0', 'r1') ?>" /></td>
	<td style="font-size:small;">最大：</td><td><input name="r2" id="slider-r2" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('r2', '255', 'r2') ?>" /></td>
</tr>
<tr>
	<th>薄片の色) <label for="slider-g1" style="color:green;">Green：</label></th>
	<td style="font-size:small;">最小：</td><td><input name="g1" id="slider-g1" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('g1', '0', 'g1') ?>" /></td>
	<td style="font-size:small;">最大：</td><td><input name="g2" id="slider-g2" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('g2', '255', 'g2') ?>" /></td>
</tr>
<tr>
	<th>薄片の色) <label for="slider-b1" style="color:blue;">Blue：</label></th>
	<td style="font-size:small;">最小：</td><td><input name="b1" id="slider-b1" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('b1', '0', 'b1') ?>" /></td>
	<td style="font-size:small;">最大：</td><td><input name="b2" id="slider-b2" type="text" title="Range: 0 - 255" class="fd_range_0_255 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('b2', '255', 'b2') ?>" /></td>
</tr>
</tbody>
<tr>
	<th>薄片の数：</th>
	<td style="font-size:small;">最小：</td><td colspan=3><input name="num" id="slider-num" type="text" title="Range: 1 - 500" class="fd_range_1_500 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('num', '30', 'num') ?>" /><span class="exp">最大：500</span></td>
	</td>
</tr>
<tr>
	<th>薄片の大きさ：</th>
	<td style="font-size:small;">最小：</td><td colspan=3><input name="size" id="slider-size" type="text" title="Range: 10 - 400" class="fd_range_1_400 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('size', '20', 'size') ?>" /><span class="exp">最大：400</span></td>
	</td>
</tr>
<tr>
	<th>薄片が落ちる速度：</th>
	<td style="font-size:small;">最小：</td><td colspan=3><input name="speed" id="slider-speed" type="text" title="Range: 1 - 100" class="fd_range_1_100 fd_classname_extraclass fd_callback_updateColor" value="<?= set_val_cookie('speed', '3', 'speed') ?>" /><span class="exp">最大：100</span></td>
</tr>
<tr><td colspan=5>
<input type="submit" name="do" value="表示">
<input type="button" name="reset" value="リセット" onclick="javascript:location.href='?';return false;">
<span style="margin-left:5px;font-size:small;color:#606060;">表示画面で、Escキーで元に戻ります。スペース、Enterキーで薄片の色を変えて再表示します。</span>
</td></tr>
</table>
</form>
</body>
</html>
