	function PhotosFilter(ds, row, rowIndex)
	{
		row.path = row["large/@base"] + row["photos/photo/@path"];
		row.thumbpath = row["thumbnail/@base"] + row["photos/photo/@thumbpath"];
		return row;
	}
	var dsPhotos = new Spry.Data.XMLDataSet("thbhtmlgallery.xml", "/gallery", { subPaths: "photos/photo", filterDataFunc: PhotosFilter });
	Spry.Data.Region.addObserver("thumbnails", { onPostUpdate: function()
	{
		if (gThumbViewer)
		{
			gThumbViewer.attachBehaviors();
			gThumbViewer.select(0);
			return;
		}
		InitializeGallery();
		Spry.$$("#galleryLinks a").addEventListener("click", function(e)
		{
			gSlideShowControl.stop();
			dsPhotos.setURL(this.href);
			dsPhotos.loadData();
			return false;
		}, false);
	}});
