md_version ="80626a"; var_mini = "md_mini3d" ;

ms_color0 = ["#222d24" , "#cccccc" , "#cccccc" , "#448866" , "#121d14" , "#666666" , "" ]         /* 任 意 */
ms_color1 = ["#222d24" , "#cccccc" , "#cccccc" , "#448866" , "#121d14" , "#666666" , "" ]         /* green */
ms_color2 = ["#112233" , "#cccccc" , "#cccccc" , "#447799" , "#102030" , "#666666" , "" ]         /* blue */
ms_color3 = ["#100000" , "#ccbbbb" , "#ccbbbb" , "#665544" , "#180808" , "#666666" , "" ]         /* red */
ms_color4 = ["#fff8e8" , "#333333" , "#333333" , "#ccaa88" , "#ffffff" , "#999999" , "y201.gif"]  /* yellow */
ms_color5 = ["#eeeeee" , "#333333" , "#333333" , "#ffffff" , "#ffffff" , "#999999" , "s523.gif"]  /* silver */
ms_color6 = ["#6289ca" , "#ffffff" , "#ffffff" , "#ccddee" , "#eeeeee" , "#999999" , "" ]         /* cyan */
ms_color7 = ["#111111" , "#dddddd" , "#dddddd" , "#666666" , "#222222" , "#666666" , "" ]         /* black */

/* サブファイルから参照する配列 */

    change_style = []; last_comn  = []; last_image = [];
    ms_photo1 = [];  ms_photo2 = [];  ms_photo3 = [];  ms_photo4 = [];
    ms_cmnt1 = [];   ms_cmnt2 = [];   ms_cmnt3 = [];   ms_cmnt4 = [];
    photo_area = []; photo_size = []; photo_holder = [];
    shut_image = []; shut_time = [];
    shut_sound = []; shut_volume = []; slide_speed = [];
    sub_color = [];  sub_title = [] ;sub_bgimg = [] ;

    for(i=0 ; i<5 ;i++){
        change_style[i] = "|0|0|0|0|";
        last_comn[i]  = "";
        last_image[i] = "";
        photo_area[i] = "";
        photo_size[i] = "";
        photo_holder[i] = "";
        shut_image[i] = "";
        shut_time[i] = 100;
        shut_sound[i] = "";
        shut_volume[i] = 0;
        slide_speed[i] = 0;
        sub_color[i] = 9 ;
        sub_title[i] = document.title ;
    }

/* メインファイル関係 */
js_color1 = [] ; js_color2 = [] ; js_color3 = [] ;

onoff = [];
photo_data = [];
pa_photo = [];

sphn1 = [] ; sphn2 = [] ; sphn3 = [] ; sphn4 = [] ;
tm_Ph1 = [] ; tm_Ph2 = []; tm_Ph3 = []; tm_Ph4 = [];
tm_Tx1 = [] ; tm_Tx2 = []; tm_Tx3 = []; tm_Tx4 = [];
tm_Tt1 = [] ; tm_Tt2 = []; tm_Tt3 = []; tm_Tt4 = [];
tm_Link1 = [] ; tm_Link2 = [] ; tm_Link3 = [] ; tm_Link4 = [] ;




thmb_max = [] ;
th_width = [] ; th_height = [] ;

col_max = 5 ;
grno = 1;

link_mode = 0 ;

ms_color = 9
mouse_a = 0
tm_group = 1;
tm_style = 1;
tm_source = 0;
tm_width = 0 ;
tm_height = 0 ;
tm_td_bd =""

bgm_file = ""
bgm_auto_start = 0

style_tm_td1 = ""
style_tm_td2 = ""
style_tm_td3 = ""
style_tm_td4 = ""

NaviInfo()
window.status = version + ": "+ var_mini +"　　　　　"+ md_version;

