var photoBlock =
{
	showBigImage: function(src, title, width, height)
	{
		var maxWidth = 900;
		var maxHeight = 700;
		
		// ie hack
		var doc = null;
		try
		{
			doc = this._wnd.document;
		}
		catch (e)
		{
			
		}
		if (!this._wnd || !doc)
		{
			if (width + 10 > maxWidth || 0 == width)
			{
				width = maxWidth;
			}
			if (height + 40 > maxHeight || 0 == height)
			{
				height = maxHeight;
			}
			var wnd = window.open(src, '', 'width=' + (width + 20) + ',height=' + (height + 25) + ',toolbar=0,scrollbars=1,resizable');
			wnd.document.open();
			wnd.document.write('<html><head><title>Foto</title><meta http-equiv=Content-Type content="text/html; charset=utf-8"></head>');
			wnd.document.write('<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 onclick="window.opener.photoBlock.close();"><table width=100% height=100% border=0 cellspacing=0 cellpadding=0><tr><td align=center height="20">' + title + '</td></tr><tr><td align=center>'
				+ '<img id="image" src="' + src + '" border="0" alt="" /></td></tr></table></body></html>');
			wnd.document.close();
			this._wnd = wnd;
		}
		else
		{
			this._wnd.document.getElementById('image').src = src;
		}
		this._wnd.focus();
	},
	
	close: function()
	{
		this._wnd.close();
		this._wnd = null;
	},
	
	_wnd: null
}