function initPhotoViewer(nGalleryId, nPictype, nThumbtype) {
	//alert("initPhotoViewer() entered!")
	sUrl = "/photos.xml?a-spry-galid=" + nGalleryId + "&a-spry-pictype=" + nPictype + "&a-spry-thumbtype=" + nThumbtype;
	sViewer = "photoViewer" + nGalleryId;
	YAHOO.photoViewer.config = {
		viewers: {
			"cnfPhotoViewer": {
				properties: {
					id: "photoViewer" + nGalleryId,
					grow: 0.2,
					fade: 0.2,
					modal: true,
					dragable: false,
					fixedcenter: true,
					loadFrom: "xml",
					url: "/photos.xml?a-spry-galid=" + nGalleryId + "&a-spry-pictype=" + nPictype + "&a-spry-thumbtype=" + nThumbtype,
					position: "absolute",
					easing: YAHOO.util.Easing.easeBothStrong,
					thumbEvent: "click",
					buttonText:{
						next: "next",
						prev: "prev",
						close: "close"
					},
					slideShow: {
						loop: true,
						duration: 5000,
						autoStart: false,
						playMode: "ordered",
						controlsText: {
							play: "play",
							pause: "pause",
							stop: "stop",
							display: "({0} of {1})"
						}
					}
				}
			}
		}
	};
	YAHOO.photoViewer.config.viewers[sViewer] = YAHOO.photoViewer.config.viewers["cnfPhotoViewer"];
	//alert(YAHOO.photoViewer.config.viewers);
}