/* 共通ライブラリ */
function NaviInfo(){

    aName  = navigator.appName.toUpperCase();
    if(aName.indexOf("MICROSOFT",0) >= 0){
          msie = 1;
          appVer = navigator.userAgent;
      var s = appVer.indexOf("MSIE ",0) + 5;
      var e = appVer.indexOf(";",s);
         version = eval(appVer.substring(s,e));
         if(window.navigator.userAgent.indexOf("SV1") >= 0){ version = version + 0.5; }
    }else{
         msie = 0 ; version = 5;
    }
}

function $(arg){
    return document.getElementById(arg);
}

function DocWrite(s){
    document.open(); document.write(s); document.close();
}

var scw = screen.availWidth;
var sch = screen.availHeight;

/* フルウインド オープン */
function fm(url){

var para3
    if((version > 6)&&(location.protocol == "http:")&&(screen.height < 800)){
         sWin = window.open(url,"fm","fullscreen=yes ,scrollbars=1");
    }else{
         para3 = "width="+scw+", height="+sch+", top=0,left=0 ,scrollbars=1,status=1,resizable=1 ";
         sWin = window.open(url,"fm",para3);
         if(url.indexOf("//",0) == -1){ sWin.resizeTo(scw,sch) ; sWin.moveTo(0,0) ;  sWin.focus();}    }
}


/*  サブウインド オープン（写真No ，何段目） */
function phs(phn,grn){

var phnn ;
   if(grn == 1){ phnn = sphn1[phn] }
   if(grn == 2){ phnn = sphn2[phn] }
   if(grn == 3){ phnn = sphn3[phn] }
   if(grn == 4){ phnn = sphn4[phn] }
   fm(subfile_name +"?"+phnn+"&"+grn+"&");
}


function copyData1(pgn){

    if(change_style[pgn] == "|0|0|0|0|"){change_style[pgn] = change_style[1]}
    if(last_comn[pgn] == ""){last_comn[pgn] = last_comn[1]}
    if(last_image[pgn] == ""){last_image[pgn] = last_image[1]}
    if(photo_area[pgn] == ""){photo_area[pgn] = photo_area[1]}
    if(photo_size[pgn] == ""){photo_size[pgn] = photo_size[1]}
    if(photo_holder[pgn] == ""){photo_holder[pgn] = photo_holder[1]}
    if(shut_image[pgn] == ""){shut_image[pgn] = shut_image[1]}
    if(shut_sound[pgn] == ""){shut_sound[pgn] = shut_sound[1]}
    if(shut_time[pgn] == 100){shut_time[pgn] = shut_time[1]}
    if(shut_volume[pgn] == 0){shut_volume[pgn] = shut_volume[1]}
    if(slide_speed[pgn] == 0){slide_speed[pgn] = slide_speed[1]}
    if(sub_title[pgn] == ""){sub_title[pgn] = document.title }
}


/* ［背景色, 文字色, リンク文字, サムネイル外枠, サムネイル背景, スクロールバー枠］*/
function setColor(){

    if(ms_color==9){ return }
    if(ms_color==0){ms_colorS = ms_color0}
    if(ms_color==1){ms_colorS = ms_color1}
    if(ms_color==2){ms_colorS = ms_color2}
    if(ms_color==3){ms_colorS = ms_color3}
    if(ms_color==4){ms_colorS = ms_color4}
    if(ms_color==5){ms_colorS = ms_color5}
    if(ms_color==6){ms_colorS = ms_color6}
    if(ms_color==7){ms_colorS = ms_color7}
    if(ms_color==8){ms_colorS = ms_color8}

    if(ms_colorS[2].charAt(0) == "#"){
         document.linkColor = ms_colorS[2] ;
         document.vlinkColor = ms_colorS[2] ;
    }
    if(ms_colorS[3].charAt(0) == "#"){
         tm_td_bd =" style='border-color: "+ms_colorS[3]+" ; "
    }else{
         tm_td_bd =""
    }
    if(ms_colorS[4].charAt(0) == "#"){
         tm_td_bd = tm_td_bd +"  background-color:"+ms_colorS[4]+"' ; "
    }
}


