I found easier code...
<!-- Template file for JPG Files -->
<a href="#"
onClick="NewWindow=window.open('{media_src}','NewWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollb
ars=yes,resizable=yes,width=auto,height=auto,top=,left=');">{thumb}</a>
But still have some problems with inserting Title of window and margin.
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<- that one doesn't work