function ClientBrowse() { this.w=0; this.h=0;
if (self.screen) { this.w=screen.width; this.h=screen.height; }
else if (self.java) { var jkit=java.awt.Toolkit.getDefaultToolkit(); var scrsize=jkit.getScreenSize(); this.w=scrsize.width; this.h=scrsize.height; } return this; }

function open_prn() {
	p=new ClientBrowse();
	leftPos=(p.w-520)/2;
	h=p.h-100; topPos=10;
	s=1; nwin="OpenDiv"; var property="left="+leftPos+",top="+topPos+",width=520,height="+h+",scrollbars="+s;
o=window.open ("about:blank",nwin,property);
   obj = '<h1>' + jQuery("h1").html() + '</h1>';
   obj += jQuery(".article-meta").html();
   obj += '<div  class="buttonheading"><span><a href="#" title="Печать" onclick="window.print();" rel="nofollow"><img src="/i/printButton.png" alt="Печать"></a></span></div>';
   obj += jQuery(".article-content").html();
	oHTML = "<html><head><link rel=\"stylesheet\" href=\"/css/addons.css\" type=\text/css\"><link rel=\"stylesheet\" href=\"/css/template.css\" type=\"text/css\"><link rel=\"StyleSheet\" href=\"/css/print.css\" type=\"text/css\"></head><body class=\"contentpane\"><div class=\"column\">"+obj+"</div></body></html>"
	ab = o.document.open("text/html", "replace");
	ab.write(oHTML);
	o.document.close();
	//o.print();
}
function OpenWin(url,nwin,w,h,s) { p=new ClientBrowse();
if (w) { leftPos=(p.w-w)/2; } else { w=p.w-100; leftPos=(p.w-w)/2; }
if (h) { topPos=(p.h-h)/2; } else { h=p.h-100; topPos=10; }
(s==1)?null:s=0; (nwin)?null:nwin="win"; var property="left="+leftPos+",top="+topPos+",width="+w+",height="+h+",scrollbars="+s;
window.open (url,nwin,property); }