/* メインファイル配色 */
function startMain(){

   bgmini()
  if(ms_color == 9){return}
  if(ms_colorS[6] != ""){ document.body.background = ms_colorS[6] }
  if(ms_colorS[0].charAt(0) == "#"){document.bgColor = ms_colorS[0] }
  if(ms_colorS[1].charAt(0) == "#"){document.fgColor = ms_colorS[1] }
  if(ms_colorS[5].charAt(0) == "#"){
        document.body.style.scrollbarBaseColor = ms_colorS[0]
        document.body.style.scrollbarTrackColor = ms_colorS[0]
        document.body.style.scrollbarHighlightColor = ms_colorS[5]
   }
}


/* 表示データのコピー */
function cnvData(pgno){

    setColor();
    if(sub_color[pgno] == 99){sub_color[pgno] = ms_color}
    CopyComn();
    jno = 0; pgn = pgno
    if(pgno == 1){
        pht = 0 ;
        phe =pa_photo.length-1 ;
        for(phi=0 ; phi< phe ; phi = phi+3){
            if(pa_photo[phi+1] == ""){
                 tm_Link1[jno] = pa_photo[phi+2];
            }else{
                 ms_photo1[pht] = pa_photo[phi+1];
                 ms_cmnt1[pht] = pa_photo[phi+2];
                 tm_Link1[jno] = "" ;
                 pht++ ;
            }
            jno++;
            tm_split = pa_photo[phi].split("|");
            if(tm_split[0] != ""){
                 tm_Ph1[jno] = photo_holder[1] + tm_split[0];
            }else{
                 sepaData()
                 tm_Ph1[jno] = photo_holder[1] + tm_tmp[0]+"s."+tm_tmp[1];
            }
            tm_Tx1[jno] = "" ; tm_Tt1[jno] = "" ;
            if(tm_split.length == 2){ tm_Tx1[jno] = tm_split[1]; }
            if(tm_split.length > 2){
                tm_Tx1[jno] = tm_split[1];
                tm_Tt1[jno] = tm_split[2];
            }
            sphn1[jno] = pht
        }
        thmb_max[1] = jno
        sub_title[1] = sub_title[1]+"　　"+ var_mini
        pa_photo = []
    }

    if(pgno == 2){
        copyData1(2)
        pht = 0 ; phe =pa_photo.length-1 ;
        for(phi=0 ; phi< phe ; phi = phi+3){
            if(pa_photo[phi+1] == ""){
                 tm_Link2[jno] = pa_photo[phi+2];
            }else{
                 ms_photo2[pht] = pa_photo[phi+1];
                 ms_cmnt2[pht] = pa_photo[phi+2];
                 tm_Link2[jno] = "" ;
                 pht++ ;
            }
            jno++;
            tm_split = pa_photo[phi].split("|");
            if(tm_split[0] != ""){
                 tm_Ph2[jno] = photo_holder[2] + tm_split[0];
            }else{
                 sepaData()
                 tm_Ph2[jno] = photo_holder[2] + tm_tmp[0]+"s."+tm_tmp[1];
            }
            tm_Tx2[jno] = "" ; tm_Tt2[jno] = "" ;
            if(tm_split.length == 2){ tm_Tx2[jno] = tm_split[1]; }
            if(tm_split.length > 2){
                tm_Tx2[jno] = tm_split[1];
                tm_Tt2[jno] = tm_split[2];
            }
            sphn2[jno] = pht
        }
        thmb_max[2] = jno
        sub_title[2] = sub_title[2] +"　　"+ var_mini
        pa_photo = []
    }

    if(pgno == 3){
        copyData1(3)
        pht = 0 ; phe =pa_photo.length-1 ;
        for(phi=0 ; phi< phe ; phi = phi+3){
            if(pa_photo[phi+1] == ""){
                 tm_Link3[jno] = pa_photo[phi+2];
            }else{
                 ms_photo3[pht] = pa_photo[phi+1];
                 ms_cmnt3[pht] = pa_photo[phi+2];
                 tm_Link3[jno] = "" ;
                 pht++ ;
            }
            jno++;
            tm_split = pa_photo[phi].split("|");
            if(tm_split[0] != ""){
                 tm_Ph3[jno] = photo_holder[3] + tm_split[0];
            }else{
                 sepaData()
                 tm_Ph3[jno] = photo_holder[3] + tm_tmp[0]+"s."+tm_tmp[1];
            }
            tm_Tx3[jno] = "" ; tm_Tt3[jno] = "" ;
            if(tm_split.length == 2){ tm_Tx3[jno] = tm_split[1]; }
            if(tm_split.length > 2){
                tm_Tx3[jno] = tm_split[1];
                tm_Tt3[jno] = tm_split[2];
             }
             sphn3[jno] = pht
        }
        thmb_max[3] = jno
        sub_title[3] = sub_title[3] +"　　"+ var_mini
        pa_photo = []
    }

    if(pgno == 4){
        copyData1(4)
        pht = 0 ; phe =pa_photo.length-1 ;
        for(phi=0 ; phi< phe ; phi = phi+3){
            if(pa_photo[phi+1] == ""){
                 tm_Link4[jno] = pa_photo[phi+2];
            }else{
                 ms_photo4[pht] = pa_photo[phi+1];
                 ms_cmnt4[pht] = pa_photo[phi+2];
                 tm_Link4[jno] = "" ;
                 pht++ ;
            }
            jno++;
            tm_split = pa_photo[phi].split("|");
            if(tm_split[0] != ""){
                 tm_Ph4[jno] = photo_holder[4] + tm_split[0];
            }else{
                 sepaData()
                 tm_Ph4[jno] = photo_holder[4] + tm_tmp[0]+"s."+tm_tmp[1];
            }
            tm_Tx4[jno] = "" ; tm_Tt4[jno] = "" ;
            if(tm_split.length == 2){ tm_Tx4[jno] = tm_split[1]; }
            if(tm_split.length > 2){
                tm_Tx4[jno] = tm_split[1];
                tm_Tt4[jno] = tm_split[2];
            }
            sphn4[jno] = pht
        }
        thmb_max[4] = jno
        sub_title[4] = sub_title[4] +"　　"+ var_mini
        pa_photo = []
    }
}


