var gallery_c = function()
{
	this.open_path_s = '';

	/**/

	this.setElementVisible = function(id_s, state_b)
	{
		var element_o = document.getElementById(id_s);
		if (element_o) element_o.style.display = state_b ? '' : 'none';
	};

	/**/

	this.setBackgroundVisible = function(state_b)
	{
		var background_o = document.getElementById('gallery_background');

		if (background_o)
		{
			background_o.style.height = document.body.offsetHeight + 'px';
			background_o.style.display = state_b ? '' : 'none';
		}
	};

	this.setOpenVisible = function(state)
	{
		this.setElementVisible('gallery_open', state);
	};

	this.setOpenPath = function(path_s)
	{
		var image_o = document.getElementById('gallery_open_image');
		if (image_o) image_o.src = path_s;

		this.open_path_s = path_s;
	};

	/**/

	this.setVisible = function(path_s, open_path_s)
	{
		var image_o = document.getElementById('gallery_image');
		if (image_o) image_o.src = path_s;

		this.open_path_s = open_path_s ? open_path_s : path_s;
	};

	this.setOpen = function()
	{
		this.setBackgroundVisible(true);
		this.setOpenVisible(true);
		this.setOpenPath(this.open_path_s);
	};

	this.setClose = function()
	{
		this.setBackgroundVisible(false);
		this.setOpenVisible(false);
	};
};
