PHP/Javascript image gallery assembled from web tutorials