function OpenWindow(image,width,height)
{
	var left,top,screenWidth,screenHeight;

	// общий синтаксис
	if (self.innerHeight)
	{
		left = self.innerWidth;
		top = self.innerHeight;
	// IE 6 Strict Mode
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	{
		left = document.documentElement.clientWidth;
		top = document.documentElement.clientHeight;
	// Остальные версии IE
	}
	else if (document.body)
	{
		left = document.body.clientWidth;
		top = document.body.clientHeight;
	}

	// определяем разрешение монитора
	if (self.screen)
	{
		screenWidth = screen.width;
		screenHeight = screen.height;
	}

	screenWidth = screenWidth-left;
	screenHeight = screenHeight-top;

	left = ((left-width)/2)+(screenWidth/2);
	top = ((top-height)/2)+(screenHeight/2);
	
	w = window.open('',null,'titlebar=0, status=0, toolbar=0, location=0, menubar=0, scrollbars=0, height='+height+', width='+width+', left='+left+', top='+top);
	w.document.write('<html><body style="margin:0; padding:0;">'+
	'<div style="position:absolute; bottom:0; left:0; margin:0 0 10px 10px; padding:10px; border: 0;background: #000000; font: 10px/12px Tahoma;'+
	'filter:alpha(opacity=60);opacity:.60; color:#FFFFFF">'+
	'Чтобы сохранить картинку, щелкните правой<br>кнопкой мыши (Windows) или нажмите Ctrl<br>(Macintosh).</div><img src="'+image+'"></body></html>');
	w.focus();
	w.document.close();
}

