//No toques nada a partir de aquí

var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}

function backward(){
	if (which>0){
		which--
		document.images.photoslider.src=photos[which]
		document.getElementById("titulo").href = "../"+links[which];
		document.getElementById("titulo").removeChild(document.getElementById("titulo").firstChild);	
		document.getElementById("titulo").appendChild(document.createTextNode(titulos[which])); //Titulo
		document.getElementById("autor").removeChild(document.getElementById("autor").firstChild);
		document.getElementById("autor").appendChild(document.createTextNode(autores[which])); //Autor	
	}
}

function forward(){
	if (which<photos.length-1){
		which++
		document.images.photoslider.src=photos[which]
		document.getElementById("titulo").href = "../"+links[which];
		document.getElementById("titulo").removeChild(document.getElementById("titulo").firstChild);	
		document.getElementById("titulo").appendChild(document.createTextNode(titulos[which])); //Titulo
		document.getElementById("autor").removeChild(document.getElementById("autor").firstChild);
		document.getElementById("autor").appendChild(document.createTextNode(autores[which])); //Autor
	}
}

function transport(){
window.location=photoslink[which]
}
