
var pictures = {
	init: function()
	{
	    if (document.getElementById("thumbnails"))
	    {
		    var thumbLinks = document.getElementById("thumbnails").getElementsByTagName("a");
		    // Change all the thumbnail links
		    if (thumbLinks)
		    {
			    for (i=0; i < thumbLinks.length; i++)
			    {
				    thumbLinks[i].onclick = function() { pictures.showThumb(this); return false; };	
				    // We need to preload the images as well;
				    pictures.preloadFullImage(thumbLinks[i].href);
			    } // for
		    } // if
		}
	}, // init
	
	showThumb: function(full_image)
	{
		// Now show the full size image in the 'mainimage' location
		mainimage = document.getElementById('blowUp');
		mainimage.src = full_image;
	}, // showThumb
	
	preloadFullImage: function(image)
	{
		var preload = new Image();
		preload.src = image;
	}
}

Event.addEvent(this, "load", pictures.init, true);