//ランダム出力スクリプト

Querys = new Array();
Odds = new Array ();

//設定ここから-------------------------------------------


//確率設定（有=0、無=1） 

OddsFlag = 1;

//出力ソースをインデックス数0から順に設定

Querys[0] = "<!-- Amazon recommend books Begins --><div align='center' style='width:150px; margin:20px 0 10px 22px;'><div align='center' style='margin:5px 0 5px 0;'>【注目の書籍】</div>    <div align='center'><a href='http://www.amazon.co.jp/gp/product/4844327488?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4844327488' target='_blank'><form mt:asset-id='844' class='mt-enclosure mt-enclosure-image' style='display: inline;'><img alt='ネット広告白書-2.jpg' src='http://www.e-research.biz/%E3%83%8D%E3%83%83%E3%83%88%E5%BA%83%E5%91%8A%E7%99%BD%E6%9B%B8-2.jpg' width='100' height='132' class='mt-image-none' style='' /></form>      </a>    </div>    <div align='center' style='margin:5px 0 20px 0;'><a href='http://www.amazon.co.jp/gp/product/4844327488?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4844327488' target='_blank'>ネット広告白書 2010</a><img src='http://www.assoc-amazon.jp/e/ir?t=webmarketingg-22&l=as2&o=9&a=4844327488' width='1' height='1' border='0' alt='' style='border:none !important; margin:0px !important;' /></div>  </div><!-- Amazon recommend books Ends -->";
Querys[1] = "<!-- Amazon recommend books Begins --><div align='center' style='width:150px; margin:20px 0 10px 22px;'><div align='center' style='margin:5px 0 5px 0;'>【注目の書籍】</div>    <div align='center'><a href='http://www.amazon.co.jp/gp/product/4844327488?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4844327488' target='_blank'><form mt:asset-id='844' class='mt-enclosure mt-enclosure-image' style='display: inline;'><img alt='ネット広告白書-2.jpg' src='http://www.e-research.biz/%E3%83%8D%E3%83%83%E3%83%88%E5%BA%83%E5%91%8A%E7%99%BD%E6%9B%B8-2.jpg' width='100' height='132' class='mt-image-none' style='' /></form>      </a>    </div>    <div align='center' style='margin:5px 0 20px 0;'><a href='http://www.amazon.co.jp/gp/product/4844327488?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4844327488' target='_blank'>ネット広告白書 2010</a><img src='http://www.assoc-amazon.jp/e/ir?t=webmarketingg-22&l=as2&o=9&a=4844327488' width='1' height='1' border='0' alt='' style='border:none !important; margin:0px !important;' /></div>  </div><!-- Amazon recommend books Ends -->";
Querys[2] = "<!-- Amazon recommend books Begins --><div align='center' style='width:150px; margin:20px 0 10px 22px;'><div align='center' style='margin:5px 0 5px 0;'>【注目の書籍】</div>    <div align='center'><a href='http://www.amazon.co.jp/gp/product/4021009000?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4021009000' target='_blank'><form mt:asset-id='845' class='mt-enclosure mt-enclosure-image' style='display: inline;'><img alt='広告新時代(イメージ).jpg' src='http://www.e-research.biz/%E5%BA%83%E5%91%8A%E6%96%B0%E6%99%82%E4%BB%A3%28%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%29.jpg' width='80' height='113' class='mt-image-left' style='' /></form>      </a>    </div>    <div align='center' style='margin:5px 0 20px 0;'><a href='http://www.amazon.co.jp/gp/product/4021009000?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4021009000' target='_blank'>広告新時代 ネット×広告の素敵な関係 (電通選書)</a><img src='http://www.assoc-amazon.jp/e/ir?t=webmarketingg-22&l=as2&o=9&a=4021009000' width='1' height='1' border='0' alt='' style='border:none !important; margin:0px !important;' /></div>  </div><!-- Amazon recommend books Ends -->";
Querys[3] = "<!-- Amazon recommend books Begins --><div align='center' style='width:150px; margin:20px 0 10px 22px;'><div align='center' style='margin:5px 0 5px 0;'>【注目の書籍】</div>    <div align='center'><a href='http://www.amazon.co.jp/gp/product/4492555986?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4492555986' target='_blank'><form mt:asset-id='868' class='mt-enclosure mt-enclosure-image' style='display: inline;'><img alt='地頭力.jpg' src='http://www.e-research.biz/%E5%9C%B0%E9%A0%AD%E5%8A%9B.jpg' width='80' height='116' class='mt-image-none' style='' /></form>      </a>    </div>    <div align='center' style='margin:5px 0 20px 0;'><a href='http://www.amazon.co.jp/gp/product/4492555986?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4492555986' target='_blank'>地頭力を鍛える 問題解決に活かす「フェルミ推定」</a><img src='http://www.assoc-amazon.jp/e/ir?t=webmarketingg-22&l=as2&o=9&a=4492555986' width='1' height='1' border='0' alt='' style='border:none !important; margin:0px !important;' /></div>  </div><!-- Amazon recommend books Ends --><a href='http://www.amazon.co.jp/gp/product/4492555986?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4492555986' target='_blank'>";
Querys[4] = "<!-- Amazon recommend books Begins --><div align='center' style='width:150px; margin:20px 0 10px 22px;'><div align='center' style='margin:5px 0 5px 0;'>【注目の書籍】</div>    <div align='center'><a href='http://www.amazon.co.jp/gp/product/4887596219?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4887596219' target='_blank'><form mt:asset-id='846' class='mt-enclosure mt-enclosure-image' style='display: inline;'><img alt='ビジネスマンのための「数字力」養成講座(イメージ).jpg' src='http://www.e-research.biz/%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9%E3%83%9E%E3%83%B3%E3%81%AE%E3%81%9F%E3%82%81%E3%81%AE%E3%80%8C%E6%95%B0%E5%AD%97%E5%8A%9B%E3%80%8D%E9%A4%8A%E6%88%90%E8%AC%9B%E5%BA%A7%28%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%29.jpg' width='80' height='126' class='mt-image-none' style='' /></form>      </a>    </div>    <div align='center' style='margin:5px 0 20px 0;'><a href='http://www.amazon.co.jp/gp/product/4887596219?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4887596219' target='_blank'>ビジネスマンのための「数字力」養成講座 (ディスカヴァー携書)</a><img src='http://www.assoc-amazon.jp/e/ir?t=webmarketingg-22&l=as2&o=9&a=4887596219' width='1' height='1' border='0' alt='' style='border:none !important; margin:0px !important;' /></div>  </div><!-- Amazon recommend books Ends -->";
Querys[5] = "<!-- Amazon recommend books Begins --><div align='center' style='width:150px; margin:20px 0 10px 22px;'><div align='center' style='margin:5px 0 5px 0;'>【注目の書籍】</div>    <div align='center'><a href='http://www.amazon.co.jp/gp/product/4794217242?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4794217242' target='_blank'><form mt:asset-id='888' class='mt-enclosure mt-enclosure-image' style='display: inline;'><img alt='残業術.jpg' src='http://www.e-research.biz/%E6%AE%8B%E6%A5%AD%E8%A1%93.jpg' width='80' height='117' class='mt-image-none' style='' /></form>      </a>    </div>    <div align='center' style='margin:5px 0 20px 0;'><a href='http://www.amazon.co.jp/gp/product/4794217242?ie=UTF8&tag=webmarketingg-22&linkCode=as2&camp=247&creative=1211&creativeASIN=4794217242'>プロの残業術。 一流のビジネスマンは、時間外にいったい何をしているのか?</a><img src='http://www.assoc-amazon.jp/e/ir?t=webmarketingg-22&l=as2&o=9&a=4794217242' width='1' height='1' border='0' alt='' style='border:none !important; margin:0px !important;' /></div>  </div><!-- Amazon recommend books Ends -->";


//出力確率を上記出力ソースのインデックス数に合わせて設定（OddsFlag = 0 の場合は設定不要）

Odds[0] = 0.5;
Odds[1] = 2.5;
Odds[2] = 7.5;
Odds[3] = 10;
Odds[4] = 50;
Odds[5] = 20;
Odds[6] = 6;
Odds[7] = 3.5;


//設定ここまで　以下編集禁止-------------------------------------------

if(OddsFlag == "0"){
	var Result = Math.random() * 100;
	var n = 0;
	for(i = 0; i < Odds.length; i++){
		n += Odds[i]; 
		if(Result < n){
			Loadimg = Querys[i];
			document.write(Loadimg);
			break;
		}
	}
}else{
	var i = Math.floor(Math.random() * Querys.length);
	var Loadimg = Querys[i];
	document.write(Loadimg);
}
