var images = {
// 画像とジャンプ先の URL のペア
url : [
//['http://ome-fa-sub.hustle.ne.jp/image/banner/b002.jpg', 'http://www.yahoo.co.jp'],
//['http://ome-fa-sub.hustle.ne.jp/image/banner/b003.jpg', 'http://google.com'],
['http://ome-fa-sub.hustle.ne.jp/image/banner/b000.gif', '']
],

// 順番のシャッフル
shuffle : function() {
for (i = this.url.length; i > 0; --i) {
tmp = this.url[p = Math.floor(Math.random()*i)] ;
this.url[p] = this.url[i-1] ;
this.url[i-1] = tmp ;
}
},

p : 0, // 表示画像のポインタ

// 画像表示
put : function() {
if (this.p >= this.url.length) this.p = 0 ;
return '<a href="'+this.url[this.p][1]+'" target="_blank"><img src="'+this.url[this.p++][0]+'" /></a>' ;
}
} ;

onload = function() {
images.shuffle() ;
divs = document.getElementsByTagName('li') ;
for (i = 0; i < divs.length; ++i) {
if (divs[i].className != 'bn') continue ; // class が「bn」ではない div はスルー
divs[i].innerHTML += images.put() ;
}
}