
// Отображение полноразмерного изображения в отдельном окне
function ShowImageWindow(picname, width, height, title)
{
	if(self && self.screen && self.screen.width)
	{
		pos="";
		if(width>self.screen.width)
		{
			winwidth=self.screen.width-20;
			pos+=",left=0";
		}
		else
		{
			winwidth=width;
			pos+=",left="+((self.screen.width-width+17)/2);
		}
		if(height>self.screen.height)
		{
			winheight=self.screen.height-60;
			pos+=",top=0";
		}
		else
		{
			winheight=height;
			pos+=",top="+((self.screen.height-height)/2);
		}
			
	}
	var params='toolbar=no,height='+winheight+',width='+winwidth+',location=no,scrollbars=no,status=no,menubar=no,resizable=yes'+pos;
	picwin=window.open("","_blank",params);
	picwin.document.write("<html><title>"+title+"</title>");
	picwin.document.write("<body marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>");
	picwin.document.write("<img src='"+picname+"' width="+width+" height="+height+" border=0>");
	picwin.document.write("</body></html>");
}
