function showFlash(url,width,height){ document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } var mainimage = new Array( ''); //小さいバナーイメージ(又はフラッシュ)を定義 //※大きいバナーと同じ数だけ用意してください。 var subimages = new Array( '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); //フラッシュをバナーに組み込む場合は最上段のshowFlash関数を利用します。 //記述方法は下記の通り。※scriptタグの多重定義のみ気をつけてください。 // 'showFlash("flashname.swf","width","height");', // 'showFlash("images/image_01_large.swf",300,150);', var figure = subimages.length; for (i=0; i<100; i++) // 100はシャッフルする回数 { n1 = Math.floor(Math.random() * figure); n2 = Math.floor(Math.random() * figure); n = subimages[n1]; // m = mainimage[n1] subimages[n1] = subimages[n2]; // mainimage[n1] = mainimage[n2]; subimages[n2] = n; // mainimage[n2] = m; } //小さいバナーイメージを呼び出す関数 function putsubimage(cnt){ document.write(subimages[cnt]); } //大きいバナーイメージを呼び出す関数 function putmainimage(cnt){ document.write(mainimage[cnt]); }