function js_printelement(el,tytul,stopka,styl,base){
	//if(el.innerHTML){
		if(!tytul){tytul=document.title;}
		var top=10, left=10, width=800, height=600;
		if(screen){top = (screen.height-height)/2; left = (screen.width-width)/2;}
		var okno=window.open("","drukujel","width="+width+",height="+height+",top="+top+",left="+left+",toolbar=no,directories=no,menubar=yes,locations=no,status=no,scrollbars=yes,resizable=yes,fullscreen=no");
		okno.document.open();
		var elhtml = el.innerHTML; 
		elhtml = elhtml.replace(/(onclick=)|(onblur=)|(onfocus=)|(onkeyup=)|(onkeydown=)|(onerror=)|(href=)|(target=)/gi,'x=');
		elhtml = elhtml.replace(/onsubmit=["'](.*?)["']/gi,'onsubmit="return false"');
		//elhtml = elhtml.replace(/imgprint/gi,'style="display:none;"');
		//elhtml = elhtml.replace(/href=["'](.*?)["']/gi,'xxx="javascript:void(0);"');
		//elhtml = elhtml.replace(/target=["'](.*?)["']/gi,' ');
		elhtml = elhtml.replace(/\n/g,'[br]');
		elhtml = elhtml.replace(/<script(.*?)<\/script>/gi,'');
		elhtml = elhtml.replace(/\[br\]/g,"\n");
		var v='', br="\n";
		v+='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'+br;
		v+='<html>'+br;
		v+='<head>'+br;
		v+='<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />'+br;
		v+='<title>'+tytul+'</title>'+br;
		v+='<base href="'+base+'" />'+br;
		v+='<style type="text/css">'+br;
		v+='.s3 {font-family:Verdana,Tahoma,Arial; color:#696969; font-size:10px;}'+br;
		v+='</style>'+br;
		styl=styl.split(',');
		for(var i=0;i<styl.length;i++){v+='<link rel="stylesheet" href="'+styl[i]+'" type="text/css">'+br;}
		v+='<'+'script'+' type="text/javascript">'+br;
		v+='</'+'script'+'>'+br;
		v+=''+br;
		v+='</head>'+br;
		v+='<body style="margin:5px;background:white;">'+br;
		v+='<table border="0" cellpadding="0" cellspacing="2" width="700">'+br;
		v+='<tr><td>'+elhtml+'</td></tr>'+br;
		v+='<tr><td class="s3" valign="top" style="border-top:1px dashed #a0a0a0;padding-top:2px;"><div class="s3">link: '+window.location+'</div>'+stopka+'&nbsp;</td></tr>'+br;
		v+='</table>'+br;
		v+='<br><br>'+br;
		v+='</body>'+br;
		v+='</html>'+br;
		okno.document.writeln(v);
		okno.document.close();
		okno.focus();
		okno.print();
	//}//end el
}//end function
