I haven't looked recently, but the full source code used to be posted in the programming forums. It was the original implementation, without the recent improvements, but it would be an excellent starting point for you. Another would be David Wulff's forum project, which I believe is also available here. Search the forums...
"...a photo album is like Life, but flat and stuck to pages." - Shog9