function viewMenu(page, auto) {
	$("#loadMNews").load("inc_box_news.php?page="+page, function () {
		if (auto == 1) {
			timer = setTimeout ( "showDiv()", 5000 );
		}	
		else {
			clearTimeout(timer);
		}			
	});
}

$(document).ready(function() {	
	showDiv()
});

var timer;
var counter = 0;
function showDiv() {
	counter++;	
	var getPages = $("input#tot").val();
	if(counter > getPages) {
		counter = 1;
	}
	viewMenu(counter,1);       
};
