var ContentReplacer_contentsArr = new Array();
var ContentReplacer_counter = 0;
var ContentReplacer_contentCount = 0;


function replaceContents(contentIDs_arr,time_delay){
	
	if(parseInt(time_delay)<3) time_delay = 3;

	
	var i = 0;
	
	
	for(an_id in contentIDs_arr){
		
		ContentReplacer_contentsArr[i] = document.getElementById(contentIDs_arr[an_id]);
		
		if(i==0){
			$(ContentReplacer_contentsArr[i]).fadeIn('slow',function(){i++;});
			//ContentReplacer_contentsArr[i].style.display = 'block';
		}
		else{
			$(ContentReplacer_contentsArr[i]).fadeOut('slow',function(){i++;});
			//ContentReplacer_contentsArr[i].style.display = 'none';
		}
		//i++;
	}
	
	
	ContentReplacer_contentCount = contentIDs_arr.length;
	
	
	window.setInterval(ContentReplacer_replace,time_delay*1000);
	
}//end function replaceContents()


var ContentReplacer_replace = function(){
	$(ContentReplacer_contentsArr[ContentReplacer_counter]).fadeOut('slow', function(){
		ContentReplacer_counter++;
		if(ContentReplacer_counter==ContentReplacer_contentCount) ContentReplacer_counter = 0;
		$(ContentReplacer_contentsArr[ContentReplacer_counter]).fadeIn('slow');
		
		});
	//ContentReplacer_contentsArr[ContentReplacer_counter].style.display = 'none';
	
	//ContentReplacer_counter++;
	
	
	
	
	//ContentReplacer_contentsArr[ContentReplacer_counter].style.display = 'block';
	
}//

