

function print_data(id)
{

 var object = document.getElementById(id);
 
 maxwidth = object.clientWidth+ 50;
 maxheight = object.clientHeight+90;
  
 okno = window.open('','DisplayWindow','left=0,top=20,width='+maxwidth+',height='+maxheight+',toolbar=1,resizable=1');
 okno.document.clear();
 okno.document.write("<html><head><title>Dane Adresowe</title><link rel=\"stylesheet\" href=\"css/style.css\" type=\"text/css\"></head>"); 
 okno.document.write(object.innerHTML);
 
 
 okno.document.write('<div style="text-align:right;"><a href="#" onclick="javascript:window.print();window.close();" alt="Zamknij"><span style="font-family:arial; font-weight:bold; font-size:12px; color:#000000">Drukowanie</span></a>');
 okno.document.write('&nbsp;&nbsp;<a href="#" onclick="javascript:window.close();" alt="Zamknij"><span style="font-family:arial; font-weight:bold; font-size:12px; color:#000000">Zakończ</span></a><div>');
 okno.document.write('</body></html>'); 
 okno.document.close();
 okno.focus();
 
}

function showPicture(path, filename, width, height, subject, description, data)
{
 maxwidth = width+50;
 maxheight = height+50;
 if( maxwidth == 50)  maxwidth+=400;
 if( maxheight == 50)  maxwidth+=400;
 
 okno = window.open('','DisplayWindow','left=0,top=20,width='+maxwidth+',height='+maxheight+',toolbar=0,resizable=0');
okno.document.clear();
 okno.document.write("<html><head><title>Comdrev S.J."+ subject+"</title><link rel=\"stylesheet\" href=\"css/style.css\" type=\"text/css\"></head>");
 okno.document.write('<body  style="background-attachment: fixed;background-image: url(mapka.jpg);background-position: 1px 1px;"><center>');
 okno.document.write('<div class="Akttytul" style="margin-bottom:5px;">'+subject+'</div>');
 okno.document.write('<a href="#" onclick="javascript:window.close();" alt="Zamknij"><img src="'+path+'/'+filename+'" width="'+width+'" height="'+height+'" title="Zamknij" style="border: 4px solid #ffffff;"></a>');
okno.document.write('</center></body></html>'); 
okno.document.close();
okno.focus();

}

