function slideShow(){
var total_img_interval = ((parseInt($("#noticias_total").html()))-1)*100;
for(i=0;i<=total_img_interval;i++){
if(i>0){
setTimeout("moveRight()", (4000*(i+1)));
}else{
setTimeout("moveRight()", 4000);
}
}
}
function moveRight(){
var total_img = parseInt($("#noticias_total").html());
var current_img = $("#current_img").html();
var next_img = parseInt(current_img)+1;
if(next_img <= total_img){
$("#noticias_"+next_img).fadeIn(1000);
$("#noticias_titulo_"+next_img).fadeIn(1000);
$("#noticias_"+current_img).fadeOut(1000);
$("#noticias_titulo_"+current_img).fadeOut(1000);
$("#current_img").html(next_img);
}else{
$("#noticias_1").fadeIn(1000);
$("#noticias_titulo_1").fadeIn(1000);
$("#noticias_"+total_img).fadeOut(1000);
$("#noticias_titulo_"+total_img).fadeOut(1000);
$("#current_img").html('1');
}
}
function moveLeft(){
var total_img = parseInt($("#noticias_total").html());
var current_img = $("#current_img").html();
var prev_img = parseInt(current_img)-1;
if(prev_img >= 1){
$("#noticias_"+prev_img).fadeIn(1000);
$("#noticias_titulo_"+prev_img).fadeIn(1000);
$("#noticias_"+current_img).fadeOut(1000);
$("#noticias_titulo_"+current_img).fadeOut(1000);
$("#current_img").html(prev_img);
}else{
$("#noticias_"+total_img).fadeIn(1000);
$("#noticias_titulo_"+total_img).fadeIn(1000);
$("#noticias_1").fadeOut(1000);
$("#noticias_titulo_1").fadeOut(1000);
$("#current_img").html(total_img);
}
}