var misio=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
	misio=true;
@end @*/
var popup_window;
function pokaz(el,w,h)
{
	try {
		w+=30;
		h+=30;

		if (popup_window && popup_window.close && !popup_window.closed) {
			popup_window.close();
		}
			
		var str="dependent=yes,toolbar=no,resizable=yes";
		if (w && h) {
			var sb=0;
			if (w>screen.availWidth) {w=screen.availWidth;sb=1;}
			if (h>screen.availHeight) {h=screen.availHeight;sb=1;}
			str+=",width="+w+",height="+h;
			if (sb) str+=",scrollbars=yes";
			var x,y;
			x=Math.floor((screen.availWidth-w)/2);
			y=Math.floor((screen.availHeight-h)/2);
			if (x>20) {
				str+=(misio?',left=':',screenX=')+x;
			}
			if (y>20) {
				str+=(misio?',top=':',screenY=')+y;
			}
		}
		popup_window=window.open(el.href,"_blank",str);
		if (!popup_window) return true;
		var doc=popup_window.document;
		doc.open();
		var alt="";
		if (el.alt) alt=el.alt;
		doc.write(
	  		'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' +
			'<html id="popup">' +
			'<head><head><title>' + alt + '</title>' +
				'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">' +
				'<style type="text/css">' +
				'body,html {margin:0px;padding:0px}\n'+
				'p {text-align:center;margin:0px;padding:15px 0 0 0}\n'+
				'img {display:inline}\n'+
				'</style>'+
				'</head><body><p><img src="'+el.href+'" alt="'+alt+'"></p>' +
				'<script type="text/javascript"> document.body.onmouseup = function(e) {var ev = e||event; if ((ev.button||ev.which) < 2) self.close();} ' +
				'</script></body></html>'
				);
		doc.close();
		if (el.className.indexOf('click')>=0) el.blur();
		if (misio) event.returnValue=false;
		return false;
	}
	catch(e) {
		return true;
	}
}
