/*
function getFirstPhotoID() {
  return getElem(document.getElementById("photoids").value, 0) ;
}

function getPrevPhotoID() {
  return getPrevElem(document.getElementById("photoids").value,
                     parseInt(document.getElementById("photopos").value)) ;
}

function getNextPhotoID() {
  return getNextElem(document.getElementById("photoids").value,
                     parseInt(document.getElementById("photopos").value)) ;
}

function getLastPhotoID() {
  return getElem(document.getElementById("photoids").value, 
                 parseInt(document.getElementById("photoscount").value) -1) ;
}
*/

function ChangePhoto(urlBegin, pos) {
  photosCount = document.getElementById("photoscount").value ;
  photoIDs = document.getElementById("photoids").value ;
  photoID = getElem(photoIDs, pos) ;
  document.location = urlBegin + '&photoid=' + photoID + '&photoids=' + photoIDs 
                               + '&photopos=' + pos + '&photoscount=' + photosCount ;
}


