// JavaScript Document

// need to have thumbnails open full-size in a new window

window.onload = function() { prepGallery();	};

function prepGallery()
{	if(!document.getElementsByTagName('a')) return false;
	if(!document.getElementById('gallery')) return false;
	var gallery = document.getElementById('gallery');
	var links = gallery.getElementsByTagName('a');
	for(var i = 0; i<links.length; i++)
	{	links[i].onclick=function()
		{	return showPic(this);
		}
	}
	
}

function showPic(pic)
{	var source = "photo.php?p=" + pic.getAttribute('href');
	window.open(source, 'photo', 'width=600,height=500,scrollbars=yes');
	return false;
}

