to fix the issue, i changed:
document.write('<img src="' + imlocation + imagefolder + image[imagenumber] + '">');
to:
document.write('<img s'+'rc="' + imlocation + imagefolder + image[imagenumber] + '">');
I also had to change the image location:
var imlocation = "/dailyphoto/images/";
to:
var imlocation = "/images/dailyphoto/";