var colLast = 1;
var num = 0;
var act = 1;
var t = 0;

function sliding(col,action) {
	if(action=="1") {
		stopSlideshow();
	}
	colLast = parseInt(col);
	var x = ((col-1)*-770)
	if (col =="1") var slider = new Fx.Tween('slides', {duration:600});
		else var slider = new Fx.Tween('slides', {duration:600});
	slider.start('left',x);

}

function slide() {
	if(act<num) {
		act++;
	} else {
		act = 1;
	}
	sliding(act,'0');
}
function startSlideshow(nm) {
	num = parseInt(nm);
	t = setInterval("slide()",8000);
}
function stopSlideshow() {
	clearInterval(t);
}
