var s,cn,m,n,count;
s   = document.cookie;
cn  = "cookie_name=";
n   = s.indexOf(cn,0);
//str = navigator.appName.toUpperCase();
str = navigator.userAgent;

if (n != -1) {
  m = s.indexOf(";",n+cn.length);
  if (m == -1) m = s.length;
   count = s.substring(n+cn.length,m);
 }
  else { count = "0"; }

 if (count >= 200) { location.href = "shiki_stop.htm"; }

 if (!navigator.cookieEnabled)  { location.href ="cookie.htm"; }
// if (str.indexOf("Opera") >= 0) { location.href ="brow.htm"; }
 if (str.indexOf("NexTools") >= 0) { location.href ="brow.htm"; }
 if (str.indexOf("TencentTr") >= 0) { location.href ="stop.htm"; }
 //if (str.indexOf("Crawler") >= 0) { location.href ="stop.htm"; }
 if (str.indexOf("NaverBot") >= 0) { location.href ="stop.htm"; }
 if (str.indexOf("Capture") >= 0) { location.href ="stop.htm"; }

function chk() {
 cn = "cookie_name=";
 c_date = new Date();
 n = c_date.getTime() + 1000*60*60*1 ;
 c_date.setTime(n);
 kigen = c_date.toGMTString();
 count++;
 document.cookie = cn + count + "; expires=" + kigen;
}

function disp_sum1(n,img) { 
// document.form.all['img'+n].width = 250 ;
// document.form.all['img'+n].height = 190 ;
// document.form.all['img'+n].src=img ;

   document.getElementById('img'+n).width = 250;
   document.getElementById('img'+n).height= 190 ;
   document.getElementById('img'+n).src=img;
}
 
function disp_sum2(n,img) { 
 no = img.charCodeAt(0); 

               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; } 

  img = '../../shiki/'+img;

//   document.form.all['img'+n].width = 200 ;
//   document.form.all['img'+n].height = 154 ;
//   document.form.all['img'+n].src=img ;

   document.getElementById('img'+n).width = 200;
   document.getElementById('img'+n).height= 154 ;
   document.getElementById('img'+n).src=img;

   image=new Image(); 
//   while(1) { 
//     image.src=(img);  
//     if (image.width > 0) { break; } 
//   } 
   image.src=(img); 
   wa = image.width; ha = image.height; 
// if (wa < 100) { wa = 200; ha = 160; }  
  if(ha > 190) {
     wa = wa * 190/ha;
//     document.form.all['img'+n].width = wa ;
//     document.form.all['img'+n].height = 190 ;
     document.getElementById('img'+n).width = wa;
     document.getElementById('img'+n).height= 190 ;
   }
}

function clr_disp() {
 document.form.cf.value = 'clr_disp';
 document.form.submit();
}
