function WinOpen(numer_obrazka) {
	   var formularz=document.forms[2];
	   var tekst_tytulu=formularz.tytul_galerii.value;
   	   var calkowita_ilosc=formularz.ilosc_fotografii.value;
	   var tekst_tytulu_okna=tekst_tytulu+" - zdjêcie "+numer_obrazka+" z "+calkowita_ilosc;
	   var tekst_podpisu=eval("formularz.podpis_"+numer_obrazka+".value;");
	   var sciezka_do_obrazka=eval("formularz.nazwa_"+numer_obrazka+".value;");
       msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no,width=651,height=521,left=40,top=40,scrollbars=no");
       msg.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
       msg.document.write("<HTML>");
       msg.document.write("<HEAD>");
       msg.document.write("<TITLE>"+tekst_tytulu_okna+"</TITLE>");
       msg.document.write("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-2\">");
       msg.document.write("<LINK HREF=\"style/eko_galeria.css\" REL=\"stylesheet\" TYPE=\"text/css\">");
       msg.document.write("</HEAD>");
       msg.document.write("<BODY>");
       msg.document.write("<TABLE WIDTH=\"650\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">");
       msg.document.write("  <TR>");
       msg.document.write("    <TD WIDTH=\"50\" HEIGHT=\"50\"><IMG SRC=\"layout_c/a1.gif\" WIDTH=\"50\" HEIGHT=\"50\"></TD>");
       msg.document.write("    <TD WIDTH=\"550\" HEIGHT=\"50\"><IMG SRC=\"layout_c/a2.gif\" WIDTH=\"550\" HEIGHT=\"50\"></TD>");
       msg.document.write("    <TD WIDTH=\"50\" HEIGHT=\"50\"><IMG SRC=\"layout_c/a3.gif\" WIDTH=\"50\" HEIGHT=\"50\"></TD>");
       msg.document.write("  </TR>");
       msg.document.write("  <TR>");
       msg.document.write("    <TD HEIGHT=\"400\"><IMG SRC=\"layout_c/b1.gif\" WIDTH=\"50\" HEIGHT=\"400\"></TD>");
       msg.document.write("    <TD CLASS=\"interior\"><IMG SRC=\""+sciezka_do_obrazka+"\"HEIGHT=\"400\" BORDER=\"0\" ALT=\"\" onClick=\"window.close()\"></TD>");
       msg.document.write("    <TD><IMG SRC=\"layout_c/b1.gif\" WIDTH=\"50\" HEIGHT=\"400\"></TD>");
       msg.document.write("  </TR>");
       msg.document.write("  <TR>");
       msg.document.write("    <TD HEIGHT=\"50\"><IMG SRC=\"layout_c/c1.gif\" WIDTH=\"50\" HEIGHT=\"50\"></TD>");
       msg.document.write("    <TD CLASS=\"interior-2\">");
       msg.document.write("    <TABLE WIDTH=\"100%\" CELLSPACING=\"0\" CELLPADDING=\"4\" BORDER=\"0\">");
       msg.document.write("    <TR><TD>"+tekst_podpisu+"</TD></TR></TABLE></TD>");
       msg.document.write("    <TD><IMG SRC=\"layout_c/c3.gif\" WIDTH=\"50\" HEIGHT=\"50\"></TD>");
       msg.document.write("  </TR>");
       msg.document.write("  <TR>");
       msg.document.write("    <TD HEIGHT=\"20\"><IMG SRC=\"layout_c/d1.gif\" WIDTH=\"50\" HEIGHT=\"20\"></TD>");
       msg.document.write("    <TD><IMG SRC=\"layout_c/d2.gif\" WIDTH=\"550\" HEIGHT=\"20\" BORDER=\"0\" USEMAP=\"#Map\"></TD>");
       msg.document.write("    <TD><IMG SRC=\"layout_c/d3.gif\" WIDTH=\"50\" HEIGHT=\"20\"></TD>");
       msg.document.write("  </TR>");
       msg.document.write("</TABLE>");
       msg.document.write("<MAP NAME=\"Map\">");
       msg.document.write("  <AREA SHAPE=\"RECT\" COORDS=\"443,2,540,18\" HREF=\"#\" onClick=\"window.close()\">");
       msg.document.write("</MAP>");
       msg.document.write("</BODY>");
       msg.document.write("</HTML>");
}

