function imgC(id,html){
document.getElementById('mainimg').src='images/photos/medium/'+id+".jpg";
document.getElementById('caption').innerHTML=html;}
function doRewrite(){
if(running){
if(count>arrPhotos.length-1){
count=1;}
imgC(arrPhotos[count],arrCaptions[count]);
count++;
setTimeout("doRewrite()",seconds);}}
function stopTimer(){
running=false;}