var animTimeout;
function screenShots(imageId, shotsString, startIndex, e){	
	if(shotsString == ''){
		$(imageId).src = 'images/no_image.jpg';
	}else{
		shots = shotsString.split(",");
		if(e){
			animShots(imageId, shots, 0);
		}else{
			clearTimeout(animTimeout);
			document.getElementById(imageId).src = shots[startIndex];
		}
	}
}
function animShots(imageId, shots, index){	
	if(shots.length == index){
		index = 0;
	}	
	document.getElementById(imageId).src = shots[index];
	animTimeout = setTimeout("animShots('"+imageId+"', shots,"+(index+1)+")", 400);
}
