function open_win(x)
{
	var img_big;
	var strBody;
	var strWin='width=100, height=100, top=100, left=100, scrollbars=0, resizable=yes, status=no';
	var win_op=window.open('', 'show', strWin);
	var browserName1 = navigator.appName;
			strBody='<body style="padding:0px; margin:0px;" onLoad="win_load();">';
											
														
	win_op.document.open();
	win_op.document.writeln('<html>');
	win_op.document.writeln('<head>');
	win_op.document.writeln('	<title>ÐÁÊ ÑÎÔÒ - Èíòåðíåò Ðåøåíèÿ</title>');
	win_op.document.writeln('<script language="JavaScript">');
	win_op.document.writeln('function win_load()');
	win_op.document.writeln('{');
	win_op.document.writeln('	var imgH;');
	win_op.document.writeln('	var imgW;');
	win_op.document.writeln('	var open_pic=window.opener.document.addName.img_big.value;');
	win_op.document.writeln('	var agent = navigator.userAgent;');
	win_op.document.writeln('	browserName = navigator.appName;');
	win_op.document.writeln('	browserVer = parseInt(navigator.appVersion);');
	win_op.document.writeln('	var broser;');
	win_op.document.writeln('if (agent.indexOf("Opera") > -1) { broser=3;}');
	win_op.document.writeln('else if ((browserVer >3) && (browserName == "Microsoft Internet Explorer")) { broser=1;}');
	win_op.document.writeln('else if ((browserVer >3) &&(browserName == "Netscape")) { broser=2;}');
	win_op.document.writeln('	imgH=document.getElementById("big_pic").offsetHeight;');
	win_op.document.writeln('	imgW=document.getElementById("big_pic").offsetWidth;');
	win_op.document.writeln('if (broser==1) {	self.resizeTo(imgW+9,imgH+30);}');
	win_op.document.writeln('else if (broser==2) {	self.resizeTo(imgW+8,imgH+51);}');
	win_op.document.writeln('else if (broser==3) {	self.resizeTo(imgW+10,imgH+44);}');
	win_op.document.writeln('}');
	win_op.document.writeln('</script>');
	win_op.document.writeln('</head>');
	win_op.document.writeln(strBody);
//	win_op.document.writeln('<img src="'+document.location.href.substring(0, document.location.href.lastIndexOf("/")+1)+x+'" id="big_pic" onClick="window.close();">');
	win_op.document.writeln('<img src="'+x+'" id="big_pic" onClick="window.close();">');
	win_op.document.writeln('</body>');
	win_op.document.writeln('</html>');
	win_op.document.close();


}

function imgopen(imgf,tit){
rand_id='image'+(Math.round(Math.random()*1000));
outf="<html>"
+"<head>"
+"<title>"+tit+"</title>"
+"<style>body{margin:0px}</style>"
+"</head>"
+"<body leftmargin=0 topmargin=0>"
+"<img src=\""+imgf+"\">";
iopen="iwin=self.open('"+imgf+"', '"+rand_id+"', 'width='+(img1.width)+',height='+(img1.height)+',top=30,left=30');"
+"iwin.document.write('"+outf+"');"
+"iwin.focus();";
img1=new Image();
img1.src=imgf;
if(img1.width!=0) eval(iopen);
else{
iwin = self.open('about:blank', 'f'+rand_id, 'width=100,height=100,top=0,left=0');
iwin.document.write("<html>"
+"<body>"
+"<"+"script>"
+"function imo(img1){"+iopen
+"self.close();"
+"}<"+"/script>"
+"<img src='"+imgf+"' onload='imo(this);'>");
}
}