function anime(img_src){
	var img_src, id;
	document.images["photo"].src = img_src;
}

function show(){
	var hayasa=7000;	//---スライドショーの速さ（ミリ秒単位）

	photo=new Array();var pn=0;
		photo[pn++]="0.jpg";		//---１枚目の写真ファイル名
		photo[pn++]="7.jpg";		//---２枚目の写真ファイル名
		photo[pn++]="14.jpg";
		photo[pn++]="13.jpg";
		photo[pn++]="10030.jpg";
		photo[pn++]="10020.jpg";
		photo[pn++]="11.jpg";
		photo[pn++]="12.jpg";
		photo[pn++]="15.jpg";
		photo[pn++]="18.jpg";		//---最後の写真ファイル名

	var n=photo.length;
	document.write('<table style="width:350;border-collapse:collapse;border:1px solid #000000;"><tr>');
	document.write('<td style="background-color:#000000;">');
	document.write('<center>');
	document.write('<input type="button" onclick="kaisi();" value="開始">');
	document.write('<input type="button" onclick="mae();" value="前の写真">');
	document.write('<input type="button" onclick="tugi();" value="次の写真">');
	document.write('<input type="button" onclick="teisi();" value="停止">');
	document.write('</center>');
	document.write('</td></tr><tr>');
	document.write('<td style="background-color:#eeeeee;height:260;">');
	document.write('<center>');
	document.write('<img id="myimg" galleryimg=no style="height:240;border:1px solid #000000;cursor:pointer;margin-bottom:5;" onclick="mado();" title="クリックで別のWindowに拡大表示">');
	document.write('</center>');
	document.write('</td></tr><tr>');
	document.write('<td style="background-color:#000000;">');
	document.write('<center>');
	document.write('<span id="text" style="font-size:12px;color:#ffffff;">ダミー</span>');
	document.write('</center>');
	document.write('</td></tr></table>');
	var tid,joutai="停止中",i=0;hyouji();
}


function kaisi(){
	clearInterval(tid);
	joutai="作動中";
	tugi();
	tid=setInterval("tugi();",hayasa);
}

function mae(){
	if(i>0){
		i--;hyouji();
	}else{
		i=n-1;hyouji();
	}
}


function tugi(){
	if(i<n-1){
		i++;hyouji();
	}else{
		i=0;hyouji();
	}
}


function teisi(){
	clearInterval(tid);
	joutai="停止中";
	hyouji();
}


function henkou(sel_no){
	i=sel_no;hyouji();
}


function hyouji(){
	document.getElementById("myimg").src=photo[i];
	var j="スライドショーは "+joutai+" ： "+n+" 枚中 "+(i+1)+" 枚目を表示";
	document.getElementById("text").firstChild.nodeValue=j;
}


function mado(){
	var myurl=photo[i];
	window.open(myurl,i);
}



