var i = 0;

$(window).load(function() {
	manageNews();
});

function manageNews () {
	$.ajax ({
		type: "POST",
		url: "./includes/news.php",
		data: "ind="+i,
		success: function(mg) {
				if (mg != "-1")
				{
					chgNews(mg);
					i++;
					setTimeout ('manageNews()', 10000);
				}
			}
		});

}

function chgNews (msg) {
	$("#newsjs").fadeOut("slow", function() {
		$("#newsjs").empty();
		$("#newsjs").append(msg);
		$("#newsjs").fadeIn("slow");
	});
}
