function changeTopImage() {
	var imgname = "photo";//imageタグのname属性
	var max = 10;
	var imgsrc = new Array(max);
	for ( var i=0; i<max; i++ ) {
		imgsrc[i] = new Image();
		imgsrc[i].src = "img/photo/" + (i+1) + ".jpg";
	}
	
	var no = Math.floor(max * Math.random());
	document.images[imgname].src = imgsrc[no].src;
}
function writeTopImage() {
	var imgname = "photo";//imageタグのname属性
	var max = 10;
	var imgsrc = new Array(max);
	for ( var i=0; i<max; i++ ) {
		imgsrc[i] = new Image();
		imgsrc[i].src = "img/photo/" + (i+1) + ".jpg";
	}
	
	var no = Math.floor(max * Math.random());
	document.write('<img src="'+imgsrc[no].src+'" width="385" height="250">') ;
}
