albumRotate = new Object ; albumPreload = new Object ; albumPreloadList = new Object ; function rotateImage(album_id) { var stuff = "" ; var total = parseInt(document.getElementById('album_rotate' + album_id + '_total').value) ; var current = document.getElementById('album_rotate' + album_id + '_current') ; var currentImage = parseInt(current.value) ; if ( currentImage + 1 == total ) { var next = 0 ; } else { var next = currentImage + 1 ; } var rotate = document.getElementById('album_rotate' + album_id) ; var thisImage = document.getElementById('album_rotate' + album_id + '_image_' + next) ; var thisCaption = document.getElementById('album_rotate' + album_id + '_caption_' + next) ; var thisCredit = document.getElementById('album_rotate' + album_id + '_credit_' + next) ; var url = document.getElementById('album_rotate' + album_id + '_url') ; // swap the image rotate.innerHTML = "\""" ; // set current current.value = next ; // set the next timeout albumRotate[album_id] = setTimeout("rotateImage(" + album_id + ")", 3000) ; }