// ランダム広告
//  hit[184] = 1; adv[184] = '<A href="http://minnaga.com/shinryoumaru/" target="_blank"><IMG src="shop_random/shop/f-f-sinryou.gif" width="236" height="225" border="0"alt="慎漁丸"></A>';
//  hit[171] = 1; adv[171] = '<A href="http://minnaga.com/akiomaru/" target="_blank"><IMG src="shop_random/shop/f-wc-akio.gif" width="236" height="225" border="0"alt="あきお丸"></A>';
//
//
function randomAdv() {
  m = 0, x = 0, y = 0;
  ad  = new Array();
  adv = new Array();
  hit = new Array();

  // hitには相対確率を入れる
  // 完全にランダムにするなら全部"1"にする
  // advには、広告のタグを入れる。改行はしないようにする
  // 広告を増やしたりする場合は、"[ ]"の数字が0から順になるようにする
  hit[0] = 1; adv[0] = '<A href="http://e-turibune.com/shiheimaru/" target="_blank"><IMG src="shop_random/k_sihei.gif" width="236" height="225" border="0"alt="志平丸"></A>';
  hit[1] = 1; adv[1] = '<A href="http://e-turibune.com/asahachimaru/" target="_blank"><IMG src="shop_random/k_asahaci.gif" width="236" height="225" border="0"alt="浅八丸"></A>';
  hit[2] = 1; adv[2] = '<A href="http://e-turibune.com/yosikazumaru/" target="_blank"><IMG src="shop_random/t_yosikazu.gif" width="236" height="225" border="0"alt="良和丸"></A>';
  hit[3] = 1; adv[3] = '<A href="http://e-turibune.com/sanjiroumaru/" target="_blank"><IMG src="shop_random/t_sanjiro.gif" width="236" height="225" border="0"alt="三次郎丸"></A>';
  hit[4] = 1; adv[4] = '<A href="http://e-turibune.com/kurokawabunke/" target="_blank"><IMG src="shop_random/k_kurokawabunke.gif" width="236" height="225" border="0"alt="黒川分家畑中丸"></A>';
  hit[5] = 1; adv[5] = '<A href="http://e-turibune.com/onizawamaru/" target="_blank"><IMG src="shop_random/i_onizawa.gif" width="236" height="225" border="0"alt="鬼澤丸"></A>';
  hit[6] = 1; adv[6] = '<A href="http://e-turibune.com/asahachimaru/" target="_blank"><IMG src="shop_random/k_asahaci.gif" width="236" height="225" border="0"alt="浅八丸"></A>';
  hit[7] = 1; adv[7] = '<A href="http://e-turibune.com/toukitimaru/" target="_blank"><IMG src="shop_random/s_toukiti.gif" width="236" height="225" border="0"alt="藤吉丸"></A>';
  hit[8] = 1; adv[8] = '<A href="http://e-turibune.com/iiokamaru/" target="_blank"><IMG src="shop_random/k_iioka.gif" width="236" height="225" border="0"alt="飯岡丸"></A>';
  hit[9] = 1; adv[9] = '<A href="http://e-turibune.com/iiokamaru/" target="_blank"><IMG src="shop_random/k_iioka.gif" width="236" height="225" border="0"alt="飯岡丸"></A>';
  hit[10] = 1; adv[10] = '<A href="http://e-turibune.com/toukitimaru/" target="_blank"><IMG src="shop_random/s_toukiti.gif" width="236" height="225" border="0"alt="藤吉丸"></A>';
  hit[11] = 1; adv[11] = '<A href="http://e-turibune.com/yukoumaru/" target="_blank"><IMG src="shop_random/t_yukou.gif" width="236" height="225" border="0"alt="勇幸丸"></A>';
  hit[12] = 1; adv[12] = '<A href="http://e-turibune.com/sikisimamaru/" target="_blank"><IMG src="shop_random/t_sikisima.gif" width="236" height="225" border="0"alt="敷嶋丸"></A>';
  hit[13] = 1; adv[13] = '<A href="http://e-turibune.com/nissyoumaru/" target="_blank"><IMG src="shop_random/i_nisyou.gif" width="236" height="225" border="0"alt="日正丸"></A>';
  hit[14] = 1; adv[14] = '<A href="http://e-turibune.com/asahachimaru/" target="_blank"><IMG src="shop_random/k_asahaci.gif" width="236" height="225" border="0"alt="浅八丸"></A>';
  hit[15] = 1; adv[15] = '<A href="http://e-turibune.com/fukujinmaru/" target="_blank"><IMG src="shop_random/s_fukujin.gif" width="236" height="225" border="0"alt="福神丸"></A>';
  hit[16] = 1; adv[16] = '<A href="http://e-turibune.com/nissyoumaru/" target="_blank"><IMG src="shop_random/i_nisyou.gif" width="236" height="225" border="0"alt="日正丸"></A>';
  hit[17] = 1; adv[17] = '<A href="http://e-turibune.com/miyatamaru/" target="_blank"><IMG src="shop_random/i_miyata.gif" width="236" height="225" border="0"alt="宮田丸"></A>';
  hit[18] = 1; adv[18] = '<A href="http://e-turibune.com/fukujyuumaru/" target="_blank"><IMG src="shop_random/i_fukuju.gif" width="236" height="225" border="0"alt="福重丸"></A>';
  hit[19] = 1; adv[19] = '<A href="http://e-turibune.com/yamasyoumaru/" target="_blank"><IMG src="shop_random/i_yamasyou.gif" width="236" height="225" border="0"alt="山正丸"></A>';
  hit[20] = 1; adv[20] = '<A href="http://e-turibune.com/kobayasimaru/" target="_blank"><IMG src="shop_random/to_kobayasi.gif" width="236" height="225" border="0"alt="小林丸"></A>';
  hit[21] = 1; adv[21] = '<A href="http://e-turibune.com/fukumotomaru/" target="_blank"><IMG src="shop_random/k_fukumoto.gif" width="236" height="225" border="0"alt="福本丸"></A>';
  hit[22] = 1; adv[22] = '<A href="http://e-turibune.com/arasanmaru/" target="_blank"><IMG src="shop_random/k_arasan.gif" width="236" height="225" border="0"alt="荒三丸"></A>';
  hit[23] = 1; adv[23] = '<A href="http://e-turibune.com/onizawamaru/" target="_blank"><IMG src="shop_random/i_onizawa.gif" width="236" height="225" border="0"alt="鬼澤丸"></A>';
  hit[24] = 1; adv[24] = '<A href="http://e-turibune.com/tomihachimaru/" target="_blank"><IMG src="shop_random/s_tomihachi.gif" width="236" height="225" border="0"alt="富八丸"></A>';
  hit[25] = 1; adv[25] = '<A href="http://e-turibune.com/yutakamaru/" target="_blank"><IMG src="shop_random/i_yutaka.gif" width="236" height="225" border="0"alt="豊丸"></A>';
  
  for(i=0; i<=hit.length - 1; i++) {
    m += hit[i];
  }
  n = Math.floor(Math.random() * m);
  n++;
  for(i=0; i<=hit.length - 1; i++) {
    x = y;
    y += hit[i];
    if(x<n && n<=y) ad = adv[i];
  }
  document.write(ad);
}