// JavaScript Document
var i=1;  
var j=3;
function init(){
	setInterval("cambiar('secc')",15000);
		var lColor = '#FF0000';
}
function viewSection(id,total){
	for (var i=1; i<=total; i++){
		if(i!=id){ 
			document.getElementById('secc'+i).style.display = 'none';
		}else{
			document.getElementById('secc'+i).style.display = 'block';
		}
	}
}
<!--
function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
//-->
function cambiar(valor) {    
	var jj;
	var x
   
	for(var jj=1; jj<=100; jj++)
  {
		obj=document.getElementById(valor+jj);
		if (obj!=null)
   		document.getElementById(valor+jj).style.display = 'none';
	   	x=i+1
	   	obj=document.getElementById(valor+x);
	   	if (obj!=null)
	  		document.getElementById(valor+x).style.display = 'block';
		 	else
		 	{
		 		x=1;
		 		document.getElementById(valor+'1').style.display = 'block'
   		}
   }
   
   i=x;
   }
 
function atras(valor) {    
   var jj;
   var x
   
   for(var jj=1; jj<=100; jj++)
   {
    obj=document.getElementById(valor+jj);
   	if (obj!=null)
   		document.getElementById(valor+jj).style.display = 'none';
	   	x=i+1
	   	obj=document.getElementById(valor+x);
	   	if (obj!=null)
	  			document.getElementById(valor+x).style.display = 'block';
		 	else
		 	{
		 		x=1;
		 		document.getElementById(valor+'1').style.display = 'block'
   		}
   }
   
   i=x;
   }
