

function pop_up_img(imageName,imageWidth,imageHeight,alt)
	{
// JavaScript ImageViewer by Ostashow K.N.  E-mail me kostja_K_N@mail.ru

	res_x = screen.width;
	res_y = screen.height;

	border_color = "#760107";

	frame = 30;
	
	leftPos = Math.floor(res_x/2 - imageWidth/2 - frame/2); 
	topPos  = Math.floor(res_y/2 - imageHeight/2 - frame/2);

	if (navigator.userAgent.indexOf("Opera") != "-1")
		{
		topPos = 20;
		}

	if ((navigator.userAgent.indexOf("MSIE") != "-1") && (imageHeight > 640) && (res_y < 800))
		{
		topPos = 10;
		}



	winWidth  = (imageWidth-0) + (frame-0);
	winHeight = (imageHeight-0) + (frame-0);


	cell_pad = Math.floor(frame/2);
		

	title = alt;


	newWindow = window.open("","newWindow","resizable=no,scrollbars=no,width="+winWidth+",height="+winHeight+",left="+leftPos+",top="+topPos);
	newWindow.document.open();

	newWindow.document.write('<html><head><title>'+title+'</title></head>');
	newWindow.document.write('<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="'+border_color+'" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="'+cell_pad+'" align="center" height='+imageHeight+' ><tr><td>');
	newWindow.document.write('<a href="javascript:window.close();"><img border=0 src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt=\"Ùåëêíèòå&nbsp;ïî&nbsp;êàðòèíêå,&nbsp;÷òîáû&nbsp;çàêðûòü&nbsp;îêíî\" ></a>'); 
	newWindow.document.write('</td></tr></table>');

	newWindow.document.write('<div id="rollOver" style="position:absolute; visibility:hide; z-index: 1;"></div>');
	newWindow.document.write('</body></html>');

	newWindow.document.close();
	newWindow.focus();
	}


function pop_up_swf (flashPath,flashWidth,flashHeight,alt)
	{

// JavaScript FlashViewer by Ostashow K.N.  E-mail me kostja_K_N@mail.ru

	res_x = screen.width;
	res_y = screen.height;

	flashframe = 0;

	leftPos = Math.floor(res_x/2 - (flashWidth/2 + flashframe));
	topPos  = Math.floor((res_y/2 - (flashHeight/2 + flashframe))/2);

	newWindow = window.open(flashPath,'newWindow','resizable=no,scrollbars=no,width='+(flashWidth+flashframe*2)+',height='+(flashHeight+flashframe*2)+',left='+leftPos+',top='+topPos);
	newWindow.focus();
	}
