var frame = 0; var id = null; function animate(){ document.animation.src=images[frame].src; celda = document.getElementById('description_slideshow'); celda.innerHTML = description[frame]; celda = document.getElementById('caption_slideshow'); celda.innerHTML = caption[frame]; celda = document.getElementById('copyright_slideshow');  celda.innerHTML = copyright[frame]; celda = document.getElementById('total_slideshow'); celda.innerHTML = "Foto " + (frame + 1) + " de " + count; frame=(frame+1)% count;  id=setTimeout("animate()",10000); } function next() { if (id != null) {  clearTimeout(id); id=null; } frame=(frame+1) % count; document.animation.src=images[frame].src; celda = document.getElementById('description_slideshow'); celda.innerHTML = description[frame]; celda = document.getElementById('caption_slideshow'); celda.innerHTML = caption[frame]; celda = document.getElementById('copyright_slideshow'); celda.innerHTML = copyright[frame]; celda = document.getElementById('total_slideshow'); celda.innerHTML = "Foto " + (frame + 1) + " de " + count; } function back() { if (id != null) {  clearTimeout(id);  id=null; }  if (frame==0)  frame=count - 1; else    frame--;  document.animation.src=images[frame].src;  celda = document.getElementById('description_slideshow');  celda.innerHTML = description[frame];  celda = document.getElementById('caption_slideshow');  celda.innerHTML = caption[frame];  celda = document.getElementById('copyright_slideshow');  celda.innerHTML = copyright[frame];  celda = document.getElementById('total_slideshow');  celda.innerHTML = "Foto " + (frame + 1) + " de " + count; } function stop() { if (id != null) {   clearTimeout(id); id=null; if (frame==0) frame= count - 1; else  frame--; } } function touchImages() { var divs = document.body.getElementsByTagName("div"); for(var i=0; i < divs.length; i++) { ids=divs[i].getAttribute("id"); if (ids == "image") { var tabla = divs[i].getElementsByTagName("table"); var img = divs[i].getElementsByTagName("img"); var heightsize = img[0].height;  var widthsize = img[0].width;  tabla[0].style.width=widthsize;  if ( (heightsize > widthsize) || (d2!=1) ) { divs[i].style.styleFloat="right"; divs[i].style.align="right"; divs[i].style.cssFloat="right"; divs[i].style.display="inline"; } else { tabla[0].align="center"; } } } }
