var step=1;
var run=1;
var length=108;
function slideit()
{
	if(run == 0)
		return;
	else
	{
		var oImg = document.getElementById("slideIMG");
		if (document.all){oImg.filters.blendTrans.apply();}
		oImg.src="photo/thumbnails/"+step+".jpg";
		oImg.title=step+".jpg";
		if (document.all){oImg.filters.blendTrans.play();}
		step = (step<length)?(step+1):1;
		(new Image()).src = "photo/thumbnails/"+step+".jpg";//加载下一个图片
		setTimeout("slideit()",3000);
	}
}


function start()
{
	run = 1;
	slideit();
	var oA = document.getElementById("slideCtrl");
	oA.href="javascript:stop()";
	oA.innerHTML = "||";
}

function stop()
{
	run = 0;
	var oA = document.getElementById("slideCtrl");
	oA.href="javascript:start()";
	oA.innerHTML = "|>";
}

function next()
{
	var oImg = document.getElementById("slideIMG");
	step = (step<length)?(step+1):1;
	oImg.src="photo/thumbnails/"+step+".jpg";
	oImg.title=step+".jpg";
}
function previous()
{
	var oImg = document.getElementById("slideIMG");
	step = (step>1)?(step-1):length;
	oImg.src="photo/thumbnails/"+step+".jpg";
	oImg.title=step+".jpg";
}
