// JavaScript Document

<!--
// ランダムテキスト
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="https://store.willcom-inc.com/ec/faces/lstlscp002546/" target="_blank"><img src="http://www.kasegeru-job.com/img/common/banner/header/newllineup_2009ss_468_60.gif" alt="WILLCOM STORE★2009春 新機種ラインアップ" width="468" height="60" /></a>';
  hit[1] = 1; adv[1] = '<a href="http://amagami.info/" target="_blank"><img src="http://www.kasegeru-job.com/img/common/banner/header/banner_468_60_01.jpg" alt="アマガミ 公式サイト" width="468" height="60" /></a>';
  hit[2] = 1; adv[2] = '<a href="http://shop.benesse.ne.jp/tamahiyo/top/CSfTop_uti.jsp" target="_blank"><img src="http://www.kasegeru-job.com/img/common/banner/header/468-60.gif" alt="たまひよの内祝い" width="468" height="60" /></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);
}
//-->