<script>
size = "width=88 height=33"; // 画像の表示サイズを記述(HTML書式)
r_time = 1000; // 画像を切り替える時間をミリ秒で記述(1秒 = 1000ミリ秒)
url = new Array();
img = new Array();
/* リンク先とそのバナーを記述 */
url[0] = "test0.html"; img[0] = "../image/0.gif";
url[1] = "test1.html"; img[1] = "../image/1.gif";
url[2] = "test2.html"; img[2] = "../image/2.gif";
url[3] = "test3.html"; img[3] = "../image/3.gif";
url[4] = "test4.html"; img[4] = "../image/4.gif";
url[5] = "test5.html"; img[5] = "../image/5.gif";
url[6] = "test6.html"; img[6] = "../image/6.gif";
url[7] = "test7.html"; img[7] = "../image/7.gif";
url[8] = "test8.html"; img[8] = "../image/8.gif";
url[9] = "test9.html"; img[9] = "../image/9.gif";
img2 = new Array();
for (i in img) {
img2[i] = new Image();
img2[i].src = img[i];
}
function img_change() {
p = Math.round(Math.random()*(url.length - 1));
document.pos.src = img2[p].src;
setTimeout("img_change()",r_time);
}
function jump() {
window.top.document.location = "./document/"+url[p];
}
DOC = '<a href="" onClick="jump(); return false"><img name=pos '+size+' border=0></a>';
</script>
<!-- バナーを表示する部分にここから -->
<script>
document.write(DOC);
img_change();
</script>
<!-- ここまでのコードを記述 -->
|