// JavaScript Document
// declaración abstracto
function play(){
	slide.siguiente(); // nombre de objeto + siguiente
	slide.intervalID = setInterval("slide.siguiente()", 2000); // nombre de objeto + siguiente && nombre de objeto + intervalID
}

function detener(){
clearInterval(this.intervalID);
}

function siguiente(){
	this.posicion++;
	if(this.posicion == this.total){ this.posicion =0; }
	
	document.getElementById(this.foto).src = this.arrDatos[this.posicion][0];
	document.getElementById(this.titulo).innerHTML = this.arrDatos[this.posicion][1];
	document.getElementById(this.copete).innerHTML = this.arrDatos[this.posicion][2];
	document.getElementById(this.autor).innerHTML = this.arrDatos[this.posicion][3];
	document.getElementById(this.tema).innerHTML = this.arrDatos[this.posicion][4];
	document.getElementById(this.fechaHora).innerHTML = this.arrDatos[this.posicion][5];
	document.getElementById(this.id).innerHTML = this.arrDatos[this.posicion][6];
	document.getElementById(this.paginador).innerHTML = this.arrDatos[this.posicion][7];	
}

function anterior(){
	this.posicion--;
	if(this.posicion < 0){ this.posicion = this.total-1;}
	
	document.getElementById(this.foto).src = this.arrDatos[this.posicion][0];
	document.getElementById(this.titulo).innerHTML = this.arrDatos[this.posicion][1];
	document.getElementById(this.copete).innerHTML = this.arrDatos[this.posicion][2];
	document.getElementById(this.autor).innerHTML = this.arrDatos[this.posicion][3];
	document.getElementById(this.tema).innerHTML = this.arrDatos[this.posicion][4];
	document.getElementById(this.fechaHora).innerHTML = this.arrDatos[this.posicion][5];
	document.getElementById(this.id).innerHTML = this.arrDatos[this.posicion][6];	
	document.getElementById(this.paginador).innerHTML = this.arrDatos[this.posicion][7];	
}

// constructor
function slideShowHome (arrDatos, foto, titulo, copete, autor, tema, fechaHora, id, paginador)
{
	this.posicion = -1;
	this.total = arrDatos.length;
	this.intervalID;
	this.foto = foto;
	this.titulo = titulo;
	this.copete = copete;
	this.autor = autor;
	this.tema = tema;
	this.fechaHora = fechaHora;
	this.id = id;
	this.arrDatos = arrDatos;
	this.play = play; 
	this.detener = detener;  
	this.siguiente = siguiente;
	this.anterior = anterior;
	this.paginador = paginador;
	
}

/**********************************************************************************************

var galeria = new Array( 
					Array("imagenes/di.jpg", "Esta es la vaca"), 
					Array("imagenes/eg.jpg", "Radiografia de la vaca"),
					Array("imagenes/ob.jpg", "Vaca loca"),
					Array("imagenes/ar.jpg", "Vaca rutera"),
					Array("imagenes/be.jpg", "Vaca en el vaso"),
					Array("imagenes/ll.jpg", "Vaca comun"),
					Array("imagenes/i.jpg", "Vaca muerta")
					);
					
slide = new slideShow (galeria, 'foto', 'descripcion');

---------------------------------------------------------------

<div align="center">
	<a href="#" onclick="slide.anterior();">&lt;&lt; Anterior</a>
	<img src="" width="300" height="300" id="foto" align="middle" hspace="20" />
	<a href="#" onclick="slide.siguiente();">Siguiente &gt;&gt;</a>
	<br />
	<span id="descripcion"></span><br />
	<a href="javascript:slide.detener()">Detener</a> <a href="javascript:play()">play</a>
	
	</div>
	
---------------------------------------------------------------
function play(){
	slide.siguiente();
	slide.intervalID = setInterval("slide.siguiente()", 2000);
}

**********************************************************************************************/