function newwindow(url,winname)
{
	// Split opening of the window into two steps
	// so the pdf opens properly in Opera 9.x

	aWin = window.open("", winname, "width=550, height=550, resizable=yes");
	aWin.document.location.href=url;
}


function photoviewer(obj)
{
	photo	= escape(obj.href);

	// Extract caption text from caption span associated with the object
	eCaption = obj.parentNode.nextSibling.nextSibling;
	if(eCaption.firstChild != null)
		caption = eCaption.firstChild.nodeValue;
	else
		caption = "";

	caption = escape(caption);

	url = "photoviewer.htm?" + photo + "+" + caption;
	aWin = window.open(url, "photoviewer", "width=625, height=520, resizable=yes");
	aWin.focus();
}
