// 	アイコン表示
function img_disp(img) { 
scale = 1; str = navigator.appName.toUpperCase();
if (str.indexOf('NETSCAPE') >= 0 ) scale= 1.0425;
myWin=window.open('','list','width='+250*scale+',height='+190*scale+',left=2,top=114,scrollbars=no' )
myWin.document.open();
myWin.focus();
ww = myWin.document.write;
bgcol= '#DDDDDD';
myWin.document.write('<HTML><HEAD><TITLE>イメージ</TITLE></HEAD><BODY bgcolor=#888888 topmargin=0 leftmargin=0>')
myWin.document.write('<img border=0 src='+img+'>')
myWin.document.write('</BODY></HTML>');
myWin.document.close();
}
function img_close() { 
myWin=window.open('','list')
myWin.close();
}

function t(img) { 
no = img.charCodeAt(0);
//             if( no < 105 ) { img = './img_Sa/' + img; } 
//if( no >= 105 && no < 109 ) { img = './img_Si/' + img; } 
//if( no >= 109 && no < 115 ) { img = './img_Sm/' + img; } 
//            if( no >= 115 ) { img = './img_Ss/' + img; } 

               if( no < 104 ) { img = './AG_S/' + img; } 
  if( no >= 104 && no < 107 ) { img = './HJ_S/' + img; } 
  if( no >= 107 && no < 109 ) { img = './KL_S/' + img; } 
  if( no >= 109 && no < 111 ) { img = './MN_S/' + img; } 
  if( no >= 111 && no < 115 ) { img = './OR_S/' + img; } 
  if( no == 115             ) { img = './SS_S/' + img; } 
              if( no >= 116 ) { img = './TZ_S/' + img; } 

if (parent.cont) { 
 parent.cont.document.img.src=img + '.jpg'; }
 else { location.href='shiki_ktopya.htm'; }
  clearInterval (timerID); 
}

function disp_sum1(n,img,w,h) { 
// document.form.all['img'+n].width = w ;
// document.form.all['img'+n].height = h ;
// document.form.all['img'+n].src=img ;

   document.getElementById('img'+n).width = w;
   document.getElementById('img'+n).height= h ;
   document.getElementById('img'+n).src=img;

}
 
function disp_sum2(n,img,w,h) { 
 no = img.charCodeAt(0); 
//              if( no < 105 ) { img = './Image_RSa/' + img; } 
// if( no >= 105 && no < 109 ) { img = './Image_RSi/' + img; } 
// if( no >= 109 && no < 115 ) { img = './Image_RSm/' + img; } 
//             if( no >= 115 ) { img = './Image_RSs/' + img; }

               if( no < 104 ) { img = './AG~RS/' + img; } 
  if( no >= 104 && no < 107 ) { img = './HJ~RS/' + img; } 
  if( no >= 107 && no < 109 ) { img = './KL~RS/' + img; } 
  if( no >= 109 && no < 111 ) { img = './MN~RS/' + img; } 
  if( no >= 111 && no < 115 ) { img = './OR~RS/' + img; } 
  if( no == 115             ) { img = './SS~RS/' + img; } 
              if( no >= 116 ) { img = './TZ~RS/' + img; } 

// document.form.all['img'+n].src=img ;
   document.getElementById('img'+n).src=img;

 image=new Image(); 
 image.src=(img); 
 wa = image.width; ha = image.height; 
 if(wa <100) { wa = 200; ha = 155; }
 if(ha > h) { wa = wa * h/ha; ha = h; }
//   document.form.all['img'+n].width = wa ;
//   document.form.all['img'+n].height = ha ;
   document.getElementById('img'+n).width = wa;
   document.getElementById('img'+n).height= ha ;
}  

function setSel(kn) { 
document.form.place.value=kn; 
}
 
function win_closed(winVar) { 
var ua = navigator.userAgent; 
  if( !!winVar ) 
   if( ( ua.indexOf('Gecko')!=-1 || ua.indexOf('MSIE 4')!=-1 ) 
     && ua.indexOf('Win')!=-1 ) 
    return winVar.closed; 
   else return typeof winVar.document  != 'object'; 
 else return true; 
} 

//#　[ディレイタイマ]
function on(id) { 
 timerID=setInterval(id +'.style.visibility="visible"',800);
}
 
function of(id) { 
 clearTimeout(timerID); 
 document.all[id].style.visibility='hidden';
}
 
function o(obj,img) { 
 timerID=setInterval('t("'+img+'")',300);
 obj.style.backgroundColor='#444444';
}
 
function f(obj) { 
 obj.style.backgroundColor='';
 clearTimeout(timerID); 
} 

//# 検索フォームｸﾘｱ
function form_clr() { 
 document.form.kwname.value='';
 document.form.kwgaku.value='';
 document.form.color.value='全て';
 document.form.kind.value='全て';
 document.form.hanabira.value='全て';
 document.form.place.value='';
 document.form.plc.value='';
 document.form['tsuru'][2].checked= true;
 document.form.kisetsu.value='全て';
 document.form.kusaki.value='全て';
} 

//# 配列データ設定
sMenuy = new Array();

//# セレクト表示入替(<SELECT>）
function setSubsel(selyOBJ,n,s) { 
 sn = n; 
 sMenuy[0] = new Array(' ');
 sMenuy[1] = ['全て',''];
 sMenuy[2] = ['全て','赤〜赤紫〜青','黄〜オレンジ','白〜クリーム','緑〜茶〜黒'];
 sMenuy[3] = ['全て','葉・芽（緑）','紅葉（朱・赤）','黄葉（黄・茶）'];
 sMenuy[4] = ['',''];
 if ( n == '') { n = selyOBJ.selectedIndex; }
 e = sMenuy[n].length;
   for (i=0; i<5; i++) { document.form.sub.options[i] = new Option(); }
   for (i=0; i<5; i++) { document.form.sub.options[i] = null; }
 if ( sn == '') {  
   for (i=0; i<e; i++)  { document.form.sub.options[i] = new Option(sMenuy[n][i]); }
  }
 else {  
    document.form.sub.options[0] = new Option(s);
   for (i=1; i<e; i++)  { document.form.sub.options[i] = new Option(sMenuy[n][i-1]); }
  }
}
