var current_photo = '1';var interval;function swapphoto(new_photo, auto) {      if(!auto)   {         clearInterval(interval);   }    document.getElementById("photo_" + current_photo).style.display="none";    document.getElementById("photo_" + current_photo + "_on").style.display="none";    document.getElementById("photo_" + current_photo + "_off").style.display="";    current_photo = new_photo;    document.getElementById("photo_" + new_photo).style.display="";    document.getElementById("photo_" + new_photo + "_on").style.display="";    document.getElementById("photo_" + new_photo + "_off").style.display="none"; }   function autoSwap()  {        var count = parseInt(current_photo) + 1;       if(count == 5)        {            count = 1;       }       swapphoto(count.toString());       interval = setInterval('autoSwap()');   }