// SET RECENT PLACEMENT

var indexSlideTimeout = 0;
var indexSlideInterval = 0;
var imageOn = 86; //change to the first article number

function startRecentPlacement(){
	indexSlideTimeout = setTimeout("setRecentPlacement('87')", 4000);  //change to the second article number
}

function setRecentPlacement(id){
	i = 86; //change to the first article number
	while(document.getElementById('rp_' + i)){
		$('rp_' + i).style.display = (i == id)? "block" : "none";
		i++;
	}
	i--;
	nextImg = (parseInt(id) < i)? parseInt(id)+1 : 86; //change to the first article number
	clearTimeout(indexSlideTimeout);
	clearInterval(indexSlideInterval);
	indexSlideInterval = setInterval("setRecentPlacement('"+ nextImg +"')", 4000);
}
