//
// random image display          by OYASOFT (C) 2007
//
var ImageMax = 12;
ImageArray = new Array();
for(i=0; i<ImageMax; i++) {
    ImageArray[i] = new Image();
}

// image URL top
top_url = "/saitama/";

// images
ImageArray[0].src = top_url + "images/topimg001.jpg";
ImageArray[1].src = top_url + "images/topimg002.jpg";
ImageArray[2].src = top_url + "images/topimg003.jpg";
ImageArray[3].src = top_url + "images/topimg004.jpg";
ImageArray[4].src = top_url + "images/topimg005.jpg";
ImageArray[5].src = top_url + "images/topimg006.jpg";
ImageArray[6].src = top_url + "images/topimg007.jpg";
ImageArray[7].src = top_url + "images/topimg008.jpg";
ImageArray[8].src = top_url + "images/topimg009.jpg";
ImageArray[9].src = top_url + "images/topimg010.jpg";
ImageArray[10].src = top_url + "images/topimg011.jpg";
ImageArray[11].src = top_url +"images/topimg012.jpg";

check = new Array();
display = new Array();

for(i=0;i<ImageMax; i++) {
    check[i] = -1;
}

for(i=0;i<5; i++) {
    num = Math.floor(Math.random()*ImageMax);
    while(check[num]>0) {
        num = Math.floor(Math.random()*ImageMax);
    }
    check[num] = 1;
    display[i] = num;
}

document.getElementById("photo1").src = ImageArray[display[0]].src;
document.getElementById("photo2").src = ImageArray[display[1]].src;
document.getElementById("photo3").src = ImageArray[display[2]].src;
document.getElementById("photo4").src = ImageArray[display[3]].src;
document.getElementById("photo5").src = ImageArray[display[4]].src;

