photobox = new Array();
boxs = photobox.length;
flag=1;
n=0;
while(boxs<4){
	num = Math.floor(Math.random()*31) + 1;
	n=0;
	for(i=0;i<boxs;i++){
		oldnum=photobox[i];
		if(oldnum == num){	flag=0;}else{n++;}
	}
	if(n==boxs){flag=1;}
	if(flag==1){
		if(num!=18){
		document.write('<img src="images/koushi/koushi_p'+num+'.jpg" width="116" height="187">');
		photobox.push(num);
		boxs++;
		}
	}
}

