function popup (par, my_title) 
{
	//imageURL = sender.src;
	imageURL = par;
	//caption  = my_title;
	//alert(imageURL);
	caption = window.document.title;
	//**********************
	// Определение версии Браузера
	var b_version=navigator.appVersion;
	//-----------------------
	var windowTop       = 5;
	var windowLeft      = 5;
	var defaultWidth    = 100;
	var defaultHeight   = 80;
	var onLoseFocusExit = true;
	var undefined;
	var strStyleCur;
	var Options = "width=" + defaultWidth + ",height=" + defaultHeight + ",top=" + windowTop + ",left=" + windowLeft + ""
	//var Options = "top=" + windowTop + ",left=" + windowLeft + ""

	var myScript = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n" +
    "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n" +
    "<head>\n" +
    "<title>" + caption + "\</title>\n" +
    "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n" +
    "<meta http-equiv=\"Content-Language\" content=\"en\">\n" +
    "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n" +
    "<script language=\"JavaScript\" type=\"text/javascript\">\n" +
    "function resizewindow () {\n" +
    "  var width = document.myimage.width - 5;\n" +
    "  var height = document.myimage.height + 20;\n";
	if (navigator.appName.indexOf("Netscape") != -1)
	{
		myScript = myScript +  "  window.innerHeight = height-20;\n  window.innerWidth = width;\n"
	}
	else if (navigator.appName.indexOf("Opera") != -1)
	{
		myScript = myScript +  "  window.resizeTo (width+12, height+32);\n"
	}
	else if (navigator.appName.indexOf("Microsoft") != -1) 
	{
		if (b_version.indexOf("MSIE 7") != -1)
		{
			myScript = myScript + "  window.resizeTo (width+12, height+60);\n"
		}
		else if(b_version.indexOf("MSIE 6") != -1)
		{
			myScript = myScript + "  window.resizeTo (width+12, height+38);\n"
		}
		else
		{
			myScript = myScript + "  window.resizeTo (width+25, height+60);\n"
		}
	}
	else
	{
		myScript = myScript + "  window.resizeTo (width, height+1000);\n"
	}
	myScript = myScript + "}\n" + "window.onload = resizewindow;\n" +
    "</script>\n</head>\n" + "<body ";
	if (onLoseFocusExit)
	{
		myScript = myScript + "onblur=\"window.close()\" ";
	} //onmousedown=\"window.close()\"

	strStyleCur = "\"style=\"CURSOR: url('Cur_Lego_Close.cur');\"";
	myScript = myScript + "style=\"margin: 0px; padding: 0px;\">\n" +
    "<img src=\"" + imageURL + "\" alt=\"" + caption + "\" title=\"" + caption + "\" name=\"myimage\" >\n" +
    "</body>\n" +  "</html>\n";
	var imageWindow = window.open ("","imageWin",Options);
	imageWindow.document.write (myScript)
	imageWindow.document.close ();
	if (window.focus) imageWindow.focus();

	return false;
}