function sepaData(){

   if((pa_photo[phi+1].indexOf("|") >0)||(pa_photo[phi+1].indexOf("#") >0)){
        if(pa_photo[phi+1].indexOf("#") >0){
           tm_tmp1 =  pa_photo[phi+1].split("#");
             tm_tmp =  tm_tmp1[0].split(".");
        }else{
             tm_tmp1 =  pa_photo[phi+1].split("|");
             tm_tmp =  tm_tmp1[0].split(".");
        }
   }else{
        tm_tmp =  pa_photo[phi+1].split(".");
   }
}

/* 複数行コメントの処理 */
function CopyComn(){

var k = -1;
    for(var i = 0 ; i < photo_data.length-1 ; i++){
         br_flg = photo_data[i].substr(0,1);
         if(br_flg != "#"){
              k++;
              pm_p = photo_data[i];
         }else{
              pm_p = pa_photo[k] + photo_data[i].substr(1,photo_data[i].length-1);
         }
         pa_photo[k] = pm_p;
    }
}



function tableTop(tgrp){

   if(tgrp > 0){ tm_group = tgrp }else{tm_group = 1}
   kp = 1; ks = 1;
   if(tm_source ==1){thmbInit1()}
   if(tm_source ==2){thmbInit2()}
   if(tm_source ==3){thmbInit3()}
   tbs ="<TABLE cellpadding=0 cellspacing=0 border=0 class='tm_table"+tm_style+"'>";
}


