<html>
<head>
<title>リモコン文字色エディタ</title>
<script language="JavaScript" type="text/javascript">
<!--//Script Created by あう,http://www5c.biglobe.ne.jp/~horoau/
//ver.3.0
c_tr_width = 64;
c_tr_height = 14;
c_tr_shoki = '#999999';
c_tr_stoper = 0;
id = "";
function c_tr_shoki_rgb()
{document.forms["c_tr_form"].elements["c_tr_rgb"].value = c_tr_shoki;}
function c_tr_check_rgb()
{with(document)
{if(forms["c_tr_form"].elements["c_tr_rgb"].value.replace("#","").length != 6)
{return;}
temp = forms["c_tr_form"].elements["c_tr_rgb"].value.replace("#","");
forms["c_tr_form"].elements["c_tr_red"].value = parseInt(temp.substring(0,2),16).toString(10);
forms["c_tr_form"].elements["c_tr_green"].value = parseInt(temp.substring(2,4),16).toString(10);
forms["c_tr_form"].elements["c_tr_blue"].value = parseInt(temp.substring(4,6),16).toString(10);}}
function c_tr_spacer()
{if(document.layers)
{with(document.layers["c_tr_color"].document)
{open();
write('<spacer type="block" width="'+c_tr_width+'" height="'+c_tr_height+'">');
close();}}}
function c_tr_sreach()
{with(document)
{if((forms["c_tr_form"].elements["c_tr_red"].value-0) > 255)
{forms["c_tr_form"].elements["c_tr_red"].value = 255;}
else if((forms["c_tr_form"].elements["c_tr_green"].value-0) > 255)
{forms["c_tr_form"].elements["c_tr_green"].value = 255;}
else if((forms["c_tr_form"].elements["c_tr_blue"].value-0) > 255)
{forms["c_tr_form"].elements["c_tr_blue"].value = 255;}
else if((forms["c_tr_form"].elements["c_tr_red"].value-0) < 0)
{forms["c_tr_form"].elements["c_tr_red"].value = 0;}
else if((forms["c_tr_form"].elements["c_tr_green"].value-0) < 0)
{forms["c_tr_form"].elements["c_tr_green"].value = 0;}
else if((forms["c_tr_form"].elements["c_tr_blue"].value-0) < 0)
{forms["c_tr_form"].elements["c_tr_blue"].value = 0;}
temp_r = (forms["c_tr_form"].elements["c_tr_red"].value-0).toString(16);
if(temp_r.length == 1)
{temp_r = "0"+temp_r;}
temp_g = (forms["c_tr_form"].elements["c_tr_green"].value-0).toString(16);
if(temp_g.length == 1)
{temp_g = "0"+temp_g;}
temp_b = (forms["c_tr_form"].elements["c_tr_blue"].value-0).toString(16);
if(temp_b.length == 1)
{temp_b = "0"+temp_b;}
temp_rgb = "#"+temp_r+temp_g+temp_b;
if(!c_tr_stoper)
{forms["c_tr_form"].elements["c_tr_rgb"].value = temp_rgb;}
if(document.all)
{all("c_tr_color").style.background = temp_rgb;}
else if(document.getElementById)
{getElementById("c_tr_color").style.background = temp_rgb;}
else if(document.layers)
{layers["c_tr_color"].bgColor = temp_rgb;}}
setTimeout('c_tr_sreach()',200);}
function c_tr_edit_start(posi,i)
{clearTimeout(id);
with(document)
{temp = forms["c_tr_form"].elements["c_tr_"+posi].value-0+i
if(temp > 255)
{temp = 255;}
else if(temp < 0)
{temp = 0;}
forms["c_tr_form"].elements["c_tr_"+posi].value = temp;}
id = setTimeout('c_tr_edit_start("'+posi+'",'+i+');',50);}
function c_tr_edit_stop()
{clearTimeout(id);}
function c_tr_stop()
{c_tr_stoper = 1;}
function c_tr_start()
{c_tr_stoper = 0;}
function change_fgcolorB()
{temp = document.forms["c_tr_form"].elements["c_tr_rgb"].value;
with(opener.document)
{if(document.all)
{all.tags("body")[0].style.color = temp;}
else if(document.getElementById)
{getElementsByTagName("body")[0].style.color = temp;}
else if(document.layers)
{c_tr_date = new Date();
c_tr_date.setTime(new Date().getTime()+15*1000);
cookie=opener.c_tr_cookie+"="+temp+"; expires="+c_tr_date.toGMTString()+";";
if(cookie.indexOf(opener.c_tr_cookie+"="+temp) != -1)
{location.reload();}
else
{alert('cookieを有効にしてご利用ください');}}}}
with(document)
{open();
write('<style type="text/css">\n<!-\-\n');
if(document.all || document.getElementById)
{write('.c_tr_style {background:'+c_tr_shoki+';width:'+c_tr_width+'px;height:'+c_tr_height+'px;}\n');}
else if(document.layers)
{write('.c_tr_style {position:relative;}\n');}
write('.c_tr_style2{background:'+c_tr_shoki+';}\n');
write('\n-\->\n<\/style>\n')}
// -->
</script>
</head>
<body>
<form id="c_tr_form" name="c_tr_form">
<table border="0" cellspacing="0" cellpadding="3"<tr><td>
<table border="0" cellspacing="1" cellpadding="0"><tr>
<td class="c_tr_style2"><div class="c_tr_style" id="c_tr_color">
<script type="text/javascript" langurge="JavaScript"><!--
c_tr_spacer();
// --></script></div></td>
</tr></table></td>
<td><input type="text" size="8" value="#000000" id="c_tr_rgb" name="c_tr_rgb" onChange="c_tr_check_rgb();" onfocus="c_tr_stop();" onBlur="c_tr_start();">
<input type="button" value="文字色変更" onClick="change_fgcolorB();"></td>
</tr></table>
<table border="0" cellspacing="0" cellpadding="1"><tr>
<td>赤:<input type="text" size="3" id="c_tr_red" name="c_tr_red">
<input type="button" value="▲" name="c_tr_b1" onMouseDown="c_tr_edit_start('red',1);" onMouseOut="c_tr_edit_stop();" onMouseUp="c_tr_edit_stop();"
><input type="button" value="▼" name="c_tr_b2" onMouseDown="c_tr_edit_start('red',-1);" onMouseOut="c_tr_edit_stop();" onMouseUp="c_tr_edit_stop();"></td>
<td>緑:<input type="text" size="3" id="c_tr_green" name="c_tr_green">
<input type="button" value="▲" name="c_tr_b3" onMouseDown="c_tr_edit_start('green',1);" onMouseOut="c_tr_edit_stop();" onMouseUp="c_tr_edit_stop();"
><input type="button" value="▼" name="c_tr_b4" onMouseDown="c_tr_edit_start('green',-1);" onMouseOut="c_tr_edit_stop();" onMouseUp="c_tr_edit_stop();"></td>
<td>青:<input type="text" size="3" id="c_tr_blue" name="c_tr_blue">
<input type="button" value="▲" name="c_tr_b5" onMouseDown="c_tr_edit_start('blue',1);" onMouseOut="c_tr_edit_stop();" onMouseUp="c_tr_edit_stop();"
><input type="button" value="▼" name="c_tr_b6" onMouseDown="c_tr_edit_start('blue',-1);" onMouseOut="c_tr_edit_stop();" onMouseUp="c_tr_edit_stop();"></td>
</tr></table></form>
<script type="text/javascript" langurge="JavaScript"><!--
c_tr_shoki_rgb();
c_tr_check_rgb();
c_tr_sreach();
// --></script>
</body>
</html>
<script language="JavaScript" type="text/javascript">
<!--//Script Created by あう,http://www5c.biglobe.ne.jp/~horoau/
c_tr_cookie = 'c_tr_cookie';
with(document)
{if(document.layers)
{temp_cookie = cookie;
while(temp_cookie.indexOf(" ") != -1)
{temp_cookie = temp_cookie.replace(" ","");}
temp_cookie = temp_cookie.split(";");
for(i in temp_cookie)
{if(temp_cookie[i].indexOf(c_tr_cookie) != -1)
{temp_cookie2 = temp_cookie[i].split('=');
if(temp_cookie2[0] == c_tr_cookie)
{fgColor = temp_cookie2[1];
open();
write('<style type="text/css">\n<!--\n');
write('body {color:'+temp_cookie2[1]+';}\n');
write('-\->\n</style>\n');
close();
c_tr_shoki = temp_cookie2[1];
break;}
else
{temp_cookie2 = new Array();}}}}}
// -->
</script>