var txt = new Array();txt[0]="img/img0.jpg";txt[1]="img/img1.jpg";mmax = 2; //メッセージ行数txtno = Math.floor(Math.random() * mmax);document.write("<img src='"+txt[txtno]+"'>");