<script type="text/javascript">
<!--
function GetParam(key){
temp=window.location.search;
index=temp.indexOf(key + "=");
if(index>=0){
temp=temp.substr(index + key.length + 1);
endparam=temp.indexOf("&");
if(endparam!=-1){
temp=temp.substr(0,endparam);
}
return temp;
}else{
return false;
}
}
function SafeColorList(mode){
//mode:0 →B ↓G ↓↓R
//mode:1 →R ↓B ↓↓G
//mode:2 →G ↓R ↓↓B
if(mode!=1 && mode!=2) mode=0;
colcode="";
document.write("<tt>");
for(i=0;i<=5;i++){
for(j=0;j<=5;j++){
for(k=0;k<=5;k++){
if(mode==0){
colcode=RGBHtml(i*51, j*51, k*51);
}else if(mode==1){
colcode=RGBHtml(k*51, i*51, j*51);
}else if(mode==2){
colcode=RGBHtml(j*51, k*51, i*51);
}
document.write("<span onClick=\"ChangeColor('"+colcode+"');return false;\">");
document.write("■".fontcolor(colcode)+colcode+"</span> ");
}
document.write("<br>");
}
document.write("<br><br>");
}
document.write("</tt>");
}
function RGBHtml(r,g,b){
if(r<16) r="0"+r.toString(16);
else r=r.toString(16);
if(g<16) g="0"+g.toString(16);
else g=g.toString(16);
if(b<16) b="0"+b.toString(16);
else b=b.toString(16);
return "#"+r+g+b;
}
function ChangeColor(color){
if(document.f.r[0].checked==true){
document.f.t[0].value=color;
document.bgColor=color;
}else{
document.f.t[1].value=color;
document.fgColor=color;
}
}
//-->
</script>
|