function tableEnd(){
   tbs += "</TABLE>"
   document.open(); document.write(tbs); document.close();
}

function com_top(tr_style){ tbs += "<TR><TD colspan="+col_max+" style='"+tr_style+"'>" }

function com_end(){ tbs += "</TD></TR>"}

ttt = ""

function tr(trst){

    tbs += "<TR>" ;
    trth = 0 ;
    for(tri=0 ; tri<trst.length ; tri++){
    ks = 2;
    trstr = trst.charAt(tri) ;
         if(trstr == "1"){ tm(1) }
         if(trstr == "2"){ tm(2) }
         if(trstr == "3"){ tm(3) }
         if(trstr == "4"){ tm(4) }
         if(trstr == "5"){ tm(32) }
         if(trstr == "a"){ tm(21) }
         if(trstr == "b"){ tm(31) }
         if(trstr == "c"){ tm(41) }
         if(trstr == "d"){ tm(51) }
         if(trstr == "e"){ tm(61) }
         if(trstr == "f"){ tm(12) }
         if(trstr == "x"){ kp++ }
         if(trstr == "0"){ tbs +="<TD></TD>" }
         if(trstr == "t"){ tbs = tbs + ttt }
    }
    tbs += "</TR>" ;
}

function tm(ttyy){

   if(ttyy == 0){kara();return}
   if(ttyy == 0){ tbs +="<TD></TD>" ;return}
   tateyoko = ttyy ;
   td(kp,tateyoko) ;
   kp++ ;
}

function tm1(ttyy){

   if(ttyy == 0){kara();return}
   tateyoko = ttyy ;
   td(kp,tateyoko) ;
   kp++ ;
}

function tm2(ttyy){
   tateyoko = ttyy ;
   td(kp,tateyoko) ;
   kp = kp+2 ;
}

function tm3(ttyy){
   tateyoko = ttyy ;
   td(kp,tateyoko) ;
   kp = kp+3 ;
}

function tm4(ttyy){
   tateyoko = ttyy ;
   td(kp,tateyoko) ;
   kp = kp+4 ;
}


function kara(){
   ks++
   if(ks == 1){tbs += "<TR>"}
   tm0_width = tm_width + tm_dansa + tm_dansa
   tm0_height = tm_height + tm_dansa + tm_dansa
   tbs +="<TD width="+tm0_width+" height="+tm0_height+" ></TD>"
   if((ks > col_max)||(kp >= thmb_max[tm_group])){
       tbs += "</TR>"
       ks=1 ;
   }
}


function dot(tc){
    if((tc > 20)&&(tc<30)){tc = 2}
    if((tc > 30)&&(tc<40)){tc = 3}
    if((tc > 40)&&(tc<50)){tc = 4}
    if(ks == 1){tbs +="<TR>"}
    ks = ks+tc ;
    if(ks > col_max){
         tbs +="</TR>"
         ks =1
    }
}


/* 最後のサムネイルに指定 */
function tz2(ppyy){

var kp2 = kp ; kp=ppyy ;
    if(tm_group==1){kp=tm_Ph1.length-1};
    if(tm_group==2){kp=tm_Ph2.length-1};
    if(tm_group==3){kp=tm_Ph3.length-1};
    if(tm_group==4){kp=tm_Ph4.length-1};
    tateyoko = 2 ;
    td(kp,tateyoko) ;
    kp = kp2 ;
}


