var kazu = 7; // データ数
var hyouji = 4; // 表示データ数
hako = new Array(kazu);
for (i=0;i<=kazu;i++) {hako[i]=0;} // チェックフラグ初期化

// random
jmp = new Array();
anc = new Array();
text = new Array();
url = new Array();
imp = new Array();

// to link
jmp[0] = "/h/redirect/index.php?id=c_nihon";
jmp[1] = "/h/redirect/index.php?id=c_shinagawa";
jmp[2] = "/h/redirect/index.php?id=c_ueno";
jmp[3] = "/h/redirect/index.php?id=c_jujinhospital";
jmp[4] = "/h/redirect/index.php?id=c_kanagawa";
jmp[5] = "/h/redirect/index.php?id=c_shiromoto";
jmp[6] = "/h/redirect/index.php?id=c_crossclinic";
jmp[7] = "";


// anchor text
anc[0] = "日本総合美容クリニーク";
anc[1] = "美容整形なら品川美容外科";
anc[2] = "上野クリニック";
anc[3] = "十仁美容整形";
anc[4] = "美容整形・美容外科・整形は全国の神奈川クリニック";
anc[5] = "城本クリニック";
anc[6] = "クロスクリニック";
anc[7] = "";


// text
text[0] = "世界も認めるメス無用の脂肪除去 今ならワンコインでお気軽体験";
text[1] = "先端の技術と経験豊富な医師による徹底したサポートで理想の自分へ";
text[2] = "メスを使わない。短時間でできる。上野クリニックのプチ整形";
text[3] = "【十仁美容整形】美容外科のパイオニアとして70年。";
text[4] = "北海道から九州まで全国ネットワーク、来院者数250万人";
text[5] = "全国26院。15年以上の実績。患者様の安心を重視しています";
text[6] = "美容皮膚科クロスクリニックの最新アンチエイジング";
text[7] = "";


// url
url[0] = "www.nsbc.jp";
url[1] = "www.shinagawa.com/";
url[2] = "www.ueno.co.jp";
url[3] = "www.jujinhospital.com/";
url[4] = "www.kanacli.net";
url[5] = "www.shiromoto.to";
url[6] = "www.cross-clinic.com/";
url[7] = "";


//imp
imp[0] = "http://www.accesstrade.net/at/r.html?rk=0100293b00358u";
imp[1] = "http://www.accesstrade.net/at/r.html?rk=01000ekm00358u";
imp[2] = "http://www.accesstrade.net/at/r.html?rk=01002gs000358u";
imp[3] = "http://www.accesstrade.net/at/r.html?rk=01002act00358u";
imp[4] = "http://www.accesstrade.net/at/r.html?rk=01002d3v00358u";
imp[5] = "http://ad.jp.ap.valuecommerce.com/servlet/gifbanner?sid=2419699&pid=876458249";
imp[6] = "http://www.accesstrade.net/at/r.html?rk=01002act00358u";
imp[7] = "";


if(hyouji<=kazu) {
for (i=1;i<=hyouji;i++) {
do {
var rand = Math.floor(Math.random()*kazu); 
}
while ( 0<hako[rand] );
//n = Math.floor(Math.random()*jmp.length);
document.write("<p class='ads'><a href='"+jmp[rand]+"' target='_blank'><span class='adsLink'>");
document.write(""+anc[rand]+"");
document.write("</span><br />");
document.write("<span class='adsTedt'>"+text[rand]+"</span><br />");
document.write("<span class='adsUrl'>"+url[rand]+"</span>");
document.write("</a><img src='"+imp[rand]+"' width='1' height='1' alt='' /></p>");
hako[rand]=+1;
}
}
