function showRandomThumbnail(prefix, imageNumber) {
    var num = Math.round(Math.random() * (myphoto.length-1));
    var photoLocation = myphoto[num].substring(0, myphoto[num].length-9) + myphoto[num].substring(myphoto[num].length-3); 
    
    // alert(photoLocation);
    
    document.write("<a href='");
    document.write(prefix);
    document.write(photoLocation);
    document.write("'>");
    
    document.write("<img id='images-");
	document.write(imageNumber);
	document.write("' src='");
    document.write(prefix);
    document.write(myphoto[num]);
    document.write("'/>");
        
    document.write("</a>");
}

function reloadImages(prefix, imageNumber) {
  var num = Math.round(Math.random() * (myphoto.length-1));
  var photoLocation = myphoto[num].substring(0, myphoto[num].length-9) + myphoto[num].substring(myphoto[num].length-3); 
  var imageElement = document.getElementById("images-" + imageNumber);
  imageElement.src = prefix + myphoto[num];
  imageElement.parentNode.href = "../" + photoLocation;
  setTimeout("reloadImages('../', " + ((imageNumber+1)%15) + ")", 1000);
}


function showRandomPhoto() {
    var num = Math.round(Math.random() * (myphoto.length-1));
    
    var photoLocation = myphoto[num].substring(0, myphoto[num].length-9) + myphoto[num].substring(myphoto[num].length-3); 
    
    // alert(photoLocation);
    
    document.write("<img src='");
    document.write(photoLocation);
    document.write("'/>");
        
}

