var carousel_in_slide = false;

function automateCarousel(id, speed)
{
	var el = "carousel_"+id;
	window.setTimeout("slideCarousel('"+el+"','"+speed+"'); carousel_in_slide = true;", speed);
}

function slideCarousel(id, speed)
{
	if (!carousel_in_slide)
		stepcarousel.stepBy(id, +1);
	carousel_in_slide = false;
		window.setTimeout("slideCarousel('"+id+"','"+speed+"')", speed);
}

/*
stepcarousel.setup({
	galleryid: 'carousel', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	autostep: {enable:true, moveby:1, pause:3000},
	panelbehavior: {speed:500, wraparound:false, persist:true},
	defaultbuttons: {enable: false, moveby: 1, leftnav: ['images/btn-left.gif', 8, 131], rightnav: ['images/btn-right.gif', -26, 131]},
	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
})
*/