
/* 記事下横長(全てテキスト) */
function show_bottom_comm_text(){

  google_ad_client = "pub-1031389705202355";
  google_ad_slot = "4019517626";
  google_ad_width = 728;
  google_ad_height = 90;

  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 
}

/* 記事上(7で割り切れる日はレクタングル、8はgoogleカラー横長、2は横長、その他は横長イメージ) */
function show_top_comm_mix(){

  var nowDate = new Date().getDate(); 

  google_ad_client = "pub-1031389705202355";
  if (nowDate % 7 == 0){
    /* 7で割り切れる日：レクタングル(テキスト or イメージ) */
    google_ad_slot = "4102339932";
    google_ad_width = 336;
    google_ad_height = 280;
  } else if (nowDate % 8 == 0){
    /* 8で割り切れる日：横長(googleカラー テキスト or イメージ) */
    google_ad_slot = "9959206904";
    google_ad_width = 728;
    google_ad_height = 90;
    document.write('<br \/>'); 
  } else if (nowDate % 3 == 0){
    /* 3で割り切れる日：横長(葱ブロカラー テキスト or イメージ) */
    google_ad_slot = "7027849968";
    google_ad_width = 728;
    google_ad_height = 90;
    document.write('<br \/>'); 
  } else {
    /* その他：横長(イメージのみ) */
    google_ad_slot = "7793286279";
    google_ad_width = 728;
    google_ad_height = 90;
    document.write('<br \/>'); 
  };

  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 

}

/* 記事上(通常は画像レクタングル、5混在レクタングル、7横長イメージ) */
function show_top_comm_mix2(){

  var nowDate = new Date().getDate(); 

  google_ad_client = "pub-1031389705202355";
  if (nowDate % 7 == 0){
    /* 7で割り切れる日：横長(イメージ) */
    google_ad_slot = "7793286279";
    google_ad_width = 728;
    google_ad_height = 90;
    document.write('<br \/>'); 
  } else if (nowDate % 8 == 0){
    /* 5で割り切れる日：レクタングル(テキスト or イメージ) */
    google_ad_slot = "4102339932";
    google_ad_width = 336;
    google_ad_height = 280;
  } else {
    /* その他：レクタングル(イメージ) */
    google_ad_slot = "4933156944";
    google_ad_width = 336;
    google_ad_height = 280;
  };

  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 

}

/* 記事上レクタングル画像 */
function show_top_comm_image(){

  google_ad_client = "pub-1031389705202355";
  /* 記事上レクタングル(画像) */
  google_ad_slot = "6119899771";
  google_ad_width = 336;
  google_ad_height = 280;
  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 
}

/* 記事上レクタングルテキスト */
function show_top_comm_text(){

  if (screen.width <= 1024) {
    /* 何も表示しない */
    document.write('<br>'); 
  } else {
    google_ad_client = "pub-1031389705202355";
    /* 奇数：記事上レクタングル(テキスト) */
    google_ad_slot = "5466170724";
    google_ad_width = 336;
    google_ad_height = 280;

    document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 
  };
}


/* 記事下レクタングル(5で割り切れる日は画像、その他はテキスト) */
function show_bottom_comm(){

  var nowDate = new Date().getDate(); 

  google_ad_client = "pub-1031389705202355";
  if (nowDate % 5 == 0){
    /* 5で割り切れる日：記事下レクタングル(画像) */
    google_ad_slot = "4933156944";
    google_ad_width = 336;
    google_ad_height = 280;
  } else if (nowDate % 6 == 0){
    /* 6で割り切れる日：記事下レクタングル(テキスト黒) */
    google_ad_slot = "3598280565";
    google_ad_width = 336;
    google_ad_height = 280;
  } else {
    /* その他：記事下レクタングル(テキスト) */
    google_ad_slot = "8417876364";
    google_ad_width = 336;
    google_ad_height = 280;
  };

  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 
}


/* 記事上レクタングル(偶数日は画像、奇数日はテキスト) */
function show_top_comm(){

/* 週の算出
  var today = new Date();
  var startDate = new Date(today.getFullYear(), today.getMonth(), 1);
  var startDay = startDate.getDay();

  var weekNo = Math.floor((today.getDate() + startDay - 1) / 7) + 1;
*/

  var nowDate = new Date().getDate(); 

  google_ad_client = "pub-1031389705202355";
  if (nowDate % 2 == 0){
    /* 偶数：記事上レクタングル(画像) */
    google_ad_slot = "6119899771";
    google_ad_width = 336;
    google_ad_height = 280;
  } else {
    /* 奇数：記事上レクタングル(テキスト) */
    google_ad_slot = "5466170724";
    google_ad_width = 336;
    google_ad_height = 280;
  };

  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 
}

/* 1行リンクユニット */
function show_top_comm2(){
  if (screen.width <= 1024) { 
    google_ad_client = "pub-1031389705202355";
    /* リンクユニット小 */
    google_ad_slot = "8931782019";
    google_ad_width = 468;
    google_ad_height = 15;
  } else {
    google_ad_client = "pub-1031389705202355";
    /* リンクユニット大 */
    google_ad_slot = "2661449575";
    google_ad_width = 728;
    google_ad_height = 15;
  };

  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 
}

function show_side_comm(){

  var nowDate = new Date().getDate(); 

  google_ad_client = "pub-1031389705202355";
  /* その他：画像 */
  google_ad_slot = "3829921800";
  google_ad_width = 160;
  google_ad_height = 600;

  document.write('<script type="text\/javascript" src="http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"><\/script>'); 
}