function td(kp,tateyoko){

    if(tateyoko == 0){return}
    if(kp > thmb_max[tm_group]){tbs += "</TR>" ; return }
    if(tateyoko == 1){tateyoko = 11}
    if(tateyoko == 2){tateyoko = 22}
    if(tateyoko == 3){tateyoko = 33}
    if(tateyoko == 4){tateyoko = 44}

var ttyk = "n"+ tateyoko ;
var yoko = parseInt(ttyk.charAt(1)) ;
var tate = parseInt(ttyk.charAt(2)) ;

    if(tateyoko > 11){
        th_width[tateyoko] = tm_width*yoko + tm_dansa*2*(yoko-1) ;
        th_height[tateyoko] = tm_height*tate + tm_dansa*2*(tate-1) ;
    }
    if(ks == 1){tbs += "<TR>"}
    ks = ks+yoko
    tbs += "<TD nowrap align='center' valign='top' "
    if(tateyoko > 11){ tbs += " colspan="+yoko+" rowspan="+tate+" "; }
    tbs +=" ><table cellpadding=0 cellspacing=0 class='tm_td"+tm_style+"' ";

    if(tm_source==1){
        tbs += " onMouseover='thmbOver1(this)' onMouseout='thmbOut1(this)' ";
        tbs += " style='"+style_tm_td1+"' " ;
    }
    if(tm_source==2){
        tbs += " onMouseover='thmbOver2(this)' onMouseout='thmbOut2(this)' ";
        tbs += " style='"+style_tm_td2+"' " ;
    }
    if(tm_source==3){
        tbs += " onMouseover='thmbOver3(this)' onMouseout='thmbOut3(this)' ";
        tbs += " style='"+style_tm_td3+"' " ;
    }
    tbs = tbs + tm_td_bd
    tbs += "><tr><td nowrap>";
    tbs += "<DIV class='tm_photo"+tm_style+"'>"

    if(tm_group==1){
         if(tm_Link1[kp-1] !="" ){ link_flag=tm_Link1[kp-1] }else{ link_flag = "*" }
    }
    if(tm_group==2){
         if(tm_Link2[kp-1] !="" ){ link_flag=tm_Link2[kp-1] }else{ link_flag = "*" }
    }
    if(tm_group==3){
         if(tm_Link3[kp-1] !="" ){ link_flag=tm_Link3[kp-1]  }else{ link_flag = "*" }
    }
    if(tm_group==4){
         if(tm_Link4[kp-1] !="" ){ link_flag=tm_Link4[kp-1]  }else{ link_flag = "*" }
    }

    if(link_flag == "*"){
          if((bgm_file == "")||(bgm_auto_start == 0)){
               tbs += "<a href='javascript:void(0)' onfocus='this.blur()'>"
          }else{
               tbs += "<a href='#' onfocus='this.blur()'>"
          }
     }else{
          tbs += "<a href='"+link_flag+ "' onfocus='this.blur()'>"
     }
    if(tm_group==1){tbs +="<img src='"+ tm_Ph1[kp] + "'  border=0 "}
    if(tm_group==2){tbs +="<img src='"+ tm_Ph2[kp] + "'  border=0 "}
    if(tm_group==3){tbs +="<img src='"+ tm_Ph3[kp] + "'  border=0 "}
    if(tm_group==4){tbs +="<img src='"+ tm_Ph4[kp] + "'  border=0 "}

    if(link_flag == "*"){ tbs += " onClick=phs("+kp+","+tm_group+")" }
    tbs +=" class='tm_img"+tm_style+"'";
    if(tateyoko > 11){
       if((th_width[tateyoko] >0)&&(th_height[tateyoko]>0)){
           tbs += " width="+th_width[tateyoko]+" height="+th_height[tateyoko]+" "
       }
    }

   if(tm_group==1){ tbs +="alt='"+tm_Tx1[kp]+"'>"}
   if(tm_group==2){ tbs +="alt='"+tm_Tx2[kp]+"'>"}
   if(tm_group==3){ tbs +="alt='"+tm_Tx3[kp]+"'>"}
   if(tm_group==4){ tbs +="alt='"+tm_Tx4[kp]+"'>"}
   tbs +="</a></DIV></td></tr></table>"

   if((tm_Tt1[kp] !="")&&(tm_group==1)){
       tbs +=" <span class= 'tm_title"+tm_style+"'"
       tbs +=">"+tm_Tt1[kp]+"</span>"
   }

   if((tm_Tt2[kp] !="")&&(tm_group==2)){
       tbs +=" <span class= 'tm_title"+tm_style+"'"
       tbs +=">"+tm_Tt2[kp]+"</span>"
   }

   if((tm_Tt3[kp] !="")&&(tm_group==3)){
       tbs +=" <span class= 'tm_title"+tm_style+"'"
       tbs +=">"+tm_Tt3[kp]+"</span>"
   }

   if((tm_Tt4[kp] !="")&&(tm_group==4)){
       tbs +=" <span class= 'tm_title"+tm_style+"'"
       tbs +=">"+tm_Tt4[kp]+"</span>"
   }
   tbs +="</TD>" ;
   if((ks > col_max)||(kp >= thmb_max[tm_group])){
       tbs += "</TR>"
       ks=1 ;
   }
}


function twh(tatez,yokoz){

   if((tatez ==0)&&(yokoz ==0)){
        tbs += "<TD>　</TD> " ;
   }else{
        tbs += "<TD height="+tatez+" width="+yokoz+" ></TD> ";
   }
}


/* 矢印 Ｋｅｙ */
function checkNkey(e){

    if(document.all){ evk = event.keyCode; }else{ evk = e.keyCode; }
    if(evk == 39){ phs(1,1) ; }
}

// window.document.onkeydown = checkNkey;

color_hex = []

/* サムネイル配色計算 */
function calcBgColor(tm_bg_color1,tm_bg_color2,cogrn){

var rgb_str=[]
var rgb_hex=[]
var tm_bg_step = 8

    over_red = parseInt("0x"+tm_bg_color2.substring(1,3));
    over_grn = parseInt("0x"+tm_bg_color2.substring(3,5));
    over_blu = parseInt("0x"+tm_bg_color2.substring(5,7));

    out_red = parseInt("0x"+tm_bg_color1.substring(1,3));
    out_grn = parseInt("0x"+tm_bg_color1.substring(3,5));
    out_blu = parseInt("0x"+tm_bg_color1.substring(5,7));

    over_out_red = (over_red - out_red)/8;
    over_out_grn = (over_grn - out_grn)/8;
    over_out_blu = (over_blu - out_blu)/8;

    for(i=0 ; i <= tm_bg_step ; i++){
        red_d = Math.ceil(out_red + over_out_red*i);
        grn_d = Math.ceil(out_grn + over_out_grn*i);
        blu_d = Math.ceil(out_blu + over_out_blu*i);
        rgb_str[i] ="rgb("+red_d+","+grn_d+","+blu_d+")";

        red_h = red_d.toString(16);
        if(red_h.length == 1){red_h = "0"+red_h;}
        grn_h = grn_d.toString(16);
        if(grn_h.length == 1){grn_h = "0"+grn_h;}
        blu_h = blu_d.toString(16);
        if(blu_h.length == 1){blu_h = "0"+blu_h;}
        color_hex[i] = "#"+red_h+grn_h+blu_h
    }
    if(cogrn > 0){
        for(i=0 ; i <= tm_bg_step ; i++){
            rgb_hex[i] ='<BR>  js_color'+cogrn+'['+i+']= ' + color_hex[i]
            document.write(rgb_hex[i])
        }
        alert("色の変化コード")
     }
}


/* ＢＧＭ関係 */
function bgmini(){
    if((bgm_auto_start == 0)||(bgm_file =="")){return}
    onoff[1] = "<EMBED src='"+bgm_file+"' hidden='true' loop='true' height=0 autostart='true'>";
    onoff[0] = "<EMBED src='"+bgm_file+"' hidden='true' loop='true' height=0 autostart='false'>"
    document.open(); document.write("<SPAN ID ='bgm_id'>　</SPAN>"); document.close();
    sound_Id = document.getElementById("bgm_id");
    sound_Id.innerHTML = onoff[bgm_auto_start-1];
}

function bgm(bonoff){
    sound_Id.innerHTML = onoff[bonoff];